Пример #1
0
 public Leaf(Bspt <T> parent, Leaf leaf, int dim, double splitValue)
     : this(parent)
 {
     for (int i = LeafCount; --i >= 0;)
     {
         T      tuple = leaf.tuples[i];
         double value = tuple.GetDimValue(dim);
         if (value > splitValue || (value == splitValue && ((i & 1) == 1)))
         {
             leaf.tuples[i]  = default(T);
             tuples[count++] = tuple;
         }
     }
     int dest = 0;
     for (int src = 0; src < LeafCount; ++src)
     {
         if (leaf.tuples[src] != null)
         {
             leaf.tuples[dest++] = leaf.tuples[src];
         }
     }
     leaf.count = dest;
     if (count == 0)
     {
         tuples[LeafCount] = default(T);             // explode
     }
 }
Пример #2
0
            public Node(Bspt <T> parent, int dim, int dimMax, Leaf leafLE)
            {
                this.parent = parent;

                this.eleLE      = leafLE;
                this.dim        = dim;
                this.dimMax     = dimMax;
                this.splitValue = leafLE.GetSplitValue(dim);
                this.eleGE      = new Leaf(parent, leafLE, dim, splitValue);
            }
Пример #3
0
 public Leaf(Bspt <T> parent)
 {
     this.parent = parent;
     count       = 0;
     tuples      = new T[LeafCount];
 }
Пример #4
0
        public void TestBspt()
        {
            var bspt = new Bspt <ITupleAtom>(3);

            Assert.IsNotNull(bspt);
        }
Пример #5
0
        public void TestToString()
        {
            var bspt = new Bspt <ITupleAtom>(3);

            Assert.IsNotNull(bspt.ToString());
        }