Esempio n. 1
0
        public override ViewR <CompElement <T>, double> RightView()
        {
            ViewR <CompElement <T>, double> internRView = _treeRep.RightView();

            internRView.ftInit = new PriorityQueue <T>(internRView.ftInit);

            return(internRView);
        }
Esempio n. 2
0
        public override IEnumerable <T> ToSequenceR()
        {
            ViewR <T> rView = RightView();

            yield return(rView.last);

            foreach (T t in rView.ftInit.ToSequenceR())
            {
                yield return(t);
            }
        }
Esempio n. 3
0
        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)));
        }