Model Vector Parameter Description

Model Vector Parameter Description — Describes the properties of a vector parameter

Synopsis

struct              NcmVParamClass;
struct              NcmVParam;
NcmVParam *         ncm_vparam_new                      (guint len,
                                                         NcmSParam *default_param);
NcmVParam *         ncm_vparam_full_new                 (guint len,
                                                         gchar *name,
                                                         gchar *symbol,
                                                         gdouble lower_bound,
                                                         gdouble upper_bound,
                                                         gdouble scale,
                                                         gdouble abstol,
                                                         gdouble default_val,
                                                         NcmParamType ftype);
NcmVParam *         ncm_vparam_copy                     (NcmVParam *vparam);
void                ncm_vparam_free                     (NcmVParam *vparam);
void                ncm_vparam_clear                    (NcmVParam **vparam);
void                ncm_vparam_set_len                  (NcmVParam *vparam,
                                                         guint len);
guint               ncm_vparam_get_len                  (NcmVParam *vparam);
void                ncm_vparam_set_sparam               (NcmVParam *vparam,
                                                         guint n,
                                                         NcmSParam *spn);
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);
NcmSParam *         ncm_vparam_peek_sparam              (const NcmVParam *vparam,
                                                         guint n);
NcmSParam *         ncm_vparam_get_sparam               (NcmVParam *vparam,
                                                         guint n);
void                ncm_vparam_set_lower_bound          (NcmVParam *vparam,
                                                         guint n,
                                                         const gdouble lb);
void                ncm_vparam_set_upper_bound          (NcmVParam *vparam,
                                                         guint n,
                                                         const gdouble ub);
void                ncm_vparam_set_scale                (NcmVParam *vparam,
                                                         guint n,
                                                         const gdouble scale);
void                ncm_vparam_set_absolute_tolerance   (NcmVParam *vparam,
                                                         guint n,
                                                         const gdouble abstol);
void                ncm_vparam_set_default_value        (NcmVParam *vparam,
                                                         guint n,
                                                         const gdouble default_val);
void                ncm_vparam_set_fit_type             (NcmVParam *vparam,
                                                         guint n,
                                                         const NcmParamType ftype);
gdouble             ncm_vparam_get_lower_bound          (const NcmVParam *vparam,
                                                         guint n);
gdouble             ncm_vparam_get_upper_bound          (const NcmVParam *vparam,
                                                         guint n);
gdouble             ncm_vparam_get_scale                (const NcmVParam *vparam,
                                                         guint n);
gdouble             ncm_vparam_get_absolute_tolerance   (const NcmVParam *vparam,
                                                         guint n);
gdouble             ncm_vparam_get_default_value        (const NcmVParam *vparam,
                                                         guint n);
NcmParamType        ncm_vparam_get_fit_type             (const NcmVParam *vparam,
                                                         guint n);

Object Hierarchy

  GObject
   +----NcmVParam

Properties

  "default-sparam"           NcmSParam*            : Read / Write / Construct Only

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.

Details

struct NcmVParamClass

struct NcmVParamClass {
};

struct NcmVParam

struct NcmVParam;

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.

len :

vector length.

default_param :

a NcmSParam.

Returns :

A new NcmVParam.

ncm_vparam_full_new ()

NcmVParam *         ncm_vparam_full_new                 (guint len,
                                                         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 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.

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_copy ()

NcmVParam *         ncm_vparam_copy                     (NcmVParam *vparam);

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

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.

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.

vparam :

a NcmVParam.

ncm_vparam_set_len ()

void                ncm_vparam_set_len                  (NcmVParam *vparam,
                                                         guint len);

Sets the length of vparam to len.

vparam :

a NcmVParam.

len :

lenght of the NcmVParam.

ncm_vparam_get_len ()

guint               ncm_vparam_get_len                  (NcmVParam *vparam);

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

vparam :

a NcmVParam.

n :

vector index.

ftype :

a NcmParamType.

ncm_vparam_get_lower_bound ()

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

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);

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);

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);

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);

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);

vparam :

a NcmVParam.

n :

vector index.

Returns :

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

Property Details

The "default-sparam" property

  "default-sparam"           NcmSParam*            : Read / Write / Construct Only

Default sparam for the vector components.