User Manual, Developers Guide and API Documentation

wns::NearestNeighbour< T, N > Class Template Reference

N-dimensional Nearest Neighbour Interpolation. More...

#include <NearestNeighbour.hpp>

Inheritance diagram for wns::NearestNeighbour< T, N >:

Inheritance graph
[legend]
Collaboration diagram for wns::NearestNeighbour< T, N >:

Collaboration graph
[legend]

List of all members.

Public Types

typedef const HyperplaneTypeConstReference
 Constant reference to hyperplanes.
typedef SuperType::CoordType CoordType
 Type of coordinates used in this class.
typedef
SuperType::DiscreteContainer 
DiscreteContainer
 Type of the container that contains the discrete (uninterpolated) values.
typedef NearestNeighbour< T, N-1 > HyperplaneType
 Type of the hyperplanes.
typedef SuperType::SizeType SizeType
 Type of sizes used in this class.

Public Member Functions

 NearestNeighbour (const DiscreteContainer &discreteValues)
 Construct a NearestNeighbour interpolation object that interpolates over discreteValues.
virtual ConstReference operator[] (const CoordType &coord) const
 Select the nearest neighbour of coord.

Private Types

typedef std::vector
< HyperplaneType
HyperplaneContainer
typedef Interpolation< T, N > SuperType
 We inherit from this class.

Private Attributes

HyperplaneContainer hyperplanes


Detailed Description

template<typename T, InterpolationDefs::SizeType N>
class wns::NearestNeighbour< T, N >

Parameters:
T Type of the values to interpolate over.
N Number of dimensions.
Nearest Neighbour Interpolation is basically no interpolation at all. For a given floating point coordinate it selects the nearest integer coordinate. Say nn is a NearestNeighbour<T, 1> object and oc is the MultiReadAccessible<T, 1> we interpolate over, then nn[2.4] == oc[2] and nn[2.5] == oc[3].

Definition at line 51 of file NearestNeighbour.hpp.


Member Typedef Documentation

template<typename T, InterpolationDefs::SizeType N>
typedef const HyperplaneType& wns::NearestNeighbour< T, N >::ConstReference

Reimplemented from wns::container::MultiReadAccessible< T, N, R, I >.

Definition at line 83 of file NearestNeighbour.hpp.

template<typename T, InterpolationDefs::SizeType N>
typedef SuperType::CoordType wns::NearestNeighbour< T, N >::CoordType

Reimplemented from wns::Interpolation< T, N >.

Definition at line 67 of file NearestNeighbour.hpp.

template<typename T, InterpolationDefs::SizeType N>
typedef SuperType::DiscreteContainer wns::NearestNeighbour< T, N >::DiscreteContainer

Reimplemented from wns::Interpolation< T, N >.

Definition at line 73 of file NearestNeighbour.hpp.

template<typename T, InterpolationDefs::SizeType N>
typedef std::vector<HyperplaneType> wns::NearestNeighbour< T, N >::HyperplaneContainer [private]

Definition at line 114 of file NearestNeighbour.hpp.

template<typename T, InterpolationDefs::SizeType N>
typedef NearestNeighbour<T, N-1> wns::NearestNeighbour< T, N >::HyperplaneType

Definition at line 78 of file NearestNeighbour.hpp.

template<typename T, InterpolationDefs::SizeType N>
typedef SuperType::SizeType wns::NearestNeighbour< T, N >::SizeType

Reimplemented from wns::Interpolation< T, N >.

Definition at line 62 of file NearestNeighbour.hpp.

template<typename T, InterpolationDefs::SizeType N>
typedef Interpolation<T, N> wns::NearestNeighbour< T, N >::SuperType [private]

Reimplemented from wns::Interpolation< T, N >.

Definition at line 57 of file NearestNeighbour.hpp.


Constructor & Destructor Documentation

template<typename T, InterpolationDefs::SizeType N>
wns::NearestNeighbour< T, N >::NearestNeighbour ( const DiscreteContainer discreteValues  )  [inline]

Parameters:
discreteValues (in) Container that contains the values which we interpolate over.

Definition at line 92 of file NearestNeighbour.hpp.


Member Function Documentation

template<typename T, InterpolationDefs::SizeType N>
virtual ConstReference wns::NearestNeighbour< T, N >::operator[] ( const CoordType coord  )  const [inline, virtual]

Returns a const reference to the hyperplane specified by coord.

Definition at line 107 of file NearestNeighbour.hpp.


Member Data Documentation

template<typename T, InterpolationDefs::SizeType N>
HyperplaneContainer wns::NearestNeighbour< T, N >::hyperplanes [private]

Definition at line 116 of file NearestNeighbour.hpp.


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

Generated on Sat May 26 03:32:50 2012 for openWNS by  doxygen 1.5.5