KDTreeNode Class Reference

Inheritance diagram for KDTreeNode:

Inheritance graph
[legend]

List of all members.


Detailed Description

Node of a $kd$ tree.

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

Serialization

This class supports serialization through the Boost.Serialization library.

Definition at line 24 of file KDTreeNode.hpp.


Public Member Functions

 KDTreeNode ()
 Default constructor.
 KDTreeNode (DiracMixturePdf *p, unsigned int i, unsigned int depth)
 Construct leaf node.
 KDTreeNode (DiracMixturePdf *p, const std::vector< unsigned int > &is, const unsigned int depth)
 Construct prune node.
 KDTreeNode (KDTreeNode *left, KDTreeNode *right, const unsigned int depth)
 Construct internal node.
 KDTreeNode (const KDTreeNode &o)
 Copy constructor.
virtual ~KDTreeNode ()
 Destructor.
KDTreeNodeoperator= (const KDTreeNode &o)
 Assignment operator.
virtual
PartitionTreeNode
clone () const
 Clone node.
const vectorgetLower () const
 Get lower bound on the node.
const vectorgetUpper () const
 Get upper bound on the node.
virtual void difference (const vector &x, vector &result) const
 Find the coordinate difference of the node from a single point.
virtual void difference (const PartitionTreeNode &node, vector &result) const
 Find the coordinate difference of the node from another node.

Constructor & Destructor Documentation

KDTreeNode (  ) 

Default constructor.

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

Definition at line 5 of file KDTreeNode.cpp.

KDTreeNode ( DiracMixturePdf p,
unsigned int  i,
unsigned int  depth 
)

Construct leaf node.

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

Definition at line 10 of file KDTreeNode.cpp.

KDTreeNode ( DiracMixturePdf p,
const std::vector< unsigned int > &  is,
const unsigned int  depth 
)

Construct prune node.

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

Definition at line 18 of file KDTreeNode.cpp.

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

Construct internal node.

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

Definition at line 49 of file KDTreeNode.cpp.

KDTreeNode ( const KDTreeNode o  ) 

Copy constructor.

Definition at line 118 of file KDTreeNode.cpp.

~KDTreeNode (  )  [virtual]

Destructor.

Definition at line 213 of file KDTreeNode.cpp.


Member Function Documentation

KDTreeNode & operator= ( const KDTreeNode o  ) 

Assignment operator.

Definition at line 159 of file KDTreeNode.cpp.

PartitionTreeNode * clone (  )  const [virtual]

Clone node.

Returns:
Clone of node. Caller has ownership.

Implements PartitionTreeNode.

Definition at line 224 of file KDTreeNode.cpp.

const indii::ml::aux::vector * getLower (  )  const [inline]

Get lower bound on the node.

Definition at line 157 of file KDTreeNode.hpp.

const indii::ml::aux::vector * getUpper (  )  const [inline]

Get upper bound on the node.

Definition at line 162 of file KDTreeNode.hpp.

void difference ( const vector x,
vector result 
) const [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.

Implements PartitionTreeNode.

Definition at line 238 of file KDTreeNode.cpp.

void difference ( const PartitionTreeNode node,
vector result 
) const [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.

Implements PartitionTreeNode.

Definition at line 263 of file KDTreeNode.cpp.


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