public final class Bspt extends Object
We are working with three dimensions. For the purposes of the Bspt code these dimensions are stored as 0, 1, or 2. Each node of the tree splits along the next dimension, wrapping around to 0.
mySplitDimension = (parentSplitDimension + 1) % 3;A split value is stored in the node. Values which are ≤ splitValue are stored down the left branch. Values which are ≥ splitValue are stored down the right branch. When this happens, the search must proceed down both branches. Planar and crystalline substructures can generate values which are == along one dimension.
To get a good picture in your head, first think about it in one dimension, points on a number line. The tree just partitions the points. Now think about 2 dimensions. The first node of the tree splits the plane into two rectangles along the x dimension. The second level of the tree splits the subplanes (independently) along the y dimension into smaller rectangles. The third level splits along the x dimension. In three dimensions, we are doing the same thing, only working with 3-d boxes.
Three enumerators are provided
Modifier and Type | Class and Description |
---|---|
static interface |
Bspt.Tuple |
Constructor and Description |
---|
Bspt(int dimMax) |
Modifier and Type | Method and Description |
---|---|
void |
addTuple(Bspt.Tuple tuple) |
protected void |
dump() |
protected Enumeration |
enumeration() |
protected org.openscience.cdk.graph.rebond.Bspt.EnumerateSphere |
enumHemiSphere(Bspt.Tuple center,
double distance) |
protected Enumeration |
enumNear(Bspt.Tuple center,
double distance) |
protected org.openscience.cdk.graph.rebond.Bspt.EnumerateSphere |
enumSphere(Bspt.Tuple center,
double distance) |
String |
toString() |
public void addTuple(Bspt.Tuple tuple)
protected void dump()
protected Enumeration enumeration()
protected Enumeration enumNear(Bspt.Tuple center, double distance)
protected org.openscience.cdk.graph.rebond.Bspt.EnumerateSphere enumSphere(Bspt.Tuple center, double distance)
protected org.openscience.cdk.graph.rebond.Bspt.EnumerateSphere enumHemiSphere(Bspt.Tuple center, double distance)
Copyright © 2017. All Rights Reserved.