NcmSParam

NcmSParam — Properties of a scalar parameter.

Properties

gdouble absolute-tolerance Read / Write
gdouble default-value Read / Write
NcmParamType fit-type Read / Write
gdouble lower-bound Read / Write
gchar * name Read / Write / Construct Only
gdouble scale Read / Write
gchar * symbol Read / Write / Construct Only
gdouble upper-bound Read / Write

Types and Values

Object Hierarchy

    GEnum
    ╰── NcmParamType
    GObject
    ╰── NcmSParam

Description

This object comprises the necessary properties to define a scalar parameter. It is used by NcmModel to store the description of the scalar model parameters.

Functions

ncm_sparam_new ()

NcmSParam *
ncm_sparam_new (gchar *name,
                gchar *symbol,
                gdouble lower_bound,
                gdouble upper_bound,
                gdouble scale,
                gdouble abstol,
                gdouble default_val,
                NcmParamType ftype);

This function allocates memory for a new NcmSParam object and sets its properties to the values from the input arguments.

The name parameter is restricted to the interval [lower_bound , upper_bound ]. scale is an initial step for the statistical algorithms. abstol is the absolute error tolerance of the parameter. ftype indicates if the parameter will be fitted or not.

Parameters

name

“name”.

 

symbol

“symbol”.

 

lower_bound

value of “lower-bound”.

 

upper_bound

value of “upper-bound”.

 

scale

value of “scale”.

 

abstol

value of “absolute-tolerance”.

 

default_val

value of “default-value”.

 

ftype

a NcmParamType.

 

Returns

A new NcmSParam.


ncm_sparam_copy ()

NcmSParam *
ncm_sparam_copy (NcmSParam *sparam);

Duplicates the NcmSParam object setting the same values of the original propertities.

Parameters

sparam

a NcmSParam.

 

Returns

A new NcmSParam.

[transfer full]


ncm_sparam_ref ()

NcmSParam *
ncm_sparam_ref (NcmSParam *sparam);

Atomically increase the reference count of sparam by one.

Parameters

sparam

a NcmSParam.

 

Returns

sparam .

[transfer full]


ncm_sparam_free ()

void
ncm_sparam_free (NcmSParam *sparam);

Atomically decrements the reference count of sparam by one. If the reference count drops to 0, all memory allocated by sparam is released.

Parameters

sparam

a NcmSParam.

 

ncm_sparam_clear ()

void
ncm_sparam_clear (NcmSParam **sparam);

Atomically decrements the reference count of sparam by one. If the reference count drops to 0, all memory allocated by sparam is released. Set the pointer to NULL.

Parameters

sparam

a NcmSParam.

 

ncm_sparam_set_lower_bound ()

void
ncm_sparam_set_lower_bound (NcmSParam *sparam,
                            const gdouble lb);

Sets the value lb to the “lower-bound” property.

Parameters

sparam

a NcmSParam.

 

lb

value of “lower-bound”.

 

ncm_sparam_set_upper_bound ()

void
ncm_sparam_set_upper_bound (NcmSParam *sparam,
                            const gdouble ub);

Sets the value ub to the “upper-bound” property.

Parameters

sparam

a NcmSParam.

 

ub

value of “upper-bound”.

 

ncm_sparam_set_scale ()

void
ncm_sparam_set_scale (NcmSParam *sparam,
                      const gdouble scale);

Sets the value scale to the “scale” property.

Parameters

sparam

a NcmSParam.

 

scale

value of “scale”.

 

ncm_sparam_set_absolute_tolerance ()

void
ncm_sparam_set_absolute_tolerance (NcmSParam *sparam,
                                   const gdouble abstol);

Sets the value abstol to the “absolute-tolerance” property.

Parameters

sparam

a NcmSParam.

 

abstol

value of “absolute-tolerance”.

 

ncm_sparam_set_default_value ()

void
ncm_sparam_set_default_value (NcmSParam *sparam,
                              const gdouble default_val);

Sets the value default_val to the “default-value” property.

Parameters

sparam

a NcmSParam.

 

default_val

value of “default-value”.

 

ncm_sparam_set_fit_type ()

void
ncm_sparam_set_fit_type (NcmSParam *sparam,
                         const NcmParamType ftype);

Sets the value ftype to the “fit-type” property.

Parameters

sparam

a NcmSParam.

 

ftype

a NcmParamType.

 

ncm_sparam_take_name ()

void
ncm_sparam_take_name (NcmSParam *sparam,
                      gchar *name);

Take name as the name string. The caller doesn't have to free it any more.

Parameters

sparam

a NcmSParam.

 

name

a string

 

ncm_sparam_take_symbol ()

void
ncm_sparam_take_symbol (NcmSParam *sparam,
                        gchar *symbol);

Take symbol as the symbol string. The caller doesn't have to free it any more.

Parameters

sparam

a NcmSParam.

 

symbol

a string

 

ncm_sparam_name ()

const gchar *
ncm_sparam_name (const NcmSParam *sparam);

Parameters

sparam

a NcmSParam.

 

Returns

the internal name string. The caller must not free it.


ncm_sparam_symbol ()

const gchar *
ncm_sparam_symbol (const NcmSParam *sparam);

Parameters

sparam

a NcmSParam.

 

Returns

the internal symbol string. The caller must not free it.


ncm_sparam_get_lower_bound ()

gdouble
ncm_sparam_get_lower_bound (const NcmSParam *sparam);

Parameters

sparam

a NcmSParam.

 

Returns

the value of “lower-bound” property.


ncm_sparam_get_upper_bound ()

gdouble
ncm_sparam_get_upper_bound (const NcmSParam *sparam);

Parameters

sparam

a NcmSParam.

 

Returns

The value of “upper-bound” property.


ncm_sparam_get_scale ()

gdouble
ncm_sparam_get_scale (const NcmSParam *sparam);

Parameters

sparam

a NcmSParam.

 

Returns

The value of “scale” property.


ncm_sparam_get_absolute_tolerance ()

gdouble
ncm_sparam_get_absolute_tolerance (const NcmSParam *sparam);

Parameters

sparam

a NcmSParam.

 

Returns

the value of “absolute_tolerance” property.


ncm_sparam_get_default_value ()

gdouble
ncm_sparam_get_default_value (const NcmSParam *sparam);

Parameters

sparam

a NcmSParam.

 

Returns

the value of “default-value” property.


ncm_sparam_get_fit_type ()

NcmParamType
ncm_sparam_get_fit_type (const NcmSParam *sparam);

Parameters

sparam

a NcmSParam.

 

Returns

the NcmParamType value of “fit-type” property.

Types and Values

enum NcmParamType

FIXME

Members

NCM_PARAM_TYPE_FREE

FIXME

 

NCM_PARAM_TYPE_FIXED

FIXME

 

Property Details

The “absolute-tolerance” property

  “absolute-tolerance”       gdouble

Absolute tolerance, whose value is restricted to [0, G_MAXDOUBLE], is the size of the error used by NcmFit.

Flags: Read / Write

Allowed values: >= 0

Default value: 0


The “default-value” property

  “default-value”            gdouble

Parameter's default value.

Flags: Read / Write

Default value: 0


The “fit-type” property

  “fit-type”                 NcmParamType

Parameter's fit type: FIXED or FREE.

Flags: Read / Write

Default value: NCM_PARAM_TYPE_FREE


The “lower-bound” property

  “lower-bound”              gdouble

Lower parameter threshold whose value is restricted to [-G_MAXDOUBLE, G_MAXDOUBLE].

Flags: Read / Write

Default value: 0


The “name” property

  “name”                     gchar *

The parameter' s name must be a string written using only ASCII and -.

Flags: Read / Write / Construct Only

Default value: NULL


The “scale” property

  “scale”                    gdouble

Scale, whose value is restricted to [0, G_MAXDOUBLE], is the step used by NcmFit to increment the value of the parameter.

Flags: Read / Write

Allowed values: >= 0

Default value: 0


The “symbol” property

  “symbol”                   gchar *

Parameter's name written in a usual form (including latex).

Flags: Read / Write / Construct Only

Default value: NULL


The “upper-bound” property

  “upper-bound”              gdouble

Upper parameter threshold whose value is restricted to [-G_MAXDOUBLE, G_MAXDOUBLE].

Flags: Read / Write

Default value: 0