Top |
Functions
void | go_cspline_destroy () |
void | go_cspline_destroyl () |
double | go_cspline_get_deriv () |
long double | go_cspline_get_derivl () |
double * | go_cspline_get_derivs () |
long double * | go_cspline_get_derivsl () |
double * | go_cspline_get_integrals () |
long double * | go_cspline_get_integralsl () |
double | go_cspline_get_value () |
long double | go_cspline_get_valuel () |
double * | go_cspline_get_values () |
long double * | go_cspline_get_valuesl () |
GOCSpline * | go_cspline_init () |
GOCSplinel * | go_cspline_initl () |
Functions
go_cspline_destroy ()
void
go_cspline_destroy (GOCSpline *sp
);
Frees the spline structure when done.
go_cspline_get_deriv ()
double go_cspline_get_deriv (GOCSpline const *sp
,double x
);
sp must be a valid spline structure as returned by go_cspline_init.
go_cspline_get_derivs ()
double * go_cspline_get_derivs (GOCSpline const *sp
,double const *x
,int n
);
sp must be a valid spline structure as returned by go_cspline_init. The x values must be sorted in increasing order.
go_cspline_get_derivsl ()
long double * go_cspline_get_derivsl (GOCSplinel const *sp
,long double const *x
,int n
);
go_cspline_get_integrals ()
double * go_cspline_get_integrals (GOCSpline const *sp
,double const *x
,int n
);
sp must be a valid spline structure as returned by go_cspline_init. The x values must be sorted in increasing order.
go_cspline_get_integralsl ()
long double * go_cspline_get_integralsl (GOCSplinel const *sp
,long double const *x
,int n
);
go_cspline_get_value ()
double go_cspline_get_value (GOCSpline const *sp
,double x
);
sp must be a valid spline structure as returned by go_cspline_init.
go_cspline_get_values ()
double * go_cspline_get_values (GOCSpline const *sp
,double const *x
,int n
);
sp must be a valid spline structure as returned by go_cspline_init. The x values must be sorted in increasing order.
go_cspline_get_valuesl ()
long double * go_cspline_get_valuesl (GOCSplinel const *sp
,long double const *x
,int n
);
go_cspline_init ()
GOCSpline * go_cspline_init (double const *x
,double const *y
,int n
,unsigned limits
,double c0
,double cn
);
Creates a spline structure, and computes the coefficients associated with the polynoms. The ith polynome (between x[i-1] and x[i] is: y(x) = y[i-1] + (c[i-1] + (b[i-1] + a[i] * (x - x[i-1])) * (x - x[i-1])) * (x - x[i-1]) where a[i-1], b[i-1], c[i-1], x[i-1] and y[i-1] are the corresponding members of the new structure.
Parameters
x |
the x values |
|
y |
the y values |
|
n |
the number of x and y values |
|
limits |
how the limits must be treated, four values are allowed: GO_CSPLINE_NATURAL: first and least second derivatives are 0. GO_CSPLINE_PARABOLIC: the curve will be a parabole arc outside of the limits. GO_CSPLINE_CUBIC: the curve will be cubic outside of the limits. GO_CSPLINE_CLAMPED: the first and last derivatives are imposed. |
|
c0 |
the first derivative when using clamped splines, not used in the other limit types. |
|
cn |
the first derivative when using clamped splines, not used in the other limit types. |
go_cspline_initl ()
GOCSplinel * go_cspline_initl (long double const *x
,long double const *y
,int n
,unsigned limits
,long double a0
,long double a1
);