private RootwardNode() { this.Parent = this; this.SiblingOfChild = LeafwardNode.Nil; this.Data = null; this.IsRed = false; }
public ZipperNode(KeyVal content, bool isRed, LeafwardNode left, LeafwardNode right, RootwardNode parent, Func <TAggregate, TKey, TVal, TAggregate, TAggregate> aggregator) { this.Data = content; this.IsRed = isRed; this.Left = left; this.Right = right; this.Parent = parent; this.Aggregator = aggregator; }
public ZipperNode(Func <TAggregate, TKey, TVal, TAggregate, TAggregate> aggregator) { this.Left = LeafwardNode.Nil; this.Right = LeafwardNode.Nil; this.Parent = RootwardNode.Nil; this.Data = null; this.IsRed = false; this.Aggregator = aggregator; }
public RootwardNode(KeyVal data, bool isRed, RootwardNode parent, LeafwardNode siblingOfChild, bool isLeft) { if (data == null) { throw new ArgumentNullException("data"); } if (parent == null) { throw new ArgumentNullException("parent"); } if (siblingOfChild == null) { throw new ArgumentNullException("siblingOfChild"); } this.Data = data; this.Parent = parent; this.SiblingOfChild = siblingOfChild; this.IsChildOnLeft = isLeft; this.IsRed = isRed; }
public ZipperNode ColoredLike(RootwardNode other) { return(new ZipperNode(this.Data, other.IsRed, this.Left, this.Right, this.Parent, Aggregator)); }
public ZipperNode WithParent(RootwardNode newParent) { return(new ZipperNode(Data, IsRed, Left, Right, newParent, Aggregator)); }
public static ZipperNode From(RootwardNode parent, KeyVal content, bool isRed, LeafwardNode c1, LeafwardNode c2, bool c1IsLeft, Func <TAggregate, TKey, TVal, TAggregate, TAggregate> aggregator) { return(new ZipperNode(content, isRed, c1IsLeft ? c1 : c2, c1IsLeft ? c2 : c1, parent, aggregator)); }