Expand description
This crate provides linear and cubic interpolators for up to 4 dimensions
Functions§
- cubic_
1D_ grid - Four-point cubic interpolation of point (X) in a grid of Y-values. This function assumes
that X is in the middle of the provided grid array (that is, X lies between
local_4[1]
andlocal_4[2]
). X will be normalized withX - floor(X)
where 0 equalslocal_4[1]
and 0.999… approacheslocal_4[2]
, interpolating with a cubic spline. - cubic_
2D_ grid - 16-point bi-cubic interpolation of a coordinate in a grid of values. This function assumes
that
coord
is in the middle of the provided grid array, such thatfloor(coord)
represents index[1,1] in the grid andfloor(coord)+1
represents index[2,2] in the grid - cubic_
3D_ grid - 64-point tri-cubic interpolation of a coordinate in a grid of values. This function assumes
that
coord
is in the middle of the provided grid array, such thatfloor(coord)
represents index[1,1,…] in the grid andfloor(coord)+1
represents index[2,2,…] in the grid - cubic_
4D_ grid - 256-point hyperdimensional-cubic interpolation of a coordinate in a
grid of values. This function assumes that
coord
is in the middle of the provided grid array, such thatfloor(coord)
represents index[1,1,…] in the grid andfloor(coord)+1
represents index[2,2,…] in the grid - cubic_
5D_ grid - 1024-point hyperdimensional-cubic interpolation of a coordinate in a
grid of values. This function assumes that
coord
is in the middle of the provided grid array, such thatfloor(coord)
represents index[1,1,…] in the grid andfloor(coord)+1
represents index[2,2,…] in the grid - cubic_
6D_ grid - 4096-point hyperdimensional-cubic interpolation of a coordinate in a
grid of values. This function assumes that
coord
is in the middle of the provided grid array, such thatfloor(coord)
represents index[1,1,…] in the grid andfloor(coord)+1
represents index[2,2,…] in the grid - cubic_
7D_ grid - 16,384-point hyperdimensional-cubic interpolation of a coordinate in a
grid of values. This function assumes that
coord
is in the middle of the provided grid array, such thatfloor(coord)
represents index[1,1,…] in the grid andfloor(coord)+1
represents index[2,2,…] in the grid - cubic_
8D_ grid - 65,536-point hyperdimensional-cubic interpolation of a coordinate in a
grid of values. This function assumes that
coord
is in the middle of the provided grid array, such thatfloor(coord)
represents index[1,1,…] in the grid andfloor(coord)+1
represents index[2,2,…] in the grid - cubic_
9D_ grid - 262,144-point hyperdimensional-cubic interpolation of a coordinate in a
grid of values. This function assumes that
coord
is in the middle of the provided grid array, such thatfloor(coord)
represents index[1,1,…] in the grid andfloor(coord)+1
represents index[2,2,…] in the grid - cubic_
10D_ grid - 1,048,576-point hyperdimensional-cubic interpolation of a coordinate in a
grid of values. This function assumes that
coord
is in the middle of the provided grid array, such thatfloor(coord)
represents index[1,1,…] in the grid andfloor(coord)+1
represents index[2,2,…] in the grid - linear_
1D - two-point x,y linear interpolation
- linear_
2D_ grid - four-point X,Y bi-linear interpolation in a grid, using the assumption that x and y are between the provided reference grid points
- linear_
3D_ grid - eight-point X,Y,Z tri-linear interpolation in a grid, using the assumption that (X,Y,Z) is between the provided reference grid points
- linear_
4D_ grid - sixteen-point X,Y,Z,W tetra-linear interpolation in a grid, using the assumption that (X,Y,Z,W) is between the provided reference grid points
- linear_
5D_ grid - 32-point hyperdimensional-linear interpolation of a coordinate in a
grid of values. This function assumes that
coord
is in the middle of the provided grid array, such thatfloor(coord)
represents index[0,0,…] in the grid andfloor(coord)+1
represents index[1,1,…] in the grid - linear_
6D_ grid - 64-point hyperdimensional-linear interpolation of a coordinate in a
grid of values. This function assumes that
coord
is in the middle of the provided grid array, such thatfloor(coord)
represents index[0,0,…] in the grid andfloor(coord)+1
represents index[1,1,…] in the grid - linear_
7D_ grid - 128-point hyperdimensional-linear interpolation of a coordinate in a
grid of values. This function assumes that
coord
is in the middle of the provided grid array, such thatfloor(coord)
represents index[0,0,…] in the grid andfloor(coord)+1
represents index[1,1,…] in the grid - linear_
8D_ grid - 256-point hyperdimensional-linear interpolation of a coordinate in a
grid of values. This function assumes that
coord
is in the middle of the provided grid array, such thatfloor(coord)
represents index[0,0,…] in the grid andfloor(coord)+1
represents index[1,1,…] in the grid - linear_
9D_ grid - 512-point hyperdimensional-linear interpolation of a coordinate in a
grid of values. This function assumes that
coord
is in the middle of the provided grid array, such thatfloor(coord)
represents index[0,0,…] in the grid andfloor(coord)+1
represents index[1,1,…] in the grid - linear_
10D_ grid - 1024-point hyperdimensional-linear interpolation of a coordinate in a
grid of values. This function assumes that
coord
is in the middle of the provided grid array, such thatfloor(coord)
represents index[0,0,…] in the grid andfloor(coord)+1
represents index[1,1,…] in the grid