NearestNeighborClass< Dim, IntraCellOnly > Class Template Reference

This class implements the work of nearestNeighbors(). More...

#include <NearestNeighbors.h>

List of all members.

Classes

struct  CompareFieldOffset
 Specify a partial order for FieldOffsets to use when removing duplicates.
struct  EqualFieldOffset
 Specify an equality operator for FieldOffsets to use when removing duplicates.
struct  Manhattan
 Given a difference between two positions in logical coordinate space, return the Manhattan norm distance not taking into account that input values are repeated in every grid cell.
struct  ManhattanGrid
 Given a difference between two positions in logical coordinate space, return the Manhattan norm distance taking into account that input values are repeated in every grid cell.

Public Types

typedef FieldOffset< Dim > FieldOffset_t
typedef FieldOffsetList< Dim > FieldOffsetList_t
typedef std::vector
< FieldOffset_t
FieldOffset_vt
typedef std::vector
< FieldOffsetList_t
Answer_t
typedef Centering< Dim > Center
typedef Center::Positions Positions
typedef Center::Position Position
typedef std::pair< int, PositionMinimumPair
typedef std::vector< MinimumPairMinimumSet

Public Member Functions

 NearestNeighborClass ()
 The constructor performs no work.
Answer_t operator() (const Center &inputCentering, const Center &outputCentering)
 Return nearest neighbors for all value in an output centering.
FieldOffsetList_t operator() (const Center &inputCentering, const FieldOffset_t &fieldOffset, const Center &outputCentering)
 Return the nearest neighbors for one output position, specified by a FieldOffset.
std::vector< FieldOffsetList_toperator() (const Center &inputCentering, const FieldOffsetList_t &fieldOffsetList, const Center &outputCentering)
 Return the nearest neighbors for multiple output positions, specified by a FieldOffsetList.


Detailed Description

template<int Dim, bool IntraCellOnly = false>
class NearestNeighborClass< Dim, IntraCellOnly >

This class implements the work of nearestNeighbors().

Member Typedef Documentation

template<int Dim, bool IntraCellOnly = false>
typedef FieldOffset<Dim> NearestNeighborClass< Dim, IntraCellOnly >::FieldOffset_t

template<int Dim, bool IntraCellOnly = false>
typedef FieldOffsetList<Dim> NearestNeighborClass< Dim, IntraCellOnly >::FieldOffsetList_t

template<int Dim, bool IntraCellOnly = false>
typedef std::vector<FieldOffset_t> NearestNeighborClass< Dim, IntraCellOnly >::FieldOffset_vt

template<int Dim, bool IntraCellOnly = false>
typedef std::vector<FieldOffsetList_t> NearestNeighborClass< Dim, IntraCellOnly >::Answer_t

template<int Dim, bool IntraCellOnly = false>
typedef Centering<Dim> NearestNeighborClass< Dim, IntraCellOnly >::Center

template<int Dim, bool IntraCellOnly = false>
typedef Center::Positions NearestNeighborClass< Dim, IntraCellOnly >::Positions

template<int Dim, bool IntraCellOnly = false>
typedef Center::Position NearestNeighborClass< Dim, IntraCellOnly >::Position

template<int Dim, bool IntraCellOnly = false>
typedef std::pair<int, Position> NearestNeighborClass< Dim, IntraCellOnly >::MinimumPair

template<int Dim, bool IntraCellOnly = false>
typedef std::vector<MinimumPair> NearestNeighborClass< Dim, IntraCellOnly >::MinimumSet


Constructor & Destructor Documentation

template<int Dim, bool IntraCellOnly = false>
NearestNeighborClass< Dim, IntraCellOnly >::NearestNeighborClass (  )  [inline]

The constructor performs no work.

The function operators do all the work.


Member Function Documentation

template<int Dim, bool IntraCellOnly = false>
Answer_t NearestNeighborClass< Dim, IntraCellOnly >::operator() ( const Center inputCentering,
const Center outputCentering 
) [inline]

Return nearest neighbors for all value in an output centering.

References PInsist, Centering< Dim >::positions(), and Centering< Dim >::size().

template<int Dim, bool IntraCellOnly = false>
FieldOffsetList_t NearestNeighborClass< Dim, IntraCellOnly >::operator() ( const Center inputCentering,
const FieldOffset_t fieldOffset,
const Center outputCentering 
) [inline]

Return the nearest neighbors for one output position, specified by a FieldOffset.

References PInsist, Centering< Dim >::position(), Centering< Dim >::positions(), Centering< Dim >::size(), and FieldOffset< Dim >::subFieldNumber().

template<int Dim, bool IntraCellOnly = false>
std::vector<FieldOffsetList_t> NearestNeighborClass< Dim, IntraCellOnly >::operator() ( const Center inputCentering,
const FieldOffsetList_t fieldOffsetList,
const Center outputCentering 
) [inline]

Return the nearest neighbors for multiple output positions, specified by a FieldOffsetList.

References PInsist, Centering< Dim >::position(), Centering< Dim >::positions(), FieldOffsetList< Dim >::size(), and Centering< Dim >::size().


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

Generated on Wed Mar 16 06:20:20 2011 for FreePOOMA by  doxygen 1.5.9