public BorNode checkout(char nextSymbol) { int index; //if ('ё' == nextSymbol) { index = (int)'е' - FirstLetter; } index = (int)nextSymbol - FirstLetter; if (nextNodes[index] == null) { nextNodes[index] = new BorNode(); } return(nextNodes[index]); }
public uint getWordNumber(string word, uint number) { BorNode currentNode = rootBor; for (int i = 0; i < word.Length; i++) { currentNode = currentNode.checkout(word[i]); } if (currentNode.isNotEnd) { currentNode.wordNumber = number; currentNode.isNotEnd = false; } return(currentNode.wordNumber); }
public BorTree() { rootBor = new BorNode(); }