Go to the source code of this file.
GxkSpline* gxk_spline_copy |
( |
GxkSpline * |
spline | ) |
|
- Parameters
-
spline | correctly setup GxkSpline |
- Returns
- newly allocated spline Produce a copy of an already setup spline.
void gxk_spline_dump |
( |
GxkSpline * |
spline | ) |
|
- Parameters
-
spline | correctly setup GxkSpline |
Produce a debugging printout of spline on stderr.
- Parameters
-
spline | correctly setup GxkSpline |
x | x position for evaluation |
dy1 | location to store first derivative of y |
- Returns
- y of spline at position x
Evaluate the spline polynomial at position x and return the interpolated value y, as well as its first derivative.
double gxk_spline_findx |
( |
const GxkSpline * |
spline, |
|
|
double |
y |
|
) |
| |
- Parameters
-
spline | correctly setup GxkSpline |
y | interpolated y value |
- Returns
- x position to yield y or NAN
Find an x position for which spline evaluation yields y. Due to round off, calling gxk_spline_y() on the result may produce a number equal to y only within a certain epsilon. If multiple x positions will yield y upon evaluation, any of them may be returned. If no x position can yield y, NAN is returned. Evaluation of this function may take about 10 times as long as calling its counterpart gxk_spline_y(), some times much longer.
void gxk_spline_free |
( |
GxkSpline * |
spline | ) |
|
- Parameters
-
spline | correctly setup GxkSpline |
Free a spline structure.
- Parameters
-
n_points | number of fix points |
points | fix points |
dy_start | first derivatives at point[0] |
dy_end | first derivatives at point[n_points - 1] |
- Returns
- newly allocated spline Create a not-a-knot spline based on a given set of fix points and the first derivative of the first and last point of the interpolating function.
GxkSpline* gxk_spline_new_natural |
( |
guint |
n_points, |
|
|
const GxkSplinePoint * |
points |
|
) |
| |
- Parameters
-
n_points | number of fix points |
points | fix points |
- Returns
- newly allocated spline Create a natural spline based on a given set of fix points.
- Parameters
-
spline | correctly setup GxkSpline |
x | x position for evaluation |
- Returns
- y of spline at position x
Evaluate the spline polynomial at position x and return the interpolated value y.