Skip to content

Commit

Permalink
Simply GetCumulativeCounts
Browse files Browse the repository at this point in the history
  • Loading branch information
yinggeh committed Aug 16, 2024
1 parent 484c2be commit d4372af
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/test/metrics_api_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -252,11 +252,8 @@ GetCumulativeCounts(
}
}

double cumulative_sum = 0.0;
for (int i = 0; i < cumulative_counts.size(); ++i) {
std::cout << cumulative_counts[i] << std::endl;
cumulative_sum += cumulative_counts[i];
cumulative_counts[i] = cumulative_sum;
for (int i = 1; i < cumulative_counts.size(); ++i) {
cumulative_counts[i] += cumulative_counts[i - 1];
}
return cumulative_counts;
}
Expand Down

0 comments on commit d4372af

Please sign in to comment.