org.jmol.bspt

Class Node

class Node extends Element

Nodes of the bspt. It is a binary tree so nodes contain two children, called left and right. Nodes split along one dimension. The instance variable dim holds the dimension along which this node is split. Each child holds the minimum and maximum values for its subtree when split along the specified dim.

The current implementation allows for the case where the maximum left value is == the minimum right value. This can happen when the tree is filled with coordinate values that contain the same value along one dimension ... as with very regular crystals

The tree is not kept balanced.

Author: Miguel, miguel@jmol.org

Field Summary
intdim
ElementeleLeft
ElementeleRight
floatmaxLeft
floatmaxRight
floatminLeft
floatminRight
Constructor Summary
Node(Bspt bspt, int level, Leaf leafLeft)
Method Summary
ElementaddTuple(int level, Point3f tuple)
static floatgetDimensionValue(Point3f pt, int dim)

Field Detail

dim

int dim

eleLeft

Element eleLeft

eleRight

Element eleRight

maxLeft

float maxLeft

maxRight

float maxRight

minLeft

float minLeft

minRight

float minRight

Constructor Detail

Node

Node(Bspt bspt, int level, Leaf leafLeft)

Method Detail

addTuple

Element addTuple(int level, Point3f tuple)

getDimensionValue

static float getDimensionValue(Point3f pt, int dim)