Esempio n. 1
0
 /// <summary>
 /// 用于创建非根节点的构造函数
 /// </summary>
 /// <param name="root">Trie 的根</param>
 public BasicTrieNode(BasicTrieNode <TChar> root, TChar charOfNode)
 {
     this.root  = root;
     Children   = new BasicTrieChildren <TChar>(this);
     Fail       = root;
     CharOfNode = charOfNode;
 }
Esempio n. 2
0
 /// <summary>
 /// 用于创建根节点的构造函数
 /// </summary>
 public BasicTrieNode()
 {
     root       = this;
     Children   = new BasicTrieChildren <TChar>(this);
     Fail       = root;
     CharOfNode = default;
 }