Nearest-neighbor interpolation in arbitrary number of dimensions. More...
This class performs nearest-neighbor interpolation on a multi-dimensional data set specified as a series of scattered points. The function set_data() takes as input: the number of dimensions, the number of points which specify the data, and a "vector of vectors", e.g. std::vector<std::vector<double> > which contains the data for all the points.
Definition at line 50 of file interpm_neigh.h.
#include <interpm_neigh.h>
Public Types | |
| typedef boost::numeric::ublas::vector< double > | ubvector |
| typedef boost::numeric::ublas::vector< size_t > | ubvector_size_t |
Public Member Functions | |
| template<class vec_vec_t > | |
| void | set_data (size_t dim, size_t n_points, vec_vec_t &vecs) |
| Initialize the data for the interpolation. More... | |
| template<class vec2_t > | |
| double | operator() (vec2_t &x) const |
| Perform the interpolation. | |
| template<class vec2_t > | |
| double | eval (vec2_t &x) const |
| Perform the interpolation. | |
Public Attributes | |
| ubvector | scales |
| Distance scales for each coordinate. | |
Protected Attributes | |
| size_t | np |
| The number of points. | |
| size_t | nd |
| The number of dimensions. | |
| std::vector< vec_t * > | ptrs |
| A vector of pointers holding the data. | |
| bool | data_set |
| True if the data has been specified. | |
|
inline |
The object vecs should be a vector (of size dim+1) of vectors (all of size n_points). It may have any type for which the data can be accessed through operator[][].
Definition at line 74 of file interpm_neigh.h.
Documentation generated with Doxygen. Provided under the
GNU Free Documentation License (see License Information).