| Top |
Functions
Properties
| guint64 | implementation | Read |
| gchar * | name | Read |
| gchar * | nick | Read |
| GArray * | params-types | Read |
| NcmReparam * | reparam | Read / Write |
| guint | scalar-params-len | Read |
| NcmObjArray * | submodel-array | Read / Write |
| guint | vector-params-len | Read |
Object Hierarchy
GObject ╰── NcmModel ├── NcClusterMass ├── NcClusterRedshift ├── NcClusterPseudoCounts ├── NcDensityProfile ├── NcHICosmo ├── NcHICosmoQSplineContPrior ├── NcHIPrim ├── NcHIReion ├── NcPlanckFI ├── NcReducedShearClusterMass ├── NcSNIADistCov ├── NcWLSurfaceMassDensity ╰── NcXcorLimberKernel
Description
The NcmModel abstract class represents a general model. This object serves for two general objectives. First, all the numerical properties (doubles), i.e., parameters, are implemented by the class functions described below, this allows the implementation of a general statistical analyses based on these models. Second, each child of NcmModel can register itself as a model type. This allows multiples models types to be used simultaneously.
Functions
NcmModelVFunc2 ()
gdouble (*NcmModelVFunc2) (NcmModel *model,const guint n,const gdouble x,const gdouble y);
ncm_model_class_add_params ()
void ncm_model_class_add_params (NcmModelClass *model_class,guint sparam_len,guint vparam_len,guint nonparam_prop_len);
FIXME
ncm_model_class_set_name_nick ()
void ncm_model_class_set_name_nick (NcmModelClass *model_class,const gchar *name,const gchar *nick);
Attributes name
and nick
, respectively, as the name and nickname of the model.
ncm_model_class_set_sparam_obj ()
void ncm_model_class_set_sparam_obj (NcmModelClass *model_class,guint sparam_id,NcmSParam *sparam);
FIXME
ncm_model_class_set_vparam_obj ()
void ncm_model_class_set_vparam_obj (NcmModelClass *model_class,guint vparam_id,NcmVParam *vparam);
FIXME
ncm_model_class_set_sparam ()
void ncm_model_class_set_sparam (NcmModelClass *model_class,guint sparam_id,const gchar *symbol,const gchar *name,gdouble lower_bound,gdouble upper_bound,gdouble scale,gdouble abstol,gdouble default_value,NcmParamType ppt);
FIXME
ncm_model_class_set_vparam ()
void ncm_model_class_set_vparam (NcmModelClass *model_class,guint vparam_id,guint default_length,const gchar *symbol,const gchar *name,gdouble lower_bound,gdouble upper_bound,gdouble scale,gdouble abstol,gdouble default_value,NcmParamType ppt);
FIXME
ncm_model_class_check_params_info ()
void
ncm_model_class_check_params_info (NcmModelClass *model_class);
FIXME
ncm_model_class_add_impl_opts ()
void ncm_model_class_add_impl_opts (NcmModelClass *model_class,gint opt1,...);
FIXME
[skip]
ncm_model_class_add_impl_flag ()
void ncm_model_class_add_impl_flag (NcmModelClass *model_class,guint64 flag);
FIXME
[skip]
ncm_model_dup ()
NcmModel * ncm_model_dup (NcmModel *model,NcmSerialize *ser);
Duplicates model
by serializing and deserializing it.
ncm_model_free ()
void
ncm_model_free (NcmModel *model);
Atomically decrements the reference count of model
by one. If the reference count drops to 0,
all memory allocated by model
is released.
ncm_model_clear ()
void
ncm_model_clear (NcmModel **model);
Atomically decrements the reference count of model
by one. If the reference count drops to 0,
all memory allocated by model
is released. Set pointer to NULL.
ncm_model_is_equal ()
gboolean ncm_model_is_equal (NcmModel *model1,NcmModel *model2);
Compares if model1 and model2 are the same, with same dimension and reparametrization.
ncm_model_check_impl_flag ()
gboolean ncm_model_check_impl_flag (NcmModel *model,guint64 impl);
FIXME
ncm_model_check_impl_opts ()
gboolean ncm_model_check_impl_opts (NcmModel *model,gint opt1,...);
FIXME
Parameters
model |
a NcmModel |
|
opt1 |
first implementation option |
|
... |
implementation options, must end with -1 |
ncm_model_params_update ()
void
ncm_model_params_update (NcmModel *model);
Force the parameters to the update its internal flags and update the original parameters if necessary.
ncm_model_orig_params_update ()
void
ncm_model_orig_params_update (NcmModel *model);
Update the new parameters. It causes an error to call this function with a model without reparametrization.
ncm_model_orig_params_peek_vector ()
NcmVector *
ncm_model_orig_params_peek_vector (NcmModel *model);
Peeks the original parameters vector. This functions is provided for reparametrization implementations, do not use it in other contexts.
ncm_model_orig_param_set ()
void ncm_model_orig_param_set (NcmModel *model,guint n,gdouble val);
FIXME
ncm_model_orig_vparam_set ()
void ncm_model_orig_vparam_set (NcmModel *model,guint n,guint i,gdouble val);
ncm_model_orig_vparam_set_vector ()
void ncm_model_orig_vparam_set_vector (NcmModel *model,guint n,NcmVector *val);
FIXME
ncm_model_param_peek_desc ()
NcmSParam * ncm_model_param_peek_desc (NcmModel *model,guint n);
Peeks the n
-th parameter description.
ncm_model_orig_vparam_get_vector ()
NcmVector * ncm_model_orig_vparam_get_vector (NcmModel *model,guint n);
FIXME
ncm_model_params_copyto ()
void ncm_model_params_copyto (NcmModel *model,NcmModel *model_dest);
FIXME
ncm_model_params_set_all_data ()
void ncm_model_params_set_all_data (NcmModel *model,gdouble *data);
FIXME
ncm_model_params_set_vector ()
void ncm_model_params_set_vector (NcmModel *model,NcmVector *v);
FIXME
ncm_model_params_set_model ()
void ncm_model_params_set_model (NcmModel *model,NcmModel *model_src);
FIXME
ncm_model_params_print_all ()
void ncm_model_params_print_all (NcmModel *model,FILE *out);
FIXME
[skip]
ncm_model_params_valid_bounds ()
gboolean
ncm_model_params_valid_bounds (NcmModel *model);
Check whenever the paremeters respect the bounds.
ncm_model_orig_param_index_from_name ()
gboolean ncm_model_orig_param_index_from_name (NcmModel *model,const gchar *param_name,guint *i);
Looks for parameter named param_name
in the original parameters of model
and puts its index in i
and returns TRUE if found.
ncm_model_param_index_from_name ()
gboolean ncm_model_param_index_from_name (NcmModel *model,const gchar *param_name,guint *i);
Looks for parameter named param_name
in model
and puts its index in i
and returns TRUE if found.
ncm_model_orig_param_symbol ()
const gchar * ncm_model_orig_param_symbol (NcmModel *model,guint n);
ncm_model_param_set_by_name ()
void ncm_model_param_set_by_name (NcmModel *model,const gchar *param_name,gdouble val);
Sets the parameter value val
by param_name
.
ncm_model_orig_param_set_by_name ()
void ncm_model_orig_param_set_by_name (NcmModel *model,const gchar *param_name,gdouble val);
Sets the parameter value val
by param_name
.
ncm_model_param_get_by_name ()
gdouble ncm_model_param_get_by_name (NcmModel *model,const gchar *param_name);
Gets the parameter value by param_name
ncm_model_orig_param_get_by_name ()
gdouble ncm_model_orig_param_get_by_name (NcmModel *model,const gchar *param_name);
Gets the original parameter value by param_name
.
ncm_model_orig_param_get_scale ()
gdouble ncm_model_orig_param_get_scale (NcmModel *model,guint n);
Gets the scale of the original n
-th parameter.
ncm_model_orig_param_get_lower_bound ()
gdouble ncm_model_orig_param_get_lower_bound (NcmModel *model,guint n);
Gets the lower bound of the original n
-th parameter.
ncm_model_orig_param_get_upper_bound ()
gdouble ncm_model_orig_param_get_upper_bound (NcmModel *model,guint n);
Gets the upper bound of the original n
-th parameter.
ncm_model_orig_param_get_abstol ()
gdouble ncm_model_orig_param_get_abstol (NcmModel *model,guint n);
Gets the absolute tolerance of the original n
-th parameter.
ncm_model_param_get_scale ()
gdouble ncm_model_param_get_scale (NcmModel *model,guint n);
Gets the scale of the n
-th parameter.
ncm_model_param_get_lower_bound ()
gdouble ncm_model_param_get_lower_bound (NcmModel *model,guint n);
Gets the lower bound of the n
-th parameter.
ncm_model_param_get_upper_bound ()
gdouble ncm_model_param_get_upper_bound (NcmModel *model,guint n);
Gets the upper bound of the n
-th parameter.
ncm_model_param_get_abstol ()
gdouble ncm_model_param_get_abstol (NcmModel *model,guint n);
Gets the absolute tolerance of the n
-th parameter.
ncm_model_param_get_ftype ()
NcmParamType ncm_model_param_get_ftype (NcmModel *model,guint n);
Gets the fitting type of the n
-th parameter.
ncm_model_param_set_scale ()
void ncm_model_param_set_scale (NcmModel *model,guint n,const gdouble scale);
FIXME
ncm_model_param_set_lower_bound ()
void ncm_model_param_set_lower_bound (NcmModel *model,guint n,const gdouble lb);
Sets lb
as the lower-bound value of the n
-th parameter.
ncm_model_param_set_upper_bound ()
void ncm_model_param_set_upper_bound (NcmModel *model,guint n,const gdouble ub);
Sets ub
as the lower-bound value of the n
-th parameter.
ncm_model_param_set_abstol ()
void ncm_model_param_set_abstol (NcmModel *model,guint n,const gdouble abstol);
FIXME
ncm_model_param_set_ftype ()
void ncm_model_param_set_ftype (NcmModel *model,guint n,const NcmParamType ptype);
Sets ptype
as NcmParamType of the n
-th parameter.
ncm_model_reparam_df ()
void ncm_model_reparam_df (NcmModel *model,NcmVector *fv,NcmVector *v);
FIXME
ncm_model_reparam_J ()
void ncm_model_reparam_J (NcmModel *model,NcmMatrix *fJ,NcmMatrix *J);
FIXME
ncm_model_main_model ()
NcmModelID
ncm_model_main_model (NcmModel *model);
If model
is a submodel returns the NcmModelID of its
main model, otherwise returns -1.
ncm_model_add_submodel ()
void ncm_model_add_submodel (NcmModel *model,NcmModel *submodel);
Adds the submodel
to the model
submodels.
[virtual add_submodel]
ncm_model_get_submodel_len ()
guint
ncm_model_get_submodel_len (NcmModel *model);
Gets the number of submodels set in model
.
ncm_model_peek_submodel ()
NcmModel * ncm_model_peek_submodel (NcmModel *model,guint i);
Gets the i
-th submodel.
ncm_model_peek_submodel_by_mid ()
NcmModel * ncm_model_peek_submodel_by_mid (NcmModel *model,NcmModelID mid);
Gets the submodel if type NcmModelID mid
.
ncm_model_peek_submodel_pos_by_mid ()
gint ncm_model_peek_submodel_pos_by_mid (NcmModel *model,NcmModelID mid);
Gets the submodel type NcmModelID mid
position.
ncm_model_type_main_model ()
NcmModelID
ncm_model_type_main_model (GType model_type);
If model_type
is a submodel returns the NcmModelID of its
main model, otherwise returns -1.
NCM_MODEL_2OPT2IMPL()
#define NCM_MODEL_2OPT2IMPL(opt1,opt2) (NCM_MODEL_OPT2IMPL (opt1) | NCM_MODEL_OPT2IMPL (opt2))
NCM_MODEL_3OPT2IMPL()
#define NCM_MODEL_3OPT2IMPL(opt1,opt2,opt3) (NCM_MODEL_2OPT2IMPL (opt1, opt2) | NCM_MODEL_OPT2IMPL (opt3))
NCM_MODEL_4OPT2IMPL()
#define NCM_MODEL_4OPT2IMPL(opt1,opt2,opt3,opt4) (NCM_MODEL_2OPT2IMPL (opt1, opt2) | NCM_MODEL_2OPT2IMPL (opt3, opt4))
Property Details
The “implementation” property
“implementation” guint64
Bitwise specification of functions implementation.
Flags: Read
Default value: 0
The “scalar-params-len” property
“scalar-params-len” guint
Number of scalar parameters.
Flags: Read
Default value: 0
The “submodel-array” property
“submodel-array” NcmObjArray *
NcmModel array of submodels.
Flags: Read / Write
The “vector-params-len” property
“vector-params-len” guint
Number of vector parameters.
Flags: Read
Default value: 0