Crate nd_interpolate

Source
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] and local_4[2]). X will be normalized with X - floor(X) where 0 equals local_4[1] and 0.999… approaches local_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 that floor(coord) represents index[1,1] in the grid and floor(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 that floor(coord) represents index[1,1,…] in the grid and floor(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 that floor(coord) represents index[1,1,…] in the grid and floor(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 that floor(coord) represents index[1,1,…] in the grid and floor(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 that floor(coord) represents index[1,1,…] in the grid and floor(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 that floor(coord) represents index[1,1,…] in the grid and floor(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 that floor(coord) represents index[1,1,…] in the grid and floor(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 that floor(coord) represents index[1,1,…] in the grid and floor(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 that floor(coord) represents index[1,1,…] in the grid and floor(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 that floor(coord) represents index[0,0,…] in the grid and floor(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 that floor(coord) represents index[0,0,…] in the grid and floor(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 that floor(coord) represents index[0,0,…] in the grid and floor(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 that floor(coord) represents index[0,0,…] in the grid and floor(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 that floor(coord) represents index[0,0,…] in the grid and floor(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 that floor(coord) represents index[0,0,…] in the grid and floor(coord)+1 represents index[1,1,…] in the grid