#include <NearestNeighbors.h>
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, Position > | MinimumPair |
typedef std::vector< MinimumPair > | MinimumSet |
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_t > | operator() (const Center &inputCentering, const FieldOffsetList_t &fieldOffsetList, const Center &outputCentering) |
Return the nearest neighbors for multiple output positions, specified by a FieldOffsetList. |
typedef FieldOffset<Dim> NearestNeighborClass< Dim, IntraCellOnly >::FieldOffset_t |
typedef FieldOffsetList<Dim> NearestNeighborClass< Dim, IntraCellOnly >::FieldOffsetList_t |
typedef std::vector<FieldOffset_t> NearestNeighborClass< Dim, IntraCellOnly >::FieldOffset_vt |
typedef std::vector<FieldOffsetList_t> NearestNeighborClass< Dim, IntraCellOnly >::Answer_t |
typedef Centering<Dim> NearestNeighborClass< Dim, IntraCellOnly >::Center |
typedef Center::Positions NearestNeighborClass< Dim, IntraCellOnly >::Positions |
typedef Center::Position NearestNeighborClass< Dim, IntraCellOnly >::Position |
typedef std::pair<int, Position> NearestNeighborClass< Dim, IntraCellOnly >::MinimumPair |
typedef std::vector<MinimumPair> NearestNeighborClass< Dim, IntraCellOnly >::MinimumSet |
NearestNeighborClass< Dim, IntraCellOnly >::NearestNeighborClass | ( | ) | [inline] |
The constructor performs no work.
The function operators do all the work.
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().
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().
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().