Example #1
0
        public override FTree <T> Push_Front(T t)
        {
            if (frontDig.digNodes.Count == 4)
            {
                var newFront = new List <T>(frontDig.digNodes);
                newFront.RemoveAt(0);

                return(new DeepFTree <T>(new Digit <T>(t, frontDig.digNodes[0]), innerFT.Push_Front(new Node <T>(newFront)), backDig));
            }
            else
            {
                var newFront = new List <T>(frontDig.digNodes);
                newFront.Insert(0, t);

                return(new DeepFTree <T>(new Digit <T>(newFront), innerFT, backDig));
            }
        }
Example #2
0
 public override FTree <T> Merge(FTree <T> rightFT)
 {
     return(rightFT.Push_Front(theSingle));
 }