Exemplo n.º 1
0
 internal Enumerator(TreeList <T> .Enumerator enumerator)
 {
     _enumerator = enumerator;
 }
Exemplo n.º 2
0
 public TreeQueue(int branchingFactor)
 {
     _treeList = new TreeList <T>(branchingFactor);
 }
Exemplo n.º 3
0
 internal Enumerator(TreeList <T> list)
     : this(list, list._root.Span)
 {
 }
Exemplo n.º 4
0
            internal override TreeList <TOutput> .Node ConvertAll <TOutput>(Func <T, TOutput> converter, TreeList <TOutput> .Node convertedNextNode)
            {
                var result = new TreeList <TOutput> .IndexNode(_nodes.Length);

                TreeList <TOutput> .Node convertedNextChild = convertedNextNode?.FirstChild;
                for (int i = _nodeCount - 1; i >= 0; i--)
                {
                    convertedNextChild = _nodes[i].ConvertAll(converter, convertedNextChild);
                    result._nodes[i]   = convertedNextChild;
                }

                Array.Copy(_offsets, result._offsets, _nodeCount);
                result._next      = (TreeList <TOutput> .IndexNode)convertedNextNode;
                result._count     = _count;
                result._nodeCount = _nodeCount;
                return(result);
            }
Exemplo n.º 5
0
 public TreeQueue()
 {
     _treeList = new TreeList <T>();
 }
Exemplo n.º 6
0
 public TreeStack()
 {
     _treeList = new TreeList <T>();
 }
Exemplo n.º 7
0
 public TreeStack(int branchingFactor)
 {
     _treeList = new TreeList <T>(branchingFactor);
 }
Exemplo n.º 8
0
 public SortedTreeList(int branchingFactor, IComparer <T> comparer)
 {
     _comparer = comparer ?? Comparer <T> .Default;
     _treeList = new TreeList <T>(branchingFactor);
 }
Exemplo n.º 9
0
 public SortedTreeList(IComparer <T> comparer)
 {
     _comparer = comparer ?? Comparer <T> .Default;
     _treeList = new TreeList <T>();
 }
Exemplo n.º 10
0
            internal override TreeList <TOutput> .Node ConvertAll <TOutput>(Func <T, TOutput> converter, TreeList <TOutput> .Node convertedNextNode)
            {
                var result = new TreeList <TOutput> .LeafNode(_data.Length);

                for (int i = _count - 1; i >= 0; i--)
                {
                    result._data[i] = converter(_data[i]);
                }

                result._next  = (TreeList <TOutput> .LeafNode)convertedNextNode;
                result._count = _count;
                return(result);
            }
Exemplo n.º 11
0
 internal override TreeList <TOutput> .Node ConvertAll <TOutput>(Func <T, TOutput> converter, TreeList <TOutput> .Node convertedNextNode)
 {
     return(TreeList <TOutput> .Node.Empty);
 }
Exemplo n.º 12
0
 internal abstract TreeList <TOutput> .Node ConvertAll <TOutput>(Func <T, TOutput> converter, TreeList <TOutput> .Node convertedNextNode);