BloomFilter.Add C# (CSharp) Method

Add() public method

public Add ( string str ) : void
str string
return void
    public void Add(string str)
    {
        foreach (var hash in hashes)
        {
        var h = hash.Hash (str) % table.Length;
        table.Set ((int)h, true);
        }
    }

Usage Example

Example #1
0
        public void BloomFilter_DoesNotContain_ShouldDetectUncontained()
        {
            filter.Add("foo");
            filter.Add("bar");

            Assert.IsTrue(filter.DoesNotContain("foobar"));
        }
All Usage Examples Of BloomFilter::Add