https://github.com/teuben/nemo
Tip revision: 27d447ea1e0c092be8e577a3569a022c11e2c3bc authored by Peter Teuben on 07 April 2021, 03:16:34 UTC
dynamic loader should be simpler (i5-11x?) clang
dynamic loader should be simpler (i5-11x?) clang
Tip revision: 27d447e
funtab.h
/*
* FunctionTable:
*/
/* lookup modes */
#define FUNTAB_LINEAR 0x01
#define FUNTAB_SPLINE 0x02
#define FUNTAB_NEAR 0x03
typedef struct FunctionTable {
string name; /* ID or filename */
int mode; /* lookup mode (one of the above FUNTAB_xxx */
int n; /* Number of points in table */
real *x; /* pointer to array of X values */
real *y; /* pointer to array of Y values */
real *coeff; /* (spline) coefficients, if used */
int errors; /* cumulative errors in interpolation */
} FunctionTable;
/* funtab.c */
FunctionTable *ft_open (string, int, int, int);
real ft_spline (FunctionTable *, real);
real ft_linear (FunctionTable *, real);
int ft_close (FunctionTable *);