GXK Interface Reference

/opt/src/beast/beast-gtk/gxk/gxkspline.h

SYNOPSIS

DESCRIPTION

GxkSplinePoint

/opt/src/beast/beast-gtk/gxk/gxkspline.h:25
struct GxkSplinePoint
{
  double x;
  double y;
};

GxkSplineSegment

/opt/src/beast/beast-gtk/gxk/gxkspline.h:28
struct GxkSplineSegment
{
  double x;
  double y;
  double yd2;
  double ymin;
  double ymax;
  double ex1;
  double ex2;
};

_GxkSpline

/opt/src/beast/beast-gtk/gxk/gxkspline.h:33
struct _GxkSpline
{
  guint            n_segs;
  GxkSplineSegment segs   [0];
};

gxk_spline_copy

/opt/src/beast/beast-gtk/gxk/gxkspline.h:51
spline: correctly setup GxkSpline
RETURNS: newly allocated spline Produce a copy of an already setup spline.

gxk_spline_dump

/opt/src/beast/beast-gtk/gxk/gxkspline.h:50
void  gxk_spline_dump 
(GxkSpline *spline);
Produce a debugging printout of spline on stderr.
spline: correctly setup GxkSpline

gxk_spline_eval

/opt/src/beast/beast-gtk/gxk/gxkspline.h:45
double  gxk_spline_eval 
(const GxkSpline *spline,
 double           x,
 double          *yd1);
Evaluate the spline polynomial at position x and return the interpolated value y, as well as its first derivative.
spline: correctly setup GxkSpline
x: x position for evaluation
dy1: location to store first derivative of y
RETURNS: y of spline at position x

gxk_spline_findx

/opt/src/beast/beast-gtk/gxk/gxkspline.h:49
double  gxk_spline_findx 
(const GxkSpline *spline,
 double           y);
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.
spline: correctly setup GxkSpline
y: interpolated y value
RETURNS: x position to yield y or NAN

gxk_spline_free

/opt/src/beast/beast-gtk/gxk/gxkspline.h:52
void  gxk_spline_free 
(GxkSpline *spline);
Free a spline structure.
spline: correctly setup GxkSpline

gxk_spline_new

/opt/src/beast/beast-gtk/gxk/gxkspline.h:42
GxkSpline*  gxk_spline_new 
(guint                 n_points,
 const GxkSplinePoint *points,
 double                dy_start,
 double                dy_end);
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.

gxk_spline_new_natural

/opt/src/beast/beast-gtk/gxk/gxkspline.h:38
GxkSpline*  gxk_spline_new_natural 
(guint                 n_points,
 const GxkSplinePoint *points);
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.

gxk_spline_y

/opt/src/beast/beast-gtk/gxk/gxkspline.h:47
double  gxk_spline_y 
(const GxkSpline *spline,
 double           x);
Evaluate the spline polynomial at position x and return the interpolated value y.
spline: correctly setup GxkSpline
x: x position for evaluation
RETURNS: y of spline at position x