Segmenter.Base.Collectors.FrequencyDictionary.Contains C# (CSharp) Method

Contains() public method

Returns true if this FrequencyDictionary contains the specified word. More formally, returns true if and only if this FrequencyDictionary contains at least one word.
public Contains ( List str ) : bool
str List /// word is built from letters /// whose presence in this FrequencyDictionary is to be tested ///
return bool
        public bool Contains(List<string> str)
        {
            return words.ContainsKey(Helper.ToString(str));
        }

Same methods

FrequencyDictionary::Contains ( string str ) : bool

Usage Example

コード例 #1
0
 public void AddTest()
 {
     var alphabet = new FrequencyDictionary();
     var alphabetTest = new FrequencyDictionary(chain);
     string[] words = { "A", "G", "C", "T" };
     int power = 1;
     alphabet.Add(words[0], alphabetTest[words[0]]);
     alphabet.Add(words[0], alphabetTest[words[0]]);
     Assert.True(alphabet.Contains(words[0]) && alphabet.Count == power);
 }
All Usage Examples Of Segmenter.Base.Collectors.FrequencyDictionary::Contains