NcmData

NcmData — Abstract class for implementing calculator objects.

Properties

gdouble abstol Read / Write / Construct
gdouble reltol Read / Write / Construct

Types and Values

Object Hierarchy

    GObject
    ╰── NcmCalc

Description

Base class describing calculator objects, i.e., objetcs that use one or more NcmModel to perform calculations.

Functions

NcmCalcPrepare0 ()

void
(*NcmCalcPrepare0) (NcmCalc *calc);

NcmCalcPrepare1 ()

void
(*NcmCalcPrepare1) (NcmCalc *calc,
                    NcmModel *m1);

NcmCalcPrepare2 ()

void
(*NcmCalcPrepare2) (NcmCalc *calc,
                    NcmModel *m1,
                    NcmModel *m2);

NcmCalcPrepare3 ()

void
(*NcmCalcPrepare3) (NcmCalc *calc,
                    NcmModel *m1,
                    NcmModel *m2,
                    NcmModel *m3);

NcmCalcPrepare4 ()

void
(*NcmCalcPrepare4) (NcmCalc *calc,
                    NcmModel *m1,
                    NcmModel *m2,
                    NcmModel *m3,
                    NcmModel *m4);

NcmCalcPrepare5 ()

void
(*NcmCalcPrepare5) (NcmCalc *calc,
                    NcmModel *m1,
                    NcmModel *m2,
                    NcmModel *m3,
                    NcmModel *m4,
                    NcmModel *m5);

NcmCalcPrepare6 ()

void
(*NcmCalcPrepare6) (NcmCalc *calc,
                    NcmModel *m1,
                    NcmModel *m2,
                    NcmModel *m3,
                    NcmModel *m4,
                    NcmModel *m5,
                    NcmModel *m6);

NCM_CALC_PREPARE()

#define NCM_CALC_PREPARE(prepare_ptr) ((NcmCalcPrepare0 *)(prepare_ptr))

ncm_calc_class_set_num_dep ()

void
ncm_calc_class_set_num_dep (NcmCalcClass *calc_class,
                            guint ndep);

Sets the number of dependencies NcmModel

Parameters

calc_class

a NcmCalcClass

 

ndep

number of dependencies NcmModel

 

ncm_calc_class_set_dep ()

void
ncm_calc_class_set_dep (NcmCalcClass *calc_class,
                        guint p,
                        GType dep_model);

Sets the p -th NcmModel to be of GType dep_model .

Parameters

calc_class

a NcmCalcClass

 

p

position of the NcmModel

 

dep_model

a GType

 

ncm_calc_class_check ()

void
ncm_calc_class_check (NcmCalcClass *calc_class);

Checks if all dependencies were set consistently.

Parameters

calc_class

a NcmCalcClass

 

ncm_calc_prepare_array ()

void
ncm_calc_prepare_array (NcmCalc *calc,
                        NcmModel **ma);

Prepares calc using the models in ma .

Parameters

calc

a NcmCalc

 

ma

array of NcmModel.

[in][array zero-terminated=1][element-type NcmModel]

ncm_calc_prepare_if_needed_array ()

void
ncm_calc_prepare_if_needed_array (NcmCalc *calc,
                                  NcmModel **ma);

Prepares calc using the models in ma .

Parameters

calc

a NcmCalc

 

ma

array of NcmModel.

[in][array zero-terminated=1][element-type NcmModel]

ncm_calc_prepare_if_needed_vargs ()

void
ncm_calc_prepare_if_needed_vargs (NcmCalc *calc,
                                  ...);

Prepares calc using the models in @... .

[skip]

Parameters

calc

a NcmCalc

 

...

list of NcmModel

 

ncm_calc_set_reltol ()

void
ncm_calc_set_reltol (NcmCalc *calc,
                     const gdouble reltol);

Sets the relative tolerance to reltol .

Parameters

calc

a NcmCalc

 

reltol

the relative tolerance

 

ncm_calc_set_abstol ()

void
ncm_calc_set_abstol (NcmCalc *calc,
                     const gdouble abstol);

Sets the absolute tolerance to abstol .

Parameters

calc

a NcmCalc

 

abstol

the absolute tolerance

 

ncm_calc_get_reltol ()

gdouble
ncm_calc_get_reltol (NcmCalc *calc);

Gets the relative tolerance.

Parameters

calc

a NcmCalc

 

Returns

the relative tolerance.


ncm_calc_get_abstol ()

gdouble
ncm_calc_get_abstol (NcmCalc *calc);

Gets the absolute tolerance.

Parameters

calc

a NcmCalc

 

Returns

the relative tolerance.

Types and Values

NCM_CALC_DEFAULT_RELTOL

#define NCM_CALC_DEFAULT_RELTOL (1.0e-7)

NCM_CALC_DEFAULT_ABSTOL

#define NCM_CALC_DEFAULT_ABSTOL (0.0)

NCM_CALC_MAX_DEPS

#define NCM_CALC_MAX_DEPS (6)

Property Details

The “abstol” property

  “abstol”                   gdouble

Absolute tolerance.

Flags: Read / Write / Construct

Allowed values: >= 0

Default value: 0


The “reltol” property

  “reltol”                   gdouble

Relative tolerance.

Flags: Read / Write / Construct

Allowed values: [0,1]

Default value: 1e-07