예제 #1
0
        public SplitResult <T> SplitNode(Node <T> overflowed, SplitNodeAlgorithm <T> algo)
        {
            SplitResult <T> res = new SplitResult <T>();

            res.n1 = new NonLeaf <T>(this.children.Length);
            res.n2 = new NonLeaf <T>(this.children.Length);
            List <Geometry> list = new List <Geometry>();

            foreach (var e in children)
            {
                list.Add(e);
            }
            list.Add(overflowed);
            algo.Split(list, res);
            return(res);
        }
예제 #2
0
        public SplitResult <T> SplitNode(T overflowed, SplitNodeAlgorithm <T> algo)
        {
            SplitResult <T> res = new SplitResult <T>
            {
                n1 = new Leaf <T>(this.data.Length),
                n2 = new Leaf <T>(this.data.Length)
            };
            List <IGeometry> list = new List <IGeometry>();

            foreach (var e in data)
            {
                list.Add(e);
            }
            list.Add(overflowed);
            algo.Split(list, res);
            return(res);
        }