public PriorityQueue(IEnumerable <T> items) { foreach (T t in items) { _treeRep = _treeRep.PushBack(new CompElement <T>(t)); } }
public OrderedSequence <T, M> PushBack(OrderedElement <T, M> ordEl) { ViewR <OrderedElement <T, M>, M> viewR = _tree.RightView(); if (viewR != null) { if (viewR.last.Measure() .CompareTo(ordEl.Measure()) > 0) { throw new Exception( "OrderedSequence Error: PushBack() of an element less than the biggest seq el." ); } } //else return(new OrderedSequence <T, M>(_key, _tree.PushBack(ordEl))); }