and const 2 more functions

This commit is contained in:
Bernhard Amann 2013-09-16 11:00:54 -07:00
parent c0f780c728
commit ecc20b932a
2 changed files with 4 additions and 4 deletions

View file

@ -10,7 +10,7 @@
using namespace probabilistic;
int CardinalityCounter::OptimalB(double error, double confidence)
int CardinalityCounter::OptimalB(double error, double confidence) const
{
double initial_estimate = 2 * (log(1.04) - log(error)) / log(2);
int answer = (int) floor(initial_estimate);
@ -87,7 +87,7 @@ CardinalityCounter::~CardinalityCounter()
delete [] buckets;
}
uint8_t CardinalityCounter::Rank(uint64 hash_modified)
uint8_t CardinalityCounter::Rank(uint64 hash_modified) const
{
uint8_t answer = 0;

View file

@ -147,7 +147,7 @@ private:
*
* @return minimal B-value satisfying the error-rate under confidence.
*/
int OptimalB(double error, double confidence);
int OptimalB(double error, double confidence) const;
/**
* Determines at which index (counted from the back) the first one-bit
@ -158,7 +158,7 @@ private:
*
* @returns index of first one-bit
*/
uint8_t Rank(uint64 hash_modified);
uint8_t Rank(uint64 hash_modified) const;
/**
* This is the number of buckets that will be stored. The standard