NcmSplineGsl

NcmSplineGsl — GSL spline object wrapper.

Stability Level

Stable, unless otherwise indicated

Functions

Properties

char * type-name Read / Write / Construct

Types and Values

Object Hierarchy

    GEnum
    ╰── NcmSplineGslType
    GObject
    ╰── NcmSpline
        ╰── NcmSplineGsl

Includes

#include <numcosmo/math/ncm_spline_gsl.h>

Description

This object comprises the proper functions to use the GNU Scientific Library (GSL) spline functions and interpolation methods.

Functions

ncm_spline_gsl_new ()

NcmSpline *
ncm_spline_gsl_new (const gsl_interp_type *type);

This function returns a new gsl NcmSpline which will use type interpolation method.

Parameters

type

gsl interpolation method

 

Returns

a new NcmSpline.


ncm_spline_gsl_new_full ()

NcmSpline *
ncm_spline_gsl_new_full (const gsl_interp_type *type,
                         NcmVector *xv,
                         NcmVector *yv,
                         gboolean init);

This function returns a new gsl NcmSpline setting all its members.

Parameters

type

gsl interpolation method

 

xv

NcmVector of knots

 

yv

NcmVector of the values of the function, to be interpolated, computed at xv

 

init

TRUE to prepare the new NcmSpline or FALSE to not prepare it

 

Returns

a new NcmSpline.


ncm_spline_gsl_new_by_id ()

NcmSpline *
ncm_spline_gsl_new_by_id (NcmSplineGslType type_id);

This function returns a new gsl NcmSpline which will use type interpolation method.

Parameters

type_id

gsl interpolation method id

 

Returns

a new NcmSpline.


ncm_spline_gsl_new_full_by_id ()

NcmSpline *
ncm_spline_gsl_new_full_by_id (NcmSplineGslType type_id,
                               NcmVector *xv,
                               NcmVector *yv,
                               gboolean init);

This function returns a new gsl NcmSpline setting all its members.

Parameters

type_id

gsl interpolation method id

 

xv

NcmVector of knots

 

yv

NcmVector of the values of the function, to be interpolated, computed at xv

 

init

TRUE to prepare the new NcmSpline or FALSE to not prepare it

 

Returns

a new NcmSpline.


ncm_spline_gsl_set_type ()

void
ncm_spline_gsl_set_type (NcmSplineGsl *sg,
                         const gsl_interp_type *type);

This function sets the interpolation method type to sg .

Parameters

sg

a NcmSplineGsl

 

type

gsl interpolation method

 

ncm_spline_gsl_set_type_by_id ()

void
ncm_spline_gsl_set_type_by_id (NcmSplineGsl *sg,
                               NcmSplineGslType type_id);

This function sets the interpolation method type_id to sg .

Parameters

sg

a NcmSplineGsl

 

type_id

gsl interpolation method id

 

ncm_spline_gsl_set_type_by_name ()

void
ncm_spline_gsl_set_type_by_name (NcmSplineGsl *sg,
                                 const gchar *type_name);

This function sets the interpolation method type_name to sg .

Parameters

sg

a NcmSplineGsl

 

type_name

gsl interpolation method name

 

Types and Values

NCM_TYPE_SPLINE_GSL

#define NCM_TYPE_SPLINE_GSL (ncm_spline_gsl_get_type ())

enum NcmSplineGslType

Enumeration to choose which GSL interpolation method as backend to be used by the object. It can be used with the function ncm_spline_gsl_new_by_id() when a new NcmSplineGsl is created.

Members

NCM_SPLINE_GSL_LINEAR

Uses gsl_interp_linear interpolation method.

 

NCM_SPLINE_GSL_POLYNOMIAL

Uses gsl_interp_polynomial interpolation method.

 

NCM_SPLINE_GSL_CSPLINE

Uses gsl_interp_cspline interpolation method.

 

NCM_SPLINE_GSL_CSPLINE_PERIODIC

Uses gsl_interp_cspline_periodic interpolation method.

 

NCM_SPLINE_GSL_AKIMA

Uses gsl_interp_akima interpolation method.

 

NCM_SPLINE_GSL_AKIMA_PERIODIC

Uses gsl_interp_akima_periodic interpolation method.

 

NcmSplineGsl

typedef struct _NcmSplineGsl NcmSplineGsl;

Property Details

The “type-name” property

  “type-name”                char *

The name of the interpolation method from GNU Scientific Library (GSL).

Owner: NcmSplineGsl

Flags: Read / Write / Construct

Default value: "NCM_SPLINE_GSL_CSPLINE"