Exemplo n.º 1
0
 public Node this[CountType Index]
 {
     get
     {
         return(ParentTree.LocateNodeAtPosition(GetItemPosition(Index)));
     }
 }
Exemplo n.º 2
0
 internal Range(RedBlackTreeWithStats <TElement> ParentTree, Node RangeStartNode, Node RangeEndNode, CountType RangeStartPosition = -1, CountType RangeEndPosition = -1)
 {
     this.ParentTree = ParentTree;
     if (RangeStartNode == null)
     {
         RangeStartNode = ParentTree.LocateNodeAtPosition(RangeStartPosition);
     }
     if (RangeEndNode == null)
     {
         RangeEndNode = ParentTree.LocateNodeAtPosition(RangeEndPosition);
     }
     if (RangeStartNode == null || RangeEndNode == null)
     {
         RangeStartNode     = RangeEndNode = ParentTree.BaseRootNode;
         RangeStartPosition = -1;
         RangeEndPosition   = -1;
     }
     this.RangeStartNode     = RangeStartNode;
     this.RangeEndNode       = RangeEndNode;
     this.RangeStartPosition = RangeStartPosition;
     this.RangeEndPosition   = RangeEndPosition;
 }