Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
HashParameters Namespace Reference

Functions

int nextPrimeIndex (unsigned long n)
 
int prevPrimeIndex (unsigned long n)
 

Variables

const unsigned int numPrimes = 28
 
const unsigned long primeList []
 
const unsigned int DefaultIndex = 0
 
const unsigned long DefaultPrime = primeList[DefaultIndex]
 

Function Documentation

◆ nextPrimeIndex()

int HashParameters::nextPrimeIndex ( unsigned long  n)
inline

Definition at line 65 of file hashPars.H.

References numPrimes, and primeList.

◆ prevPrimeIndex()

int HashParameters::prevPrimeIndex ( unsigned long  n)
inline

Definition at line 79 of file hashPars.H.

References numPrimes, and primeList.

Variable Documentation

◆ DefaultIndex

const unsigned int HashParameters::DefaultIndex = 0

Definition at line 56 of file hashPars.H.

◆ DefaultPrime

const unsigned long HashParameters::DefaultPrime = primeList[DefaultIndex]

Definition at line 58 of file hashPars.H.

◆ numPrimes

const unsigned int HashParameters::numPrimes = 28

Definition at line 44 of file hashPars.H.

Referenced by nextPrimeIndex(), and prevPrimeIndex().

◆ primeList

const unsigned long HashParameters::primeList[]
Initial value:
=
{
53, 97, 193, 389, 769,
1543, 3079, 6151, 12289, 24593,
49157, 98317, 196613, 393241, 786433,
1572869, 3145739, 6291469, 12582917, 25165843,
50331653, 100663319, 201326611, 402653189, 805306457,
1610612741, 3221225473UL, 4294967291UL
}

Definition at line 46 of file hashPars.H.

Referenced by nextPrimeIndex(), and prevPrimeIndex().