PartitionTreeNode Class Reference

Inheritance diagram for PartitionTreeNode:

Inheritance graph
[legend]

List of all members.


Detailed Description

Node of a spatial partition tree.

Author:
Lawrence Murray <lawrence@indii.org>
Version:
Rev
Date:
Date

Serialization

This class supports serialization through the Boost.Serialization library.

Definition at line 23 of file PartitionTreeNode.hpp.


Public Member Functions

 PartitionTreeNode ()
 Constructor.
 PartitionTreeNode (const unsigned int i, const unsigned int depth)
 Constructor for leaf node.
 PartitionTreeNode (const std::vector< unsigned int > &is, const unsigned int depth)
 Constructor for prune node.
 PartitionTreeNode (PartitionTreeNode *left, PartitionTreeNode *right, const unsigned int depth)
 Constructor for internal node.
 PartitionTreeNode (const PartitionTreeNode &o)
 Copy constructor.
virtual ~PartitionTreeNode ()
 Destructor.
PartitionTreeNodeoperator= (const PartitionTreeNode &o)
 Assignment operator.
virtual
PartitionTreeNode
clone () const =0
 Clone node.
unsigned int getDepth () const
 Get the depth of the node in its tree.
bool isLeaf () const
 Is the node a leaf node?
bool isPrune () const
 Is the node a pruned node?
bool isInternal () const
 Is the node an internal node?
unsigned int getSize () const
 Get the number of components encompassed by the node.
unsigned int getIndex () const
 Get the component index of a leaf node.
const std::vector
< unsigned int > & 
getIndices () const
 Get the component indices of a pruned node.
PartitionTreeNodegetLeft ()
 Get the left child of the node.
PartitionTreeNodegetRight ()
 Get the right child of the node.
virtual void difference (const vector &x, vector &result) const =0
 Find the coordinate difference of the node from a single point.
virtual void difference (const PartitionTreeNode &node, vector &result) const =0
 Find the coordinate difference of the node from another node.

Constructor & Destructor Documentation

PartitionTreeNode (  ) 

Constructor.

This should generally only be used when the object is to be restored from a serialization.

Definition at line 5 of file PartitionTreeNode.cpp.

PartitionTreeNode ( const unsigned int  i,
const unsigned int  depth 
)

Constructor for leaf node.

Parameters:
i Index of component in the weighted sample set.
depth Depth of the node in that tree.

Definition at line 9 of file PartitionTreeNode.cpp.

PartitionTreeNode ( const std::vector< unsigned int > &  is,
const unsigned int  depth 
)

Constructor for prune node.

Parameters:
is Indices of components in the weighted sample set.
depth Depth of the node in that tree.

Definition at line 16 of file PartitionTreeNode.cpp.

PartitionTreeNode ( PartitionTreeNode left,
PartitionTreeNode right,
const unsigned int  depth 
)

Constructor for internal node.

Parameters:
left Left child node. Caller releases ownership.
right Right child node. Caller releases ownership.
depth Depth of the node in that tree.

Definition at line 24 of file PartitionTreeNode.cpp.

PartitionTreeNode ( const PartitionTreeNode o  ) 

Copy constructor.

Definition at line 32 of file PartitionTreeNode.cpp.

~PartitionTreeNode (  )  [virtual]

Destructor.

Definition at line 54 of file PartitionTreeNode.cpp.


Member Function Documentation

PartitionTreeNode & operator= ( const PartitionTreeNode o  ) 

Assignment operator.

Definition at line 59 of file PartitionTreeNode.cpp.

virtual PartitionTreeNode* clone (  )  const [pure virtual]

Clone node.

Returns:
Clone of node. Caller has ownership.

Implemented in KDTreeNode.

unsigned int getDepth (  )  const [inline]

Get the depth of the node in its tree.

Returns:
The depth of the node.

Definition at line 262 of file PartitionTreeNode.hpp.

bool isLeaf (  )  const [inline]

Is the node a leaf node?

Returns:
True if the node is a leaf node, false otherwise.

Definition at line 270 of file PartitionTreeNode.hpp.

bool isPrune (  )  const [inline]

Is the node a pruned node?

Returns:
True if the node is a pruned node, false otherwise.

Definition at line 274 of file PartitionTreeNode.hpp.

bool isInternal (  )  const [inline]

Is the node an internal node?

Returns:
True if the node is an internal node, false otherwise.

Definition at line 278 of file PartitionTreeNode.hpp.

unsigned int getSize (  )  const [inline]

Get the number of components encompassed by the node.

Returns:
The number of components encompassed by the node.

Definition at line 266 of file PartitionTreeNode.hpp.

unsigned int getIndex (  )  const [inline]

Get the component index of a leaf node.

Returns:
The component index, if a leaf node.

Definition at line 240 of file PartitionTreeNode.hpp.

const std::vector< unsigned int > & getIndices (  )  const [inline]

Get the component indices of a pruned node.

Returns:
The component indices, if a pruned node.

Definition at line 248 of file PartitionTreeNode.hpp.

indii::ml::aux::PartitionTreeNode * getLeft (  )  [inline]

Get the left child of the node.

Returns:
The left child of an internal node.

Definition at line 253 of file PartitionTreeNode.hpp.

indii::ml::aux::PartitionTreeNode * getRight (  )  [inline]

Get the right child of the node.

Returns:
The right child of an internal node.

Definition at line 258 of file PartitionTreeNode.hpp.

virtual void difference ( const vector x,
vector result 
) const [pure virtual]

Find the coordinate difference of the node from a single point.

Parameters:
x Query point.
result After return, difference between the query point and the nearest point within the volume contained by the node.
Note that the difference may contain negative values. Usually a norm would subsequently be applied to obtain a scalar distance.

Implemented in KDTreeNode.

virtual void difference ( const PartitionTreeNode node,
vector result 
) const [pure virtual]

Find the coordinate difference of the node from another node.

Parameters:
node Query node.
result After return, difference between the closest two points in the volumes contained by the nodes.
Note that the difference may contain negative values. Usually a norm would subsequently be applied to obtain a scalar distance.

Implemented in KDTreeNode.


Generated on Wed Dec 17 15:11:58 2008 for dysii Dynamical Systems Library by  doxygen 1.5.3