@@ -61,7 +61,7 @@ void SBF::SetHashDigestLength()
6161// char *d is the input of the hash value
6262// size_t n is the input length
6363// unsigned char *md is where the output should be written
64- void SBF::Hash (char *d, size_t n, unsigned char *md)
64+ void SBF::Hash (char *d, size_t n, unsigned char *md) const
6565{
6666 switch (this ->HASH_family ){
6767 case 1 :
@@ -222,7 +222,7 @@ void SBF::SetCell(unsigned int index, int area)
222222
223223
224224// Returns the area label stored at the specified index
225- int SBF::GetCell (unsigned int index)
225+ int SBF::GetCell (unsigned int index) const
226226{
227227 int area;
228228 switch (this ->cell_size ){
@@ -251,7 +251,7 @@ int SBF::GetCell(unsigned int index)
251251// Prints the filter and related statistics to the standart output
252252// mode: 0 prints SBF stats only
253253// mode: 1 prints SBF information and the full SBF content
254- void SBF::PrintFilter (int mode)
254+ void SBF::PrintFilter (int mode) const
255255{
256256 int potential_elements;
257257
@@ -432,7 +432,7 @@ void SBF::Insert(char *string, int size, int area)
432432// belongs to a set, 0 otherwise.
433433// char *string the element to be verified
434434// int size length of the element
435- int SBF::Check (char *string, int size)
435+ int SBF::Check (char *string, int size) const
436436{
437437 char * buffer = new char [size];
438438 int area = 0 ;
@@ -622,14 +622,14 @@ void SBF::SetAreaFpp()
622622
623623
624624// Returns the number of inserted elements for the input area
625- int SBF::GetAreaMembers (int area)
625+ int SBF::GetAreaMembers (int area) const
626626{
627627 return this ->AREA_members [area];
628628}
629629
630630
631631// Returns the sparsity of the entire SBF
632- float SBF::GetFilterSparsity ()
632+ float SBF::GetFilterSparsity () const
633633{
634634 float ret;
635635 int sum = 0 ;
@@ -644,7 +644,7 @@ float SBF::GetFilterSparsity()
644644
645645// Returns the a-priori false positive probability over the entire filter
646646// (i.e. not area-specific)
647- float SBF::GetFilterAPrioriFpp ()
647+ float SBF::GetFilterAPrioriFpp () const
648648{
649649 double p;
650650
@@ -658,7 +658,7 @@ float SBF::GetFilterAPrioriFpp()
658658
659659// Returns the a-posteriori false positive probability over the entire filter
660660// (i.e. not area-specific)
661- float SBF::GetFilterFpp ()
661+ float SBF::GetFilterFpp () const
662662{
663663 double p;
664664 int c = 0 ;
@@ -675,7 +675,7 @@ float SBF::GetFilterFpp()
675675
676676
677677// Returns the expected emersion value for the input area
678- float SBF::GetExpectedAreaEmersion (int area)
678+ float SBF::GetExpectedAreaEmersion (int area) const
679679{
680680 double p;
681681 int nfill = 0 ;
@@ -692,7 +692,7 @@ float SBF::GetExpectedAreaEmersion(int area)
692692
693693
694694// Returns the emersion value for the input area
695- float SBF::GetAreaEmersion (int area)
695+ float SBF::GetAreaEmersion (int area) const
696696{
697697 float ret, a, b;
698698 if ((this ->AREA_members [area]==0 ) || (this ->HASH_number ==0 )) ret = -1 ;
0 commit comments