Exemple #1
0
        /// <summary>
        /// Remove empty rows from the given Trie and return the newly reduced Trie.
        /// </summary>
        /// <param name="by">the <see cref="Trie"/> to reduce</param>
        /// <returns>the newly reduced Trie</returns>
        public override Trie Reduce(Reduce by)
        {
            List <Trie> h = new List <Trie>();

            foreach (Trie trie in m_tries)
            {
                h.Add(trie.Reduce(by));
            }

            MultiTrie2 m = new MultiTrie2(forward);

            m.m_tries = h;
            return(m);
        }
Exemple #2
0
 /// <summary>
 /// Remove empty rows from the given <see cref="Trie"/> and return the newly reduced <see cref="Trie"/>.
 /// </summary>
 /// <param name="by">the <see cref="Trie"/> to reduce</param>
 /// <returns>newly reduced <see cref="Trie"/></returns>
 public virtual Trie Reduce(Reduce by)
 {
     return(by.Optimize(this));
 }