@@ -61,7 +61,7 @@ void SBF::SetHashDigestLength()
61
61
// char *d is the input of the hash value
62
62
// size_t n is the input length
63
63
// 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
65
65
{
66
66
switch (this ->HASH_family ){
67
67
case 1 :
@@ -222,7 +222,7 @@ void SBF::SetCell(unsigned int index, int area)
222
222
223
223
224
224
// Returns the area label stored at the specified index
225
- int SBF::GetCell (unsigned int index)
225
+ int SBF::GetCell (unsigned int index) const
226
226
{
227
227
int area;
228
228
switch (this ->cell_size ){
@@ -251,7 +251,7 @@ int SBF::GetCell(unsigned int index)
251
251
// Prints the filter and related statistics to the standart output
252
252
// mode: 0 prints SBF stats only
253
253
// mode: 1 prints SBF information and the full SBF content
254
- void SBF::PrintFilter (int mode)
254
+ void SBF::PrintFilter (int mode) const
255
255
{
256
256
int potential_elements;
257
257
@@ -432,7 +432,7 @@ void SBF::Insert(char *string, int size, int area)
432
432
// belongs to a set, 0 otherwise.
433
433
// char *string the element to be verified
434
434
// int size length of the element
435
- int SBF::Check (char *string, int size)
435
+ int SBF::Check (char *string, int size) const
436
436
{
437
437
char * buffer = new char [size];
438
438
int area = 0 ;
@@ -622,14 +622,14 @@ void SBF::SetAreaFpp()
622
622
623
623
624
624
// Returns the number of inserted elements for the input area
625
- int SBF::GetAreaMembers (int area)
625
+ int SBF::GetAreaMembers (int area) const
626
626
{
627
627
return this ->AREA_members [area];
628
628
}
629
629
630
630
631
631
// Returns the sparsity of the entire SBF
632
- float SBF::GetFilterSparsity ()
632
+ float SBF::GetFilterSparsity () const
633
633
{
634
634
float ret;
635
635
int sum = 0 ;
@@ -644,7 +644,7 @@ float SBF::GetFilterSparsity()
644
644
645
645
// Returns the a-priori false positive probability over the entire filter
646
646
// (i.e. not area-specific)
647
- float SBF::GetFilterAPrioriFpp ()
647
+ float SBF::GetFilterAPrioriFpp () const
648
648
{
649
649
double p;
650
650
@@ -658,7 +658,7 @@ float SBF::GetFilterAPrioriFpp()
658
658
659
659
// Returns the a-posteriori false positive probability over the entire filter
660
660
// (i.e. not area-specific)
661
- float SBF::GetFilterFpp ()
661
+ float SBF::GetFilterFpp () const
662
662
{
663
663
double p;
664
664
int c = 0 ;
@@ -675,7 +675,7 @@ float SBF::GetFilterFpp()
675
675
676
676
677
677
// Returns the expected emersion value for the input area
678
- float SBF::GetExpectedAreaEmersion (int area)
678
+ float SBF::GetExpectedAreaEmersion (int area) const
679
679
{
680
680
double p;
681
681
int nfill = 0 ;
@@ -692,7 +692,7 @@ float SBF::GetExpectedAreaEmersion(int area)
692
692
693
693
694
694
// Returns the emersion value for the input area
695
- float SBF::GetAreaEmersion (int area)
695
+ float SBF::GetAreaEmersion (int area) const
696
696
{
697
697
float ret, a, b;
698
698
if ((this ->AREA_members [area]==0 ) || (this ->HASH_number ==0 )) ret = -1 ;
0 commit comments