UFO
|
Classes | |
class | SortUpdateVisitor |
Boost visitor which allows us to sort a vector. More... | |
class | SortVisitor |
Boost visitor which allows us to sort a vector. More... | |
Functions | |
template<typename T > | |
void | exactMatch (const std::string &varName, const std::vector< T > &varValues, const T &obVal, ConstrainedRange &range) |
Update our extract constraint based on an exact match against the specified coordinate indexing a dimension of the payload array. More... | |
template<typename T > | |
void | nearestMatch (const std::string &varName, const std::vector< T > &varValues, const T &obVal, ConstrainedRange &range) |
Update our extract constraint based on a nearest match against the specified coordinate indexing a dimension of the payload array. More... | |
void | nearestMatch (const std::string &varName, const std::vector< std::string > &varValues, const std::string &obVal, ConstrainedRange &range) |
template<typename T > | |
void | leastUpperBoundMatch (const std::string &varName, const std::vector< T > &varValues, const T &obVal, ConstrainedRange &range) |
Update our extract constraint based on a least-upper-bound match against the specified coordinate indexing a dimension of the payload array. More... | |
void | leastUpperBoundMatch (const std::string &varName, const std::vector< std::string > &varValues, const std::string &obVal, ConstrainedRange &range) |
template<typename T > | |
void | greatestLowerBoundMatch (const std::string &varName, const std::vector< T > &varValues, const T &obVal, ConstrainedRange &range) |
Update our extract constraint based on a greatest-lower-bound match against the specified coordinate indexing a dimension of the payload array. More... | |
void | greatestLowerBoundMatch (const std::string &varName, const std::vector< std::string > &varValues, const std::string &obVal, ConstrainedRange &range) |
template<typename T > | |
void | match (InterpMethod method, const std::string &varName, const std::vector< T > &varValues, const T &obVal, ConstrainedRange &range) |
Restrict range to the subrange of varValues matching obVal according to the criteria of method . More... | |
template<typename CoordinateValue > | |
float | linearInterpolation (const std::string &varName, const std::vector< CoordinateValue > &varValues, const CoordinateValue &obVal, const ConstrainedRange &range, const DataExtractorPayload< float >::const_array_view< 1 >::type &interpolatedArray) |
Perform piecewise linear interpolation of the provided array varValues at 'location' obVal . More... | |
float | linearInterpolation (const std::string &varName, const std::vector< std::string > &varValues, const std::string &obVal, const ConstrainedRange &range, const DataExtractorPayload< float >::const_array_view< 1 >::type &interpolatedArray) |
void ufo::anonymous_namespace{DataExtractor.cc}::exactMatch | ( | const std::string & | varName, |
const std::vector< T > & | varValues, | ||
const T & | obVal, | ||
ConstrainedRange & | range | ||
) |
Update our extract constraint based on an exact match against the specified coordinate indexing a dimension of the payload array.
[in] | varName | Name of the coordinate to match against. |
[in] | varValues | Vector of values of that coordinate. |
[in] | obVal | Value to match. |
[in,out] | range | On input, the range of slices of the payload array along the dimension indexed by varValues that matches all constraints considered so far. On output, the subrange of slices matching also the current constraint. |
Definition at line 88 of file DataExtractor.cc.
void ufo::anonymous_namespace{DataExtractor.cc}::greatestLowerBoundMatch | ( | const std::string & | varName, |
const std::vector< std::string > & | varValues, | ||
const std::string & | obVal, | ||
ConstrainedRange & | range | ||
) |
void ufo::anonymous_namespace{DataExtractor.cc}::greatestLowerBoundMatch | ( | const std::string & | varName, |
const std::vector< T > & | varValues, | ||
const T & | obVal, | ||
ConstrainedRange & | range | ||
) |
Update our extract constraint based on a greatest-lower-bound match against the specified coordinate indexing a dimension of the payload array.
[in] | varName | Name of the coordinate to match against. |
[in] | varValues | Vector of values of that coordinate. |
[in] | obVal | Value to match. |
[in,out] | range | On input, the range of slices of the payload array along the dimension indexed by varValues that matches all constraints considered so far. On output, the subrange of slices matching also the current constraint. |
Definition at line 256 of file DataExtractor.cc.
void ufo::anonymous_namespace{DataExtractor.cc}::leastUpperBoundMatch | ( | const std::string & | varName, |
const std::vector< std::string > & | varValues, | ||
const std::string & | obVal, | ||
ConstrainedRange & | range | ||
) |
void ufo::anonymous_namespace{DataExtractor.cc}::leastUpperBoundMatch | ( | const std::string & | varName, |
const std::vector< T > & | varValues, | ||
const T & | obVal, | ||
ConstrainedRange & | range | ||
) |
Update our extract constraint based on a least-upper-bound match against the specified coordinate indexing a dimension of the payload array.
[in] | varName | Name of the coordinate to match against. |
[in] | varValues | Vector of values of that coordinate. |
[in] | obVal | Value to match. |
[in,out] | range | On input, the range of slices of the payload array along the dimension indexed by varValues that matches all constraints considered so far. On output, the subrange of slices matching also the current constraint. |
Definition at line 209 of file DataExtractor.cc.
float ufo::anonymous_namespace{DataExtractor.cc}::linearInterpolation | ( | const std::string & | varName, |
const std::vector< CoordinateValue > & | varValues, | ||
const CoordinateValue & | obVal, | ||
const ConstrainedRange & | range, | ||
const DataExtractorPayload< float >::const_array_view< 1 >::type & | interpolatedArray | ||
) |
Perform piecewise linear interpolation of the provided array varValues
at 'location' obVal
.
It is assumed that the provided 1D array is described by coordinate varName
. This function returns the value produced by piecewise linear interpolation of this array at the point obVal
.
[in] | range | Defines how to constrain (slice) varValues along with interpolatedArray . |
[in] | varName | Name of the coordinate along which to interpolate. |
[in] | varValues | Vector of values of that coordinate. |
[in] | obVal | Interpolation location. |
[in] | interpolatedArray | Interpolated array. |
Definition at line 352 of file DataExtractor.cc.
float ufo::anonymous_namespace{DataExtractor.cc}::linearInterpolation | ( | const std::string & | varName, |
const std::vector< std::string > & | varValues, | ||
const std::string & | obVal, | ||
const ConstrainedRange & | range, | ||
const DataExtractorPayload< float >::const_array_view< 1 >::type & | interpolatedArray | ||
) |
void ufo::anonymous_namespace{DataExtractor.cc}::match | ( | InterpMethod | method, |
const std::string & | varName, | ||
const std::vector< T > & | varValues, | ||
const T & | obVal, | ||
ConstrainedRange & | range | ||
) |
Restrict range
to the subrange of varValues
matching obVal
according to the criteria of method
.
[in] | method | Matching method. |
[in] | varName | Name of the coordinate to match against. |
[in] | varValues | Vector of values of that coordinate. |
[in] | obVal | Value to match. |
[in,out] | range | On input, the range of slices of the payload array along the dimension indexed by varValues that matches all constraints considered so far. On output, the subrange of slices matching also the current constraint. |
Definition at line 310 of file DataExtractor.cc.
void ufo::anonymous_namespace{DataExtractor.cc}::nearestMatch | ( | const std::string & | varName, |
const std::vector< std::string > & | varValues, | ||
const std::string & | obVal, | ||
ConstrainedRange & | range | ||
) |
void ufo::anonymous_namespace{DataExtractor.cc}::nearestMatch | ( | const std::string & | varName, |
const std::vector< T > & | varValues, | ||
const T & | obVal, | ||
ConstrainedRange & | range | ||
) |
Update our extract constraint based on a nearest match against the specified coordinate indexing a dimension of the payload array.
Method:
Determine which indices match this nearest value. (more than one index could have this one value).
[1, 1, 2, 3, 4, 5]
Nearest neighbour extraction of “1”, has more than one neighbour. That is, more than one index with the same value have the same distance:
[1, 1] i.e. range=(0, 2)
Note that an alternative implementation could consider equidistant values, though it was decided this was not desirable behaviour:
[1, 1, 2, 3, 4, 5]
Nearest neighbour extraction of “1.5” could be then considered to have 3 equidistant neighbours (1, 1, 2). That is, two different values with the same distance.
[1, 1, 2] i.e. range=(0, 3)
[in] | varName | Name of the coordinate to match against. |
[in] | varValues | Vector of values of that coordinate. |
[in] | obVal | Value to match. |
[in,out] | range | On input, the range of slices of the payload array along the dimension indexed by varValues that matches all constraints considered so far. On output, the subrange of slices matching also the current constraint. |
Definition at line 157 of file DataExtractor.cc.