public bool CheckWord(string word) { if (instance == null) { GetBloomList(); } int calculateHash = new StringHashStrategy1().CalculateHash(word, ARRAY_SIZE); return instance[calculateHash]; }
public bool CheckWord(string word) { if (instance == null) { GetBloomList(); } int calculateHash = new StringHashStrategy1().CalculateHash(word, ARRAY_SIZE); return(instance[calculateHash]); }
public void GetBloomList() { if (instance != null) { return; } instance = new bool[ARRAY_SIZE]; foreach (string word in WordListImporter.GetWordList().AsParallel()) { int calculateHash = new StringHashStrategy1().CalculateHash(word, ARRAY_SIZE); instance[calculateHash] = true; } }