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 } }
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); }
public Leaf(Bspt <T> parent) { this.parent = parent; count = 0; tuples = new T[LeafCount]; }
public void TestBspt() { var bspt = new Bspt <ITupleAtom>(3); Assert.IsNotNull(bspt); }
public void TestToString() { var bspt = new Bspt <ITupleAtom>(3); Assert.IsNotNull(bspt.ToString()); }