LTI-Lib latest version v1.9 - last update 10 Apr 2010

lti::kdTree< T, D, U >::element Class Reference

At the leave nodes, a list of elements of this type will contain the points and their corresponding data. More...

#include <ltiKdTree.h>

Inheritance diagram for lti::kdTree< T, D, U >::element:
Inheritance graph
[legend]
Collaboration diagram for lti::kdTree< T, D, U >::element:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 element ()
 element (const T &pos, const D &dat)
 element (const element &other)
 ~element ()
value_typeoperator[] (const int a)
const value_typeoperator[] (const int a) const
int size () const
elementcopy (const element &other)
elementoperator= (const element &other)
elementclone () const
virtual bool read (ioHandler &handler, const bool complete=true)
virtual bool write (ioHandler &handler, const bool complete=true) const

Public Attributes

point
data

Detailed Description

template<class T, class D = int, class U = l2SquareDistantor<T>>
class lti::kdTree< T, D, U >::element

At the leave nodes, a list of elements of this type will contain the points and their corresponding data.

Implementation must be here due to MS VC++ bug


Constructor & Destructor Documentation

template<class T, class D = int, class U = l2SquareDistantor<T>>
lti::kdTree< T, D, U >::element::element (  )  [inline]

Constructor.

Referenced by lti::kdTree< T, D, U >::element::clone().

template<class T, class D = int, class U = l2SquareDistantor<T>>
lti::kdTree< T, D, U >::element::element ( const T &  pos,
const D &  dat 
) [inline]

Constructor.

Parameters:
pos n-dimensional vector position of this element
dat data contained in this element
template<class T, class D = int, class U = l2SquareDistantor<T>>
lti::kdTree< T, D, U >::element::element ( const element other  )  [inline]

Copy constructor.

template<class T, class D = int, class U = l2SquareDistantor<T>>
lti::kdTree< T, D, U >::element::~element (  )  [inline]

destructor


Member Function Documentation

template<class T, class D = int, class U = l2SquareDistantor<T>>
element* lti::kdTree< T, D, U >::element::clone (  )  const [inline]
template<class T, class D = int, class U = l2SquareDistantor<T>>
element& lti::kdTree< T, D, U >::element::copy ( const element other  )  [inline]
template<class T, class D = int, class U = l2SquareDistantor<T>>
element& lti::kdTree< T, D, U >::element::operator= ( const element other  )  [inline]

copy operator

Reimplemented from lti::ioObject.

References lti::kdTree< T, D, U >::element::copy().

template<class T, class D = int, class U = l2SquareDistantor<T>>
const value_type& lti::kdTree< T, D, U >::element::operator[] ( const int  a  )  const [inline]

shortcut to access the point value at each dimension

template<class T, class D = int, class U = l2SquareDistantor<T>>
value_type& lti::kdTree< T, D, U >::element::operator[] ( const int  a  )  [inline]

shortcut to access the point value at each dimension

template<class T, class D = int, class U = l2SquareDistantor<T>>
virtual bool lti::kdTree< T, D, U >::element::read ( ioHandler handler,
const bool  complete = true 
) [inline, virtual]

read the parameters from the given ioHandler

Parameters:
handler the ioHandler to be used
complete if true (the default) the enclosing begin/end will be also read, otherwise only the data block will be read.
Returns:
true if write was successful

Reimplemented from lti::ioObject.

References lti::kdTree< T, D, U >::element::data, lti::ioHandler::readBegin(), lti::ioHandler::readDataSeparator(), and lti::ioHandler::readEnd().

Referenced by lti::kdTree< T, D, U >::node::read().

template<class T, class D = int, class U = l2SquareDistantor<T>>
int lti::kdTree< T, D, U >::element::size (  )  const [inline]

shortcut to access the size of the points stored

template<class T, class D = int, class U = l2SquareDistantor<T>>
virtual bool lti::kdTree< T, D, U >::element::write ( ioHandler handler,
const bool  complete = true 
) const [inline, virtual]

write the parameters in the given ioHandler

Parameters:
handler the ioHandler to be used
complete if true (the default) the enclosing begin/end will be also written, otherwise only the data block will be written.
Returns:
true if write was successful

Reimplemented from lti::ioObject.

References lti::kdTree< T, D, U >::element::data, lti::ioHandler::writeBegin(), lti::ioHandler::writeDataSeparator(), and lti::ioHandler::writeEnd().


Member Data Documentation

template<class T, class D = int, class U = l2SquareDistantor<T>>
D lti::kdTree< T, D, U >::element::data
template<class T, class D = int, class U = l2SquareDistantor<T>>
T lti::kdTree< T, D, U >::element::point

n-dimensional point representing the position of this element in the n-dimensional space

Referenced by lti::kdTree< T, D, U >::element::copy().


The documentation for this class was generated from the following file:

Generated on Sat Apr 10 15:28:26 2010 for LTI-Lib by Doxygen 1.6.1