/// <summary> /// Construct double array trie which is equivalent to input trie /// </summary> /// <param name="trie">normal trie, which contains all dictionary words</param> public void Build(Trie trie) { ProgressLog.Begin("building " + (Compact ? "compact" : "sparse") + " trie"); BaseBuffer = new int[BaseCheckInitialSize]; BaseBuffer[0] = 1; CheckBuffer = new int[BaseCheckInitialSize]; TailBuffer = new char[TailInitialSize]; Add(-1, 0, trie.Root); ReportUtilizationRate(); ProgressLog.End(); }