Canoe
Comprehensive Atmosphere N' Ocean Engine
interpn.c File Reference
#include <stdlib.h>
#include "interpolation.h"

Go to the source code of this file.

Functions

void interpn (double *val, double const *coor, double const *data, double const *axis, size_t const *len, int ndim, int nval)
 
double interp1 (double x, double const *data, double const *axis, size_t len)
 

Function Documentation

◆ interpn()

void interpn ( double *  val,
double const *  coor,
double const *  data,
double const *  axis,
size_t const *  len,
int  ndim,
int  nval 
)

Multidimensional linear interpolation val[0..nval-1] : output values coor[0..ndim-1] : coordinate of the interpolation point data[...] : points to the start position of a multidimensional data table. len[0..ndim-1] : length of each dimension axis[...] : coordinates of each dimesnion is placed sequentially in axis

Definition at line 12 of file interpn.c.

◆ interp1()

double interp1 ( double  x,
double const *  data,
double const *  axis,
size_t  len 
)

A handy function for one dimensional interpolation x : interpolation point data[0..len-1] : data array axis[0..len-1] : coordinates

Definition at line 61 of file interpn.c.