Skip to content

Commit

Permalink
What was this code... strange
Browse files Browse the repository at this point in the history
  • Loading branch information
msoos committed Jan 10, 2024
1 parent 807e801 commit 87cde31
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/counter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -448,18 +448,9 @@ ApproxMC::SolCount Counter::count()
ApproxMC::SolCount Counter::calc_est_count()
{
ApproxMC::SolCount ret_count;
if (numHashList.empty() || numCountList.empty()) {
return ret_count;
}
if (numHashList.empty() || numCountList.empty()) return ret_count;

const auto minHash = findMin(numHashList);
auto cnt_it = numCountList.begin();
for (auto hash_it = numHashList.begin()
; hash_it != numHashList.end() && cnt_it != numCountList.end()
; hash_it++, cnt_it++
) {
*cnt_it *= pow(2, (*hash_it) - minHash);
}
ret_count.valid = true;
ret_count.cellSolCount = findMedian(numCountList);
ret_count.hashCount = minHash;
Expand Down

0 comments on commit 87cde31

Please sign in to comment.