![]() |
![]() |
![]() |
NumCosmo Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
Bidimensional Spline Abstract ClassBidimensional Spline Abstract Class — Base class for implementing bidimensional splines |
Synopsis
struct NcmSpline2dClass; struct NcmSpline2d; void ncm_spline2d_set (NcmSpline2d *s2d
,NcmVector *xv
,NcmVector *yv
,NcmMatrix *zm
,gboolean init
); void ncm_spline2d_set_function (NcmSpline2d *s2d
,NcmSplineFuncType ftype
,gsl_function *Fx
,gsl_function *Fy
,gdouble xl
,gdouble xu
,gdouble yl
,gdouble yu
,gdouble rel_err
); void ncm_spline2d_prepare (NcmSpline2d *s2d
); guint ncm_spline2d_min_size (NcmSpline2d *s2d
); NcmSpline2d * ncm_spline2d_copy_empty (const NcmSpline2d *s2d
); NcmSpline2d * ncm_spline2d_copy (NcmSpline2d *s2d
); NcmSpline2d * ncm_spline2d_new (const NcmSpline2d *s2d
,NcmVector *xv
,NcmVector *yv
,NcmMatrix *zm
,gboolean init
); void ncm_spline2d_free (NcmSpline2d *s2d
); void ncm_spline2d_clear (NcmSpline2d **s2d
); gdouble ncm_spline2d_eval (NcmSpline2d *s2d
,gdouble x
,gdouble y
); gdouble ncm_spline2d_integ_dx (NcmSpline2d *s2d
,gdouble xl
,gdouble xu
,gdouble y
); gdouble ncm_spline2d_integ_dy (NcmSpline2d *s2d
,gdouble x
,gdouble yl
,gdouble yu
); gdouble ncm_spline2d_integ_dxdy (NcmSpline2d *s2d
,gdouble xl
,gdouble xu
,gdouble yl
,gdouble yu
); NcmSpline * ncm_spline2d_integ_dx_spline (NcmSpline2d *s2d
,gdouble xl
,gdouble xu
); NcmSpline * ncm_spline2d_integ_dy_spline (NcmSpline2d *s2d
,gdouble yl
,gdouble yu
); gdouble ncm_spline2d_integ_dx_spline_val (NcmSpline2d *s2d
,gdouble xl
,gdouble xu
,gdouble y
); gdouble ncm_spline2d_integ_dy_spline_val (NcmSpline2d *s2d
,gdouble x
,gdouble yl
,gdouble yu
); gdouble ncm_spline2d_integ_dxdy_spline_x (NcmSpline2d *s2d
,gdouble xl
,gdouble xu
,gdouble yl
,gdouble yu
); gdouble ncm_spline2d_integ_dxdy_spline_y (NcmSpline2d *s2d
,gdouble xl
,gdouble xu
,gdouble yl
,gdouble yu
); gdouble ncm_spline2dim_integ_total (NcmSpline2d *s2d
);
Object Hierarchy
GObject +----NcmSpline2d +----NcmSpline2dBicubic +----NcmSpline2dGsl +----NcmSpline2dSpline
Description
This class comprises all functions to provide a NcmSpline2d, get its properties and evaluate it given an interpolation method.
Details
ncm_spline2d_set ()
void ncm_spline2d_set (NcmSpline2d *s2d
,NcmVector *xv
,NcmVector *yv
,NcmMatrix *zm
,gboolean init
);
This funtion sets xv
and yv
vectors and zm
matrix to s
.
|
a NcmSpline2d |
|
a NcmVector of knots. |
|
a NcmVector of knots. |
|
a NcmMatrix of the values of the function, to be interpolated, computed at xv and yv . |
|
TRUE to prepare the NcmSpline2d or FALSE to not prepare it. |
ncm_spline2d_set_function ()
void ncm_spline2d_set_function (NcmSpline2d *s2d
,NcmSplineFuncType ftype
,gsl_function *Fx
,gsl_function *Fy
,gdouble xl
,gdouble xu
,gdouble yl
,gdouble yu
,gdouble rel_err
);
This function automatically determines the knots of s2d
in the intervals [xl
, xu
] and
[yl
, yu
] given a ftype
and rel_error
.
The functions Fx
and Fy
are the bidimensional function given at specific values of y and x, respectively.
These x and y values must be in the the intervals [xl
, xu
] and [yl
, yu
].
|
a NcmSpline2d. |
|
a NcmSplineFuncType. |
|
function of x variable to be approximated by spline functions. |
|
function of y variable to be approximated by spline functions. |
|
lower knot of x-coordinate. |
|
upper knot of x-coordinate. |
|
lower knot of y-coordinate. |
|
upper knot of y-coordinate. |
|
relative error between the function to be interpolated and the spline result. |
ncm_spline2d_prepare ()
void ncm_spline2d_prepare (NcmSpline2d *s2d
);
This function prepares the bidimensional spline s2d
such that one can evaluate it (ncm_spline2d_eval),
as well as to compute its integration in x, y or both directions.
|
a NcmSpline2d. |
ncm_spline2d_min_size ()
guint ncm_spline2d_min_size (NcmSpline2d *s2d
);
|
a NcmSpline2d. |
Returns : |
The size of the NcmSpline member of s2d . |
ncm_spline2d_copy_empty ()
NcmSpline2d * ncm_spline2d_copy_empty (const NcmSpline2d *s2d
);
This function copies the bidimensional spline s2d
into an initialized
empty NcmSpline2d of a specific type.
|
a NcmSpline2d. |
Returns : |
a NcmSpline2d. [transfer full] |
ncm_spline2d_copy ()
NcmSpline2d * ncm_spline2d_copy (NcmSpline2d *s2d
);
This function copies the two NcmVector and the NcmMatrix of the bidimensional
spline s2d
into those two NcmVector and NcmMatrix of a new NcmSpline2d.
|
a NcmSpline2d. |
Returns : |
A NcmSpline2d. [transfer full] |
ncm_spline2d_new ()
NcmSpline2d * ncm_spline2d_new (const NcmSpline2d *s2d
,NcmVector *xv
,NcmVector *yv
,NcmMatrix *zm
,gboolean init
);
This function returns a new NcmSpline2d, where the knots of this new spline are given
in the NcmVector xv
and yv
. The values of the function, at those knots, to be interpolated are
given in the NcmMatrix zm
.
|
a constant NcmSpline2d. |
|
NcmVector of knots. |
|
NcmVector of knots. |
|
NcmMatrix of the values of the function, to be interpolated, computed at xv and yv . |
|
TRUE to prepare the new NcmSpline2d or FALSE to not prepare it. |
Returns : |
A new NcmSpline2d. [transfer full] |
ncm_spline2d_free ()
void ncm_spline2d_free (NcmSpline2d *s2d
);
Atomically decrements the reference count of s2d
by one. If the reference count drops to 0,
all memory allocated by s2d
is released.
|
a NcmSpline2d. |
ncm_spline2d_clear ()
void ncm_spline2d_clear (NcmSpline2d **s2d
);
Atomically decrements the reference count of s2d
by one. If the reference count drops to 0,
all memory allocated by s2d
is released. Set pointer to NULL.
|
a NcmSpline2d. |
ncm_spline2d_eval ()
gdouble ncm_spline2d_eval (NcmSpline2d *s2d
,gdouble x
,gdouble y
);
|
a NcmSpline2d. |
|
x-coordinate value. |
|
y-coordinate value. |
Returns : |
The interpolated value of a function computed at the point (x , y ). |
ncm_spline2d_integ_dx ()
gdouble ncm_spline2d_integ_dx (NcmSpline2d *s2d
,gdouble xl
,gdouble xu
,gdouble y
);
This function computes the integration in x over the interval [xl
, xu
] and
at y
.
|
a NcmSpline2d. |
|
lower limit of integration. |
|
upper limit of integration. |
|
y-coordinate value. |
Returns : |
The numerical integral in x of an interpolated function over the range [xl , xu ] and at y . |
ncm_spline2d_integ_dy ()
gdouble ncm_spline2d_integ_dy (NcmSpline2d *s2d
,gdouble x
,gdouble yl
,gdouble yu
);
This function computes the integration in y over the interval [yl
, yu
] and
at x
.
|
a NcmSpline2d. |
|
x-coordinate value. |
|
lower limit of integration. |
|
upper limit of integration. |
Returns : |
The numerical integral in y of an interpolated function over the range [yl , yu ] and at x . |
ncm_spline2d_integ_dxdy ()
gdouble ncm_spline2d_integ_dxdy (NcmSpline2d *s2d
,gdouble xl
,gdouble xu
,gdouble yl
,gdouble yu
);
This function computes the integration in both x and y directions over the intervals
[xl
, xu
] and [yl
, yu
].
|
a NcmSpline2d |
|
lower limit of integration in the x-direction. |
|
upper limit of integration in the x-direction. |
|
lower limit of integration in the y-direction. |
|
upper limit of integration in the y-direction. |
Returns : |
The numerical integral in x and y of an interpolated function over the ranges [xl , xu ] and [yl , yu ]. |
ncm_spline2d_integ_dx_spline ()
NcmSpline * ncm_spline2d_integ_dx_spline (NcmSpline2d *s2d
,gdouble xl
,gdouble xu
);
This function computes the integral in x of the bidimensional interpolated function
over the range [xl
, xu
] resulting in a one dimensional function.
|
a NcmSpline2d. |
|
lower limit of integration x. |
|
upper limit of integration x. |
Returns : |
A NcmSpline. [transfer full] |
ncm_spline2d_integ_dy_spline ()
NcmSpline * ncm_spline2d_integ_dy_spline (NcmSpline2d *s2d
,gdouble yl
,gdouble yu
);
This function computes the integral in y of the bidimensional interpolated function
over the range [yl
, yu
] resulting in a one dimensional function.
|
a NcmSpline2d. |
|
lower limit of integration. |
|
upper limit of integration. |
Returns : |
A NcmSpline. [transfer full] |
ncm_spline2d_integ_dx_spline_val ()
gdouble ncm_spline2d_integ_dx_spline_val (NcmSpline2d *s2d
,gdouble xl
,gdouble xu
,gdouble y
);
This function calls ncm_spline2d_integ_dx_spline and evaluates the resulting
NcmSpline at y
.
|
a NcmSpline2d. |
|
lower limit of integration. |
|
upper limit of integration. |
|
y-coordinate value. |
Returns : |
The value of s2d integrated in x over the range [xl , xu ] and computed at y . |
ncm_spline2d_integ_dy_spline_val ()
gdouble ncm_spline2d_integ_dy_spline_val (NcmSpline2d *s2d
,gdouble x
,gdouble yl
,gdouble yu
);
This function calls ncm_spline2d_integ_dy_spline and evaluates the resulting
NcmSpline at x
.
|
a NcmSpline2d. |
|
x-coordinate value. |
|
lower limit of integration. |
|
upper limit of integration. |
Returns : |
The value of s2d integrated in y over the range [yl , yu ] and computed at x . |
ncm_spline2d_integ_dxdy_spline_x ()
gdouble ncm_spline2d_integ_dxdy_spline_x (NcmSpline2d *s2d
,gdouble xl
,gdouble xu
,gdouble yl
,gdouble yu
);
This function calls ncm_spline2d_integ_dx_spline and integrates the resulting
NcmSpline over the interval [yl
, yu
].
|
a NcmSpline2d. |
|
lower limit of integration in the x-direction. |
|
upper limit of integration in the x-direction. |
|
lower limit of integration in the y-direction. |
|
upper limit of integration in the y-direction. |
Returns : |
The value of s2d integrated in x and y over the ranges [xl , xu ] and [yl , yu ], respectively. |
ncm_spline2d_integ_dxdy_spline_y ()
gdouble ncm_spline2d_integ_dxdy_spline_y (NcmSpline2d *s2d
,gdouble xl
,gdouble xu
,gdouble yl
,gdouble yu
);
This function calls ncm_spline2d_integ_dy_spline and integrates the resulting
NcmSpline over the interval [xl
, xu
].
|
a NcmSpline2d. |
|
lower limit of integration in the x-direction. |
|
upper limit of integration in the x-direction. |
|
lower limit of integration in the y-direction. |
|
upper limit of integration in the y-direction. |
Returns : |
The value of s2d integrated in x and y over the ranges [xl , xu ] and [yl , yu ], respectively. |
ncm_spline2dim_integ_total ()
gdouble ncm_spline2dim_integ_total (NcmSpline2d *s2d
);
|
a NcmSpline2d. |
Returns : |
The numerical integral in both x and y directions of an interpolated function over the entire valid ranges of x and y coordinates. |