![]() |
![]() |
![]() |
NumCosmo Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
Model Scalar Parameter DescriptionModel Scalar Parameter Description — Describes the properties of a scalar parameter. |
enum NcmParamType; struct NcmSParam; struct NcmSParamClass; NcmSParam * ncm_sparam_copy (NcmSParam *sparam
); void ncm_sparam_free (NcmSParam *sparam
); gdouble ncm_sparam_get_absolute_tolerance (const NcmSParam *sparam
); gdouble ncm_sparam_get_default_value (const NcmSParam *sparam
); NcmParamType ncm_sparam_get_fit_type (const NcmSParam *sparam
); gdouble ncm_sparam_get_lower_bound (const NcmSParam *sparam
); gdouble ncm_sparam_get_scale (const NcmSParam *sparam
); gdouble ncm_sparam_get_upper_bound (const NcmSParam *sparam
); const gchar * ncm_sparam_name (const NcmSParam *sparam
); NcmSParam * ncm_sparam_new (gchar *name
,gchar *symbol
,gdouble lower_bound
,gdouble upper_bound
,gdouble scale
,gdouble abstol
,gdouble default_val
,NcmParamType ftype
); NcmSParam * ncm_sparam_ref (NcmSParam *sparam
); void ncm_sparam_set_absolute_tolerance (NcmSParam *sparam
,const gdouble abstol
); void ncm_sparam_set_default_value (NcmSParam *sparam
,const gdouble default_val
); void ncm_sparam_set_fit_type (NcmSParam *sparam
,const NcmParamType ftype
); void ncm_sparam_set_lower_bound (NcmSParam *sparam
,const gdouble lb
); void ncm_sparam_set_scale (NcmSParam *sparam
,const gdouble scale
); void ncm_sparam_set_upper_bound (NcmSParam *sparam
,const gdouble ub
); const gchar * ncm_sparam_symbol (const NcmSParam *sparam
); void ncm_sparam_take_name (NcmSParam *sparam
,gchar *name
); void ncm_sparam_take_symbol (NcmSParam *sparam
,gchar *symbol
);
"absolute-tolerance" gdouble : Read / Write "default-value" gdouble : Read / Write "fit-type" NcmParamType : Read / Write "lower-bound" gdouble : Read / Write "name" gchar* : Read / Write / Construct Only "scale" gdouble : Read / Write "symbol" gchar* : Read / Write / Construct Only "upper-bound" gdouble : Read / Write
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.
typedef enum { NCM_PARAM_TYPE_FREE = 0, NCM_PARAM_TYPE_FIXED, } NcmParamType;
FIXME
NcmSParam * ncm_sparam_copy (NcmSParam *sparam
);
Duplicates the NcmSParam object setting the same values of the original propertities.
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.
|
a NcmSParam. |
gdouble ncm_sparam_get_absolute_tolerance (const NcmSParam *sparam
);
|
a NcmSParam. |
Returns : |
the value of "absolute_tolerance" property. |
gdouble ncm_sparam_get_default_value (const NcmSParam *sparam
);
|
a NcmSParam. |
Returns : |
the value of "default-value" property. |
NcmParamType ncm_sparam_get_fit_type (const NcmSParam *sparam
);
|
a NcmSParam. |
Returns : |
the NcmParamType value of "fit-type" property. |
gdouble ncm_sparam_get_lower_bound (const NcmSParam *sparam
);
|
a NcmSParam. |
Returns : |
the value of "lower-bound" property. |
gdouble ncm_sparam_get_upper_bound (const NcmSParam *sparam
);
|
a NcmSParam. |
Returns : |
The value of "upper-bound" property. |
const gchar * ncm_sparam_name (const NcmSParam *sparam
);
|
a NcmSParam. |
Returns : |
the internal name string. The caller must not free it. |
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.
|
"name". |
|
"symbol". |
|
value of "lower-bound". |
|
value of "upper-bound". |
|
value of "scale". |
|
value of "absolute-tolerance". |
|
value of "default-value". |
|
a NcmParamType. |
Returns : |
A new NcmSParam. |
NcmSParam * ncm_sparam_ref (NcmSParam *sparam
);
Atomically increase the reference count of sparam
by one.
|
a NcmSParam. |
Returns : |
sparam . [transfer full]
|
void ncm_sparam_set_absolute_tolerance (NcmSParam *sparam
,const gdouble abstol
);
Sets the value abstol
to the "absolute-tolerance" property.
|
a NcmSParam. |
|
value of "absolute-tolerance". |
void ncm_sparam_set_default_value (NcmSParam *sparam
,const gdouble default_val
);
Sets the value default_val
to the "default-value" property.
|
a NcmSParam. |
|
value of "default-value". |
void ncm_sparam_set_fit_type (NcmSParam *sparam
,const NcmParamType ftype
);
Sets the value ftype
to the "fit-type" property.
|
a NcmSParam. |
|
a NcmParamType. |
void ncm_sparam_set_lower_bound (NcmSParam *sparam
,const gdouble lb
);
Sets the value lb
to the "lower-bound" property.
|
a NcmSParam. |
|
value of "lower-bound". |
void ncm_sparam_set_scale (NcmSParam *sparam
,const gdouble scale
);
Sets the value scale
to the "scale" property.
void ncm_sparam_set_upper_bound (NcmSParam *sparam
,const gdouble ub
);
Sets the value ub
to the "upper-bound" property.
|
a NcmSParam. |
|
value of "upper-bound". |
const gchar * ncm_sparam_symbol (const NcmSParam *sparam
);
|
a NcmSParam. |
Returns : |
the internal symbol string. The caller must not free it. |
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.
|
a NcmSParam. |
|
a string |
"absolute-tolerance"
property "absolute-tolerance" gdouble : Read / Write
Absolute tolerance, whose value is restricted to [0, G_MAXDOUBLE], is the size of the error used by NcmFit.
Allowed values: >= 0
Default value: 0
"default-value"
property "default-value" gdouble : Read / Write
Parameter's default value.
Default value: 0
"fit-type"
property"fit-type" NcmParamType : Read / Write
Parameter's fit type: FIXED or FREE.
Default value: NCM_PARAM_TYPE_FREE
"lower-bound"
property "lower-bound" gdouble : Read / Write
Lower parameter threshold whose value is restricted to [-G_MAXDOUBLE, G_MAXDOUBLE].
Default value: 0
"name"
property "name" gchar* : Read / Write / Construct Only
The parameter' s name must be a string written using only ASCII and -.
Default value: NULL
"scale"
property "scale" gdouble : Read / Write
Scale, whose value is restricted to [0, G_MAXDOUBLE], is the step used by NcmFit to increment the value of the parameter.
Allowed values: >= 0
Default value: 0
"symbol"
property "symbol" gchar* : Read / Write / Construct Only
Parameter's name written in a usual form (including latex).
Default value: NULL