#include "Domain/Loc.h"
#include "Field/FieldCentering.h"
#include "Field/FieldOffset.h"
#include <vector>
#include <numeric>
#include <utility>
#include <functional>
#include <algorithm>
Classes | |
class | NearestNeighborClass< Dim, IntraCellOnly > |
This class implements the work of nearestNeighbors(). More... | |
struct | NearestNeighborClass< Dim, IntraCellOnly >::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. | |
struct | NearestNeighborClass< Dim, IntraCellOnly >::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 | NearestNeighborClass< Dim, IntraCellOnly >::CompareFieldOffset |
Specify a partial order for FieldOffsets to use when removing duplicates. | |
struct | NearestNeighborClass< Dim, IntraCellOnly >::EqualFieldOffset |
Specify an equality operator for FieldOffsets to use when removing duplicates. | |
Functions | |
template<int Dim> | |
Vector< Dim, double > | inputPosition (const Centering< Dim > &inputCentering, const FieldOffset< Dim > &fieldOffset) |
Given an input centering and a field offset obtained from a nearest neighbor calculation, this function computes the position of the corresponding point in cell logical coordinates. | |
nearestNeighbors() | |
Given input and output centerings, this function computes the "first shell" of nearest neighbors for each output value. That is, for each output value, it computes the FieldOffsetList containing the input values that are closest, with respect to the Manhattan norm (l_1 norm). The FieldOffsetLists are stored in a std::vector in the same order as the output values occur in the output centering.
If only values within the corresponding input cell are desired, specify a third parameter. | |
template<int Dim> | |
std::vector< FieldOffsetList < Dim > > | nearestNeighbors (const Centering< Dim > &inputCentering, const Centering< Dim > &outputCentering) |
template<int Dim> | |
std::vector< FieldOffsetList < Dim > > | nearestNeighbors (const Centering< Dim > &inputCentering, const Centering< Dim > &outputCentering, const bool) |
template<int Dim> | |
std::vector< FieldOffsetList < Dim > > | nearestNeighbors (const Centering< Dim > &inputCentering, const FieldOffsetList< Dim > &fOL, const Centering< Dim > &outputCentering) |
template<int Dim> | |
std::vector< FieldOffsetList < Dim > > | nearestNeighbors (const Centering< Dim > &inputCentering, const FieldOffsetList< Dim > &fOL, const Centering< Dim > &outputCentering, const bool) |
template<int Dim> | |
FieldOffsetList< Dim > | nearestNeighbors (const Centering< Dim > &inputCentering, const FieldOffset< Dim > &fieldOffset, const Centering< Dim > &outputCentering) |
template<int Dim> | |
FieldOffsetList< Dim > | nearestNeighbors (const Centering< Dim > &inputCentering, const FieldOffset< Dim > &fieldOffset, const Centering< Dim > &outputCentering, const bool) |
std::vector<FieldOffsetList<Dim> > nearestNeighbors | ( | const Centering< Dim > & | inputCentering, | |
const Centering< Dim > & | outputCentering | |||
) | [inline] |
std::vector<FieldOffsetList<Dim> > nearestNeighbors | ( | const Centering< Dim > & | inputCentering, | |
const Centering< Dim > & | outputCentering, | |||
const | bool | |||
) | [inline] |
std::vector<FieldOffsetList<Dim> > nearestNeighbors | ( | const Centering< Dim > & | inputCentering, | |
const FieldOffsetList< Dim > & | fOL, | |||
const Centering< Dim > & | outputCentering | |||
) | [inline] |
std::vector<FieldOffsetList<Dim> > nearestNeighbors | ( | const Centering< Dim > & | inputCentering, | |
const FieldOffsetList< Dim > & | fOL, | |||
const Centering< Dim > & | outputCentering, | |||
const | bool | |||
) | [inline] |
FieldOffsetList<Dim> nearestNeighbors | ( | const Centering< Dim > & | inputCentering, | |
const FieldOffset< Dim > & | fieldOffset, | |||
const Centering< Dim > & | outputCentering | |||
) | [inline] |
FieldOffsetList<Dim> nearestNeighbors | ( | const Centering< Dim > & | inputCentering, | |
const FieldOffset< Dim > & | fieldOffset, | |||
const Centering< Dim > & | outputCentering, | |||
const | bool | |||
) | [inline] |
Vector<Dim, double> inputPosition | ( | const Centering< Dim > & | inputCentering, | |
const FieldOffset< Dim > & | fieldOffset | |||
) | [inline] |
Given an input centering and a field offset obtained from a nearest neighbor calculation, this function computes the position of the corresponding point in cell logical coordinates.
References FieldOffset< Dim >::cellOffset(), Centering< Dim >::position(), and FieldOffset< Dim >::subFieldNumber().