-
This is a header-only code for multi-dimensional linear interpolation.
-
Up to five dimensions are supported.
-
Three versions are provided:
- multilinear_interpolation.h: this uses simple arrays, with the grid mapped to a one-D array in row-major ordering.
- multilinear_interpolation_vector.h: this uses STL vectors with the grid as vectors of vectors: f[i][j][k].
- multilinear_interpolation_pseudorecursive.h: this is an older version that effectively uses a pseudo-recursive approach.
-
Grid locations are computed using the std::lower_bound function, which uses a binary search.
-
There are examples and comparison to python for one to three dimensions.
-
The code has been tested for three and four dimensions using another production code.
-
Note that values out of bounds are linearly extrapolated using the nearest two grid points in a given dimension.
-
Notifications
You must be signed in to change notification settings - Fork 2
BYUignite/multilinear_interpolation
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Multilinear interpolation in C++. Up to five dimensions are supported, but this can be extended.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published