118 std::vector<std::vector<double>>
axes;
138 int calcFlatIdx(
const std::vector<int>& ref_idxs)
const;
152 std::vector<int>& ref_idxs,
double eps = 1e-6)
const;
162 std::vector<double>
at(
const std::vector<int>& ref_idxs)
const;
179 const std::vector<std::vector<double>>& ref_axes,
180 const std::vector<double>& ref_flattenedMap);
230 std::vector<double>
eval(
const std::vector<double>& ref_p,
231 double eps = 1e-6)
const;
The purpose of this class is to store a characteristic map (German: Kennfeld) of arbitrary dimensions...
int imageDim
Image dimension of the map.
int calcFlatIdx(const std::vector< int > &ref_idxs) const
Compute the index of a map entry in the flattened map.
std::vector< int > strides
Stride for each domain dimension in the flattened map.
std::vector< double > flattenedMap
Flattened map entries.
std::vector< double > eval(const std::vector< double > &ref_p, double eps=1e-6) const
Evaluate a point in the map using linear interpolation.
int getDomainDim() const
Get the dimension of the map's domain.
std::vector< std::vector< double > > axes
Vector containing the values along each domain axis in ascending order.
int findNearestNeighborIdxs(const std::vector< double > &ref_p, std::vector< int > &ref_idxs, double eps=1e-6) const
Determine the indices of the nearest neighbor of a point in the map.
void determineStrides()
Determine the stride for each map dimension in the flattened map.
std::vector< double > at(const std::vector< int > &ref_idxs) const
Access a map entry using its indices.
int domainDim
Dimension of the map's domain.
std::string toString() const
Encode the map as a string.
int getImageDim() const
Get the image dimension of the map.