|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweka.core.neighboursearch.balltrees.BallTreeConstructor
public abstract class BallTreeConstructor
Abstract class for constructing a BallTree .
Constructor Summary | |
---|---|
BallTreeConstructor()
Creates a new instance of BallTreeConstructor. |
Method Summary | |
---|---|
abstract int[] |
addInstance(BallNode node,
Instance inst)
Adds an instance to the ball tree. |
abstract BallNode |
buildTree()
Builds the ball tree. |
java.lang.String |
containChildBallsTipText()
Returns the tip text for this property. |
boolean |
getContainChildBalls()
Gets whether if a parent ball should completely enclose its two child balls. |
int |
getMaxDepth()
Returns the depth of the built tree. |
int |
getMaxInstancesInLeaf()
Returns the maximum number of instances allowed in a leaf. |
double |
getMaxRelativeLeafRadius()
Returns the maximum relative radius of a leaf node. |
int |
getNumLeaves()
Returns the number of leaves in the built tree. |
int |
getNumNodes()
Returns the number of nodes (internal + leaf) in the built tree. |
java.lang.String[] |
getOptions()
Gets the current settings. |
java.lang.String |
getRevision()
Returns the revision string. |
java.util.Enumeration |
listOptions()
Returns an enumeration describing the available options. |
java.lang.String |
maxInstancesInLeafTipText()
Returns the tip text for this property. |
java.lang.String |
maxRelativeLeafRadiusTipText()
Returns the tip text for this property. |
void |
setContainChildBalls(boolean containChildBalls)
Sets whether if a parent ball should completely enclose its two child balls. |
void |
setEuclideanDistanceFunction(EuclideanDistance func)
Sets the distance function to use to build the tree. |
void |
setInstanceList(int[] instList)
Sets the master index array that points to instances in m_Instances, so that only this array is manipulated, and m_Instances is left untouched. |
void |
setInstances(Instances inst)
Sets the instances on which the tree is to be built. |
void |
setMaxInstancesInLeaf(int num)
Sets the maximum number of instances allowed in a leaf. |
void |
setMaxRelativeLeafRadius(double radius)
Sets the maximum relative radius, allowed for a leaf node. |
void |
setOptions(java.lang.String[] options)
Parses a given list of options. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BallTreeConstructor()
Method Detail |
---|
public abstract BallNode buildTree() throws java.lang.Exception
java.lang.Exception
- If there is problem building
the tree.public abstract int[] addInstance(BallNode node, Instance inst) throws java.lang.Exception
node
- The root node of the tree.inst
- The instance to add to the tree.
java.lang.Exception
- If there is some problem adding
the given instance to the tree.public java.lang.String maxInstancesInLeafTipText()
public int getMaxInstancesInLeaf()
public void setMaxInstancesInLeaf(int num) throws java.lang.Exception
num
- The maximum number of instances allowed in
a leaf.
java.lang.Exception
- If the num is < 1.public java.lang.String maxRelativeLeafRadiusTipText()
public double getMaxRelativeLeafRadius()
public void setMaxRelativeLeafRadius(double radius) throws java.lang.Exception
radius
- The maximum relative radius allowed for a leaf.
java.lang.Exception
- If radius is < 0.0.public java.lang.String containChildBallsTipText()
public boolean getContainChildBalls()
public void setContainChildBalls(boolean containChildBalls)
containChildBalls
- Should be tree if parent ball
is to enclose its child balls.public void setInstances(Instances inst)
inst
- The instances on which to build the
ball tree.public void setInstanceList(int[] instList)
instList
- The master index array.public void setEuclideanDistanceFunction(EuclideanDistance func)
func
- The distance function.public int getNumNodes()
public int getNumLeaves()
public int getMaxDepth()
public java.util.Enumeration listOptions()
listOptions
in interface OptionHandler
public void setOptions(java.lang.String[] options) throws java.lang.Exception
setOptions
in interface OptionHandler
options
- the list of options as an array of strings
java.lang.Exception
- if an option is not supportedpublic java.lang.String[] getOptions()
getOptions
in interface OptionHandler
public java.lang.String getRevision()
getRevision
in interface RevisionHandler
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |