예제 #1
0
        public override void Insert(IEnumerable <T> value, string id)
        {
            var node = root;
            int i    = 0;

            foreach (var item in value)
            {
                var child = node[item];

                if (child == null)
                {
                    child = node[item] = new AaNode <T>(item, i, node);
                }

                node = child;
                i++;
            }

            node.AddValue(id);
        }
예제 #2
0
 public AaNode(T c, int depth, AaNode <T> parent)
 {
     Word   = c;
     Depth  = depth;
     Parent = parent;
 }