Exemplo 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);
        }
Exemplo n.º 2
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)));
        }