//-----------------------------
//Interpolation Functions
//-----------------------------
//19.04.2004 $ Serkov Alexander
//-----------------------------
#include <stdlib.h>
#include <math.h>
//-----------------------------
#ifndef __ILIB_H__
#define __ILIB_H__
//-----------------------------
typedef long double DOUBLE;
typedef unsigned long UINT32;
//-----------------------------
typedef DOUBLE(*MATHFUNC)(DOUBLE);
//-----------------------------
typedef struct
{
	DOUBLE x,y;
} POINT;
//-----------------------------
typedef struct
{
	DOUBLE *p;
	UINT32 Count;
} POLINOM;
//-----------------------------
typedef struct
{
	POINT *Points;
	DOUBLE *L;
	UINT32 Count;
} POINTS;
//-----------------------------
POINTS *AllocPoints(UINT32 n);
POINTS *BuildPoints(MATHFUNC f,DOUBLE from,DOUBLE to,DOUBLE step);
void FreePoints(POINTS *points);

POLINOM *BuildPolinom(POINTS *points);
void FreePolinom(POLINOM *p);
DOUBLE CalcPolinom(POLINOM *p,DOUBLE x);
//-----------------------------
#endif
Соседние файлы в папке Interpolation