Showing 3 of 5 total issues
Complex method PageRank::Sparse#calculate_step (35.4) Open
Open
def calculate_step(ranks)
ranks.keys.each_with_object({}) do |dest, new_ranks|
sum = 0.0
Array(@graph[dest]).each do |source|
sum += ranks[source] * @normalized_weights[source][dest]
- Read upRead up
- Exclude checks
Flog calculates the ABC score for methods. The ABC score is based on assignments, branches (method calls), and conditions.
You can read more about ABC metrics or the flog tool
Complex method PageRank::Dense#to_matrix (35.0) Open
Open
def to_matrix
total_out_weights = @out_links.map do |links|
links&.compact&.reduce(:+)
end
Matrix.build(node_count, node_count) do |dest_idx, source_idx|
- Read upRead up
- Exclude checks
Flog calculates the ABC score for methods. The ABC score is based on assignments, branches (method calls), and conditions.
You can read more about ABC metrics or the flog tool
The function Init_text_rank
is never used. Open
Open
void Init_text_rank() {
- Read upRead up
- Exclude checks
The function Init_text_rank
is never used. (detailed CWE explanation)