Permalink
Browse files

Fixed bug in density computation.

  • Loading branch information...
MikeHopcroft committed Oct 27, 2016
1 parent ebf12d5 commit 41db6a9f81c2517d1a88adc8c27b8612fb586eb5
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/Index/src/Term.cpp
View
@@ -296,7 +296,8 @@ namespace BitFunnel
double Term::FrequencyAtRank(double frequency, Rank rank)
{
- return 1.0 - pow(1.0 - frequency, rank + 1.0);
+ size_t rowCount = (1ull << rank);
+ return 1.0 - pow(1.0 - frequency, rowCount);
}

0 comments on commit 41db6a9

Please sign in to comment.