NcmVParam

NcmVParam — Properties of a vector-like parameter.

Functions

Properties

guint default-len Read / Write / Construct Only
NcmSParam * default-sparam Read / Write / Construct Only

Types and Values

Object Hierarchy

    GObject
    ╰── NcmVParam

Description

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

Functions

ncm_vparam_new ()

NcmVParam *
ncm_vparam_new (guint len,
                NcmSParam *default_param);

This function allocates memory for a new NcmVParam object and sets its properties to the values from the input arguments. len provides the number of components.

Parameters

len

vector length.

 

default_param

a NcmSParam.

 

Returns

A new NcmVParam.


ncm_vparam_full_new ()

NcmVParam *
ncm_vparam_full_new (guint len,
                     const gchar *name,
                     const gchar *symbol,
                     gdouble lower_bound,
                     gdouble upper_bound,
                     gdouble scale,
                     gdouble abstol,
                     gdouble default_val,
                     NcmParamType ftype);

This function allocates memory for a new NcmVParam 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

len

vector length.

 

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 NcmVParam.


ncm_vparam_ref ()

NcmVParam *
ncm_vparam_ref (NcmVParam *vparam);

Increases the reference count of vparam by one.

Parameters

vparam

a NcmVParam.

 

Returns

vparam .

[transfer full]


ncm_vparam_copy ()

NcmVParam *
ncm_vparam_copy (NcmVParam *vparam);

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

Parameters

vparam

a NcmVParam.

 

Returns

A new NcmVParam.

[transfer full]


ncm_vparam_free ()

void
ncm_vparam_free (NcmVParam *vparam);

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

Parameters

vparam

a NcmVParam.

 

ncm_vparam_clear ()

void
ncm_vparam_clear (NcmVParam **vparam);

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

Parameters

vparam

a NcmVParam.

 

ncm_vparam_set_len ()

void
ncm_vparam_set_len (NcmVParam *vparam,
                    guint len);

Sets the length of vparam to len .

Parameters

vparam

a NcmVParam.

 

len

lenght of the NcmVParam.

 

ncm_vparam_get_len ()

guint
ncm_vparam_get_len (NcmVParam *vparam);

Parameters

vparam

a NcmVParam.

 

Returns

The length of vparam .


ncm_vparam_set_sparam ()

void
ncm_vparam_set_sparam (NcmVParam *vparam,
                       guint n,
                       NcmSParam *spn);

Sets the NcmSParam associated with the n -th component of NcmVParam.

Parameters

vparam

a NcmVParam.

 

n

vector index.

 

spn

a NcmSParam.

 

ncm_vparam_set_sparam_full ()

void
ncm_vparam_set_sparam_full (NcmVParam *vparam,
                            guint n,
                            gchar *name,
                            gchar *symbol,
                            gdouble lower_bound,
                            gdouble upper_bound,
                            gdouble scale,
                            gdouble abstol,
                            gdouble default_val,
                            NcmParamType ftype);

This function sets the properties of the n -th vparam component.

Parameters

vparam

a NcmVParam.

 

n

vector index.

 

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.

 

ncm_vparam_peek_sparam ()

NcmSParam *
ncm_vparam_peek_sparam (const NcmVParam *vparam,
                        guint n);

This function does not increment the reference count of NcmSParam.

Parameters

vparam

a NcmVParam.

 

n

vector index.

 

Returns

A NcmSParam, which is the n -th component of vparam .

[transfer none]


ncm_vparam_get_sparam ()

NcmSParam *
ncm_vparam_get_sparam (NcmVParam *vparam,
                       guint n);

This function returns the n -th component of vparam increasing its reference count.

Parameters

vparam

a NcmVParam.

 

n

vector index.

 

Returns

A NcmSParam.

[transfer full]


ncm_vparam_set_lower_bound ()

void
ncm_vparam_set_lower_bound (NcmVParam *vparam,
                            guint n,
                            const gdouble lb);

Sets the value lb to the “lower-bound” property of the n -th component of vparam .

Parameters

vparam

a NcmVParam.

 

n

vector index.

 

lb

value of “lower-bound”.

 

ncm_vparam_set_upper_bound ()

void
ncm_vparam_set_upper_bound (NcmVParam *vparam,
                            guint n,
                            const gdouble ub);

Sets the value ub to the “upper-bound” property of the n -th component of vparam .

Parameters

vparam

a NcmVParam.

 

n

vector index.

 

ub

value of “upper-bound”.

 

ncm_vparam_set_scale ()

void
ncm_vparam_set_scale (NcmVParam *vparam,
                      guint n,
                      const gdouble scale);

Sets the value scale to the “scale” property of the n -th component of vparam .

Parameters

vparam

a NcmVParam.

 

n

vector index.

 

scale

value of “scale”.

 

ncm_vparam_set_absolute_tolerance ()

void
ncm_vparam_set_absolute_tolerance (NcmVParam *vparam,
                                   guint n,
                                   const gdouble abstol);

Sets the value abstol to the “absolute-tolerance” property of the n -th component of vparam .

Parameters

vparam

a NcmVParam.

 

n

vector index.

 

abstol

value of “absolute-tolerance”.

 

ncm_vparam_set_default_value ()

void
ncm_vparam_set_default_value (NcmVParam *vparam,
                              guint n,
                              const gdouble default_val);

Sets the value default_val to the “default-value” property of the n -th component of vparam .

Parameters

vparam

a NcmVParam.

 

n

vector index.

 

default_val

value of “default-value”.

 

ncm_vparam_set_fit_type ()

void
ncm_vparam_set_fit_type (NcmVParam *vparam,
                         guint n,
                         const NcmParamType ftype);

Sets ftype to the “fit-type” property of the n -th component of vparam .

Parameters

vparam

a NcmVParam.

 

n

vector index.

 

ftype

a NcmParamType.

 

ncm_vparam_name ()

const gchar *
ncm_vparam_name (const NcmVParam *vparam);

Gets the vparam base name.

Parameters

vparam

a NcmVParam.

 

Returns

vparam base name.

[transfer none]


ncm_vparam_symbol ()

const gchar *
ncm_vparam_symbol (const NcmVParam *vparam);

Gets the vparam base symbol.

Parameters

vparam

a NcmVParam.

 

Returns

vparam base symbol.

[transfer none]


ncm_vparam_get_lower_bound ()

gdouble
ncm_vparam_get_lower_bound (const NcmVParam *vparam,
                            guint n);

Parameters

vparam

a NcmVParam.

 

n

vector index.

 

Returns

The value of “lower-bound” property of the n -th component of vparam .


ncm_vparam_get_upper_bound ()

gdouble
ncm_vparam_get_upper_bound (const NcmVParam *vparam,
                            guint n);

Parameters

vparam

a NcmVParam.

 

n

vector index.

 

Returns

The value of “upper-bound” property of the n -th component of vparam .


ncm_vparam_get_scale ()

gdouble
ncm_vparam_get_scale (const NcmVParam *vparam,
                      guint n);

Parameters

vparam

a NcmVParam.

 

n

vector index.

 

Returns

The value of “scale” property of the n -th component of vparam .


ncm_vparam_get_absolute_tolerance ()

gdouble
ncm_vparam_get_absolute_tolerance (const NcmVParam *vparam,
                                   guint n);

Parameters

vparam

a NcmVParam.

 

n

vector index.

 

Returns

The value of “absolute-tolerance” property of the n -th component of vparam .


ncm_vparam_get_default_value ()

gdouble
ncm_vparam_get_default_value (const NcmVParam *vparam,
                              guint n);

Parameters

vparam

a NcmVParam.

 

n

vector index.

 

Returns

The value of “default-value” property of the n -th component of vparam .


ncm_vparam_get_fit_type ()

NcmParamType
ncm_vparam_get_fit_type (const NcmVParam *vparam,
                         guint n);

Parameters

vparam

a NcmVParam.

 

n

vector index.

 

Returns

The value of “fit-type” property of the n -th component of vparam .


ncm_vparam_len ()

guint
ncm_vparam_len (const NcmVParam *vparam);

Parameters

vparam

a NcmVParam.

 

Returns

The length of vparam .

Types and Values

NCM_TYPE_VPARAM

#define NCM_TYPE_VPARAM (ncm_vparam_get_type ())

NcmVParam

typedef struct _NcmVParam NcmVParam;

Property Details

The “default-len” property

  “default-len”              guint

Default length of the vector.

Owner: NcmVParam

Flags: Read / Write / Construct Only

Allowed values: >= 1

Default value: 1


The “default-sparam” property

  “default-sparam”           NcmSParam *

Default sparam for the vector components.

Owner: NcmVParam

Flags: Read / Write / Construct Only