Exemple #1
0
        public FilterBloom(IParameterConfiguration parameterConfiguration)
        {
            _parameterConfiguration = parameterConfiguration;

            _vector        = new BitArray(_parameterConfiguration.FilterSize);
            _hashFunctions = new List <IFunction>();
            _prime         = CreatorPrime.GetNextPrime(Settings.MaxDataCount);
            GenerateHashFunctions();
        }
Exemple #2
0
        public ParameterConfiguration()
        {
            Modulo      = new[] { 10, 1000, 100000 };
            PrimeNumber = CreatorPrime.GetNextPrime(Settings.MaxDataCount);

            var random = new Random(0);

            A = random.Next(PrimeNumber - 1) + 1;
            B = random.Next(PrimeNumber);
        }