NcmModel

NcmModel — Abstract class for implementing models.

Functions

void (*NcmModelAddSubmodel) ()
gdouble (*NcmModelFunc0) ()
gdouble (*NcmModelFunc1) ()
gdouble (*NcmModelFunc2) ()
gdouble (*NcmModelVFunc0) ()
gdouble (*NcmModelVFunc1) ()
gdouble (*NcmModelVFunc2) ()
void ncm_model_class_add_params ()
void ncm_model_class_set_name_nick ()
void ncm_model_class_set_sparam_obj ()
void ncm_model_class_set_vparam_obj ()
void ncm_model_class_set_sparam ()
void ncm_model_class_set_vparam ()
void ncm_model_class_check_params_info ()
void ncm_model_class_add_impl_opts ()
void ncm_model_class_add_impl_flag ()
NcmModel * ncm_model_dup ()
NcmModel * ncm_model_ref ()
void ncm_model_free ()
void ncm_model_clear ()
void ncm_model_set_reparam ()
gboolean ncm_model_is_equal ()
NcmModelID ncm_model_id ()
NcmModelID ncm_model_id_by_type ()
gboolean ncm_model_check_impl_flag ()
gboolean ncm_model_check_impl_opt ()
gboolean ncm_model_check_impl_opts ()
guint ncm_model_len ()
gboolean ncm_model_state_is_update ()
void ncm_model_state_set_update ()
void ncm_model_state_mark_outdated ()
guint ncm_model_sparam_len ()
guint ncm_model_vparam_array_len ()
guint ncm_model_vparam_index ()
guint ncm_model_vparam_len ()
const gchar * ncm_model_name ()
const gchar * ncm_model_nick ()
NcmReparam * ncm_model_peek_reparam ()
gboolean ncm_model_params_finite ()
gboolean ncm_model_param_finite ()
void ncm_model_params_update ()
void ncm_model_orig_params_update ()
NcmVector * ncm_model_orig_params_peek_vector ()
void ncm_model_orig_params_log_all ()
void ncm_model_param_set ()
void ncm_model_param_set_default ()
void ncm_model_orig_param_set ()
void ncm_model_orig_vparam_set ()
void ncm_model_orig_vparam_set_vector ()
NcmSParam * ncm_model_param_peek_desc ()
gdouble ncm_model_param_get ()
gdouble ncm_model_orig_param_get ()
gdouble ncm_model_orig_vparam_get ()
NcmVector * ncm_model_orig_vparam_get_vector ()
void ncm_model_params_copyto ()
void ncm_model_params_set_default ()
void ncm_model_params_save_as_default ()
void ncm_model_params_set_all ()
void ncm_model_params_set_all_data ()
void ncm_model_params_set_vector ()
void ncm_model_params_set_model ()
void ncm_model_params_print_all ()
void ncm_model_params_log_all ()
NcmVector * ncm_model_params_get_all ()
gboolean ncm_model_params_valid ()
gboolean ncm_model_params_valid_bounds ()
gboolean ncm_model_orig_param_index_from_name ()
gboolean ncm_model_param_index_from_name ()
const gchar * ncm_model_orig_param_name ()
const gchar * ncm_model_param_name ()
const gchar * ncm_model_orig_param_symbol ()
const gchar * ncm_model_param_symbol ()
void ncm_model_param_set_by_name ()
void ncm_model_orig_param_set_by_name ()
gdouble ncm_model_param_get_by_name ()
gdouble ncm_model_orig_param_get_by_name ()
gdouble ncm_model_orig_param_get_scale ()
gdouble ncm_model_orig_param_get_lower_bound ()
gdouble ncm_model_orig_param_get_upper_bound ()
gdouble ncm_model_orig_param_get_abstol ()
gdouble ncm_model_param_get_scale ()
gdouble ncm_model_param_get_lower_bound ()
gdouble ncm_model_param_get_upper_bound ()
gdouble ncm_model_param_get_abstol ()
NcmParamType ncm_model_param_get_ftype ()
void ncm_model_param_set_scale ()
void ncm_model_param_set_lower_bound ()
void ncm_model_param_set_upper_bound ()
void ncm_model_param_set_abstol ()
void ncm_model_param_set_ftype ()
void ncm_model_reparam_df ()
void ncm_model_reparam_J ()
gboolean ncm_model_is_submodel ()
NcmModelID ncm_model_main_model ()
void ncm_model_add_submodel ()
guint ncm_model_get_submodel_len ()
NcmModel * ncm_model_peek_submodel ()
NcmModel * ncm_model_peek_submodel_by_mid ()
gint ncm_model_peek_submodel_pos_by_mid ()
gboolean ncm_model_type_is_submodel ()
NcmModelID ncm_model_type_main_model ()
#define NCM_MODEL_OPT2IMPL()
#define NCM_MODEL_2OPT2IMPL()
#define NCM_MODEL_3OPT2IMPL()
#define NCM_MODEL_4OPT2IMPL()
#define NCM_MODEL_SET_IMPL_FUNC()
#define NCM_MODEL_FUNC0_IMPL()
#define NCM_MODEL_FUNC1_IMPL()
#define NCM_MODEL_FUNC2_IMPL()
#define NCM_MODEL_VFUNC0_IMPL()
#define NCM_MODEL_VFUNC1_IMPL()
#define NCM_MODEL_VFUNC2_IMPL()
NcmSParam * ncm_model_orig_param_peek_desc ()

Properties

Types and Values

Object Hierarchy

    GObject
    ╰── NcmModel
        ├── NcClusterMass
        ├── NcClusterRedshift
        ├── NcClusterPseudoCounts
        ├── NcDensityProfile
        ├── NcHICosmo
        ├── NcHICosmoQSplineContPrior
        ├── NcHIPrim
        ├── NcHIReion
        ├── NcPlanckFI
        ├── NcReducedShearCalib
        ├── NcReducedShearClusterMass
        ├── NcSNIADistCov
        ├── NcWLSurfaceMassDensity
        ├── NcXcorLimberKernel
        ╰── NcmModelMVND

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

NcmModelAddSubmodel ()

void
(*NcmModelAddSubmodel) (NcmModel *model,
                        NcmModel *submodel);

NcmModelFunc0 ()

gdouble
(*NcmModelFunc0) (NcmModel *model);

NcmModelFunc1 ()

gdouble
(*NcmModelFunc1) (NcmModel *model,
                  const gdouble x);

NcmModelFunc2 ()

gdouble
(*NcmModelFunc2) (NcmModel *model,
                  const gdouble x,
                  const gdouble y);

NcmModelVFunc0 ()

gdouble
(*NcmModelVFunc0) (NcmModel *model,
                   const guint n);

NcmModelVFunc1 ()

gdouble
(*NcmModelVFunc1) (NcmModel *model,
                   const guint n,
                   const gdouble x);

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

Parameters

model_class

a NcmModelClass

 

sparam_len

number of scalar paramters

 

vparam_len

number of vector parameters

 

nonparam_prop_len

number of properties

 

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.

Parameters

model_class

a NcmModelClass

 

name

name and/or very short description of the model

 

nick

model nickname

 

ncm_model_class_set_sparam_obj ()

void
ncm_model_class_set_sparam_obj (NcmModelClass *model_class,
                                guint sparam_id,
                                NcmSParam *sparam);

FIXME

Parameters

model_class

a NcmModelClass

 

sparam_id

id of the scalar parameter

 

sparam

a NcmSParam

 

ncm_model_class_set_vparam_obj ()

void
ncm_model_class_set_vparam_obj (NcmModelClass *model_class,
                                guint vparam_id,
                                NcmVParam *vparam);

FIXME

Parameters

model_class

a NcmModelClass

 

vparam_id

id of the vector parameter

 

vparam

a NcmVParam

 

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

Parameters

model_class

a NcmModelClass

 

sparam_id

id of the scalar parameter

 

symbol

symbol of the scalar parameter

 

name

name of the sacalar parameter

 

lower_bound

lower-bound value

 

upper_bound

upper-bound value

 

scale

FIXME

 

abstol

FIXME

 

default_value

default value

 

ppt

a NcmParamType

 

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

Parameters

model_class

a NcmModelClass

 

vparam_id

id of the vector parameter

 

default_length

default length of the vector parameter

 

symbol

symbol of the vector parameter

 

name

name of the vector parameter

 

lower_bound

FIXME

 

upper_bound

FIXME

 

scale

FIXME

 

abstol

FIXME

 

default_value

default value

 

ppt

a NcmParamType

 

ncm_model_class_check_params_info ()

void
ncm_model_class_check_params_info (NcmModelClass *model_class);

FIXME

Parameters

model_class

a NcmModelClass

 

ncm_model_class_add_impl_opts ()

void
ncm_model_class_add_impl_opts (NcmModelClass *model_class,
                               gint opt1,
                               ...);

FIXME

[skip]

Parameters

model_class

a NcmModelClass

 

opt1

first option

 

...

other options, must end with -1

 

ncm_model_class_add_impl_flag ()

void
ncm_model_class_add_impl_flag (NcmModelClass *model_class,
                               guint64 flag);

FIXME

[skip]

Parameters

model_class

a NcmModelClass

 

flag

implementation flag

 

ncm_model_dup ()

NcmModel *
ncm_model_dup (NcmModel *model,
               NcmSerialize *ser);

Duplicates model by serializing and deserializing it.

Parameters

model

a NcmModel

 

ser

a NcmSerialize

 

Returns

a duplicate of model .

[transfer full]


ncm_model_ref ()

NcmModel *
ncm_model_ref (NcmModel *model);

FIXME

Parameters

model

a NcmModel

 

Returns

FIXME.

[transfer full]


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.

Parameters

model

a NcmModel

 

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.

Parameters

model

a NcmModel

 

ncm_model_set_reparam ()

void
ncm_model_set_reparam (NcmModel *model,
                       NcmReparam *reparam);

FIXME

Parameters

model

a NcmModel

 

reparam

a NcmReparam

 

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.

Parameters

model1

a NcmModel

 

model2

a NcmModel

 

ncm_model_id ()

NcmModelID
ncm_model_id (NcmModel *model);

FIXME

Parameters

model

a NcmModel

 

Returns

FIXME


ncm_model_id_by_type ()

NcmModelID
ncm_model_id_by_type (GType model_type);

ncm_model_check_impl_flag ()

gboolean
ncm_model_check_impl_flag (NcmModel *model,
                           guint64 impl);

FIXME

Parameters

model

a NcmModel

 

impl

implementation flag

 

Returns

FIXME


ncm_model_check_impl_opt ()

gboolean
ncm_model_check_impl_opt (NcmModel *model,
                          gint opt);

FIXME

Parameters

model

a NcmModel

 

opt

implementation option

 

Returns

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

 

Returns

FIXME


ncm_model_len ()

guint
ncm_model_len (NcmModel *model);

FIXME

Parameters

model

a NcmModel

 

Returns

FIXME


ncm_model_state_is_update ()

gboolean
ncm_model_state_is_update (NcmModel *model);

FIXME

Parameters

model

a NcmModel

 

Returns

FIXME


ncm_model_state_set_update ()

void
ncm_model_state_set_update (NcmModel *model);

FIXME

Parameters

model

a NcmModel

 

ncm_model_state_mark_outdated ()

void
ncm_model_state_mark_outdated (NcmModel *model);

FIXME

Parameters

model

a NcmModel

 

ncm_model_sparam_len ()

guint
ncm_model_sparam_len (NcmModel *model);

FIXME

Parameters

model

a NcmModel

 

Returns

FIXME


ncm_model_vparam_array_len ()

guint
ncm_model_vparam_array_len (NcmModel *model);

FIXME

Parameters

model

a NcmModel

 

Returns

FIXME


ncm_model_vparam_index ()

guint
ncm_model_vparam_index (NcmModel *model,
                        guint n,
                        guint i);

FIXME

Parameters

model

a NcmModel

 

n

vector index

 

i

vector component index

 

Returns

index of the i-th component of the n-th vector


ncm_model_vparam_len ()

guint
ncm_model_vparam_len (NcmModel *model,
                      guint n);

FIXME

Parameters

model

a NcmModel

 

n

vector index

 

Returns

length of the n-th vector


ncm_model_name ()

const gchar *
ncm_model_name (NcmModel *model);

FIXME

Parameters

model

a NcmModel

 

Returns

FIXME.

[transfer none]


ncm_model_nick ()

const gchar *
ncm_model_nick (NcmModel *model);

FIXME

Parameters

model

a NcmModel

 

Returns

FIXME.

[transfer none]


ncm_model_peek_reparam ()

NcmReparam *
ncm_model_peek_reparam (NcmModel *model);

FIXME

Parameters

model

a NcmModel

 

Returns

FIXME.

[transfer none]


ncm_model_params_finite ()

gboolean
ncm_model_params_finite (NcmModel *model);

FIXME

Parameters

model

a NcmModel

 

Returns

FIXME


ncm_model_param_finite ()

gboolean
ncm_model_param_finite (NcmModel *model,
                        guint i);

FIXME

Parameters

model

a NcmModel

 

i

FIXME

 

Returns

FIXME


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.

Parameters

model

a NcmModel

 

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.

Parameters

model

a NcmModel

 

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.

Parameters

model

a NcmModel

 

Returns

the original parameters NcmVector.

[transfer none]


ncm_model_orig_params_log_all ()

void
ncm_model_orig_params_log_all (NcmModel *model);

FIXME

Parameters

model

a NcmModel

 

ncm_model_param_set ()

void
ncm_model_param_set (NcmModel *model,
                     guint n,
                     gdouble val);

FIXME

Parameters

model

a NcmModel

 

n

FIXME

 

val

FIXME

 

ncm_model_param_set_default ()

void
ncm_model_param_set_default (NcmModel *model,
                             guint n);

FIXME

Parameters

model

a NcmModel

 

n

FIXME

 

ncm_model_orig_param_set ()

void
ncm_model_orig_param_set (NcmModel *model,
                          guint n,
                          gdouble val);

FIXME

Parameters

model

a NcmModel

 

n

FIXME

 

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

Parameters

model

a NcmModel

 

n

FIXME

 

val

FIXME

 

ncm_model_param_peek_desc ()

NcmSParam *
ncm_model_param_peek_desc (NcmModel *model,
                           guint n);

Peeks the n -th parameter description.

Parameters

model

a NcmModel.

 

n

parameter index.

 

Returns

The n -th NcmSParam.

[transfer none]


ncm_model_param_get ()

gdouble
ncm_model_param_get (NcmModel *model,
                     guint n);

FIXME

Parameters

model

a NcmModel

 

n

FIXME

 

Returns

FIXME


ncm_model_orig_param_get ()

gdouble
ncm_model_orig_param_get (NcmModel *model,
                          guint n);

FIXME

Parameters

model

a NcmModel

 

n

FIXME

 

Returns

FIXME


ncm_model_orig_vparam_get ()

gdouble
ncm_model_orig_vparam_get (NcmModel *model,
                           guint n,
                           guint i);

ncm_model_orig_vparam_get_vector ()

NcmVector *
ncm_model_orig_vparam_get_vector (NcmModel *model,
                                  guint n);

FIXME

Parameters

model

a NcmModel

 

n

FIXME

 

Returns

FIXME.

[transfer full]


ncm_model_params_copyto ()

void
ncm_model_params_copyto (NcmModel *model,
                         NcmModel *model_dest);

FIXME

Parameters

model

a NcmModel

 

model_dest

a NcmModel

 

ncm_model_params_set_default ()

void
ncm_model_params_set_default (NcmModel *model);

FIXME

Parameters

model

a NcmModel

 

ncm_model_params_save_as_default ()

void
ncm_model_params_save_as_default (NcmModel *model);

FIXME

Parameters

model

a NcmModel

 

ncm_model_params_set_all ()

void
ncm_model_params_set_all (NcmModel *model,
                          ...);

FIXME

Parameters

model

a NcmModel

 

...

FIXME

 

ncm_model_params_set_all_data ()

void
ncm_model_params_set_all_data (NcmModel *model,
                               gdouble *data);

FIXME

Parameters

model

a NcmModel

 

data

FIXME

 

ncm_model_params_set_vector ()

void
ncm_model_params_set_vector (NcmModel *model,
                             NcmVector *v);

FIXME

Parameters

model

a NcmModel

 

v

a NcmVector

 

ncm_model_params_set_model ()

void
ncm_model_params_set_model (NcmModel *model,
                            NcmModel *model_src);

FIXME

Parameters

model

a NcmModel

 

model_src

a NcmModel

 

ncm_model_params_print_all ()

void
ncm_model_params_print_all (NcmModel *model,
                            FILE *out);

FIXME

[skip]

Parameters

model

a NcmModel

 

out

FIXME

 

ncm_model_params_log_all ()

void
ncm_model_params_log_all (NcmModel *model);

FIXME

Parameters

model

a NcmModel

 

ncm_model_params_get_all ()

NcmVector *
ncm_model_params_get_all (NcmModel *model);

FIXME

Parameters

model

a NcmModel

 

Returns

FIXME.

[transfer full]


ncm_model_params_valid ()

gboolean
ncm_model_params_valid (NcmModel *model);

FIXME

Parameters

model

a NcmModel

 

Returns

FIXME


ncm_model_params_valid_bounds ()

gboolean
ncm_model_params_valid_bounds (NcmModel *model);

Check whenever the paremeters respect the bounds.

Parameters

model

a NcmModel

 

Returns

if the parameter 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.

Parameters

model

a NcmModel

 

param_name

parameter name

 

i

parameter index.

[out]

Returns

whether the parameter param_name is found in the model .


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.

Parameters

model

a NcmModel

 

param_name

parameter name

 

i

parameter index.

[out]

Returns

whether the parameter param_name is found in the model .


ncm_model_orig_param_name ()

const gchar *
ncm_model_orig_param_name (NcmModel *model,
                           guint n);

ncm_model_param_name ()

const gchar *
ncm_model_param_name (NcmModel *model,
                      guint n);

ncm_model_orig_param_symbol ()

const gchar *
ncm_model_orig_param_symbol (NcmModel *model,
                             guint n);

ncm_model_param_symbol ()

const gchar *
ncm_model_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 .

Parameters

model

a NcmModel

 

param_name

parameter name

 

val

parameter value

 

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 .

Parameters

model

a NcmModel

 

param_name

parameter name

 

val

parameter value

 

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

Parameters

model

a NcmModel

 

param_name

parameter name

 

Returns

parameter value


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 .

Parameters

model

a NcmModel

 

param_name

parameter name

 

Returns

parameter value


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.

Parameters

model

a NcmModel

 

n

parameter index.

 

Returns

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.

Parameters

model

a NcmModel

 

n

parameter index

 

Returns

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.

Parameters

model

a NcmModel

 

n

parameter index

 

Returns

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.

Parameters

model

a NcmModel

 

n

parameter index.

 

Returns

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.

Parameters

model

a NcmModel

 

n

parameter index.

 

Returns

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.

Parameters

model

a NcmModel

 

n

parameter index

 

Returns

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.

Parameters

model

a NcmModel

 

n

parameter index

 

Returns

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.

Parameters

model

a NcmModel

 

n

parameter index.

 

Returns

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.

Parameters

model

a NcmModel

 

n

parameter index

 

Returns

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

Parameters

model

a NcmModel

 

n

parameter index

 

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.

Parameters

model

a NcmModel

 

n

parameter index

 

lb

lower-bound value

 

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.

Parameters

model

a NcmModel

 

n

parameter index

 

ub

upper-bound value

 

ncm_model_param_set_abstol ()

void
ncm_model_param_set_abstol (NcmModel *model,
                            guint n,
                            const gdouble abstol);

FIXME

Parameters

model

a NcmModel

 

n

parameter index

 

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.

Parameters

model

a NcmModel

 

n

parameter index

 

ptype

a NcmParamType

 

ncm_model_reparam_df ()

void
ncm_model_reparam_df (NcmModel *model,
                      NcmVector *fv,
                      NcmVector *v);

FIXME

Parameters

model

a NcmModel

 

fv

a NcmVector

 

v

a NcmVector

 

ncm_model_reparam_J ()

void
ncm_model_reparam_J (NcmModel *model,
                     NcmMatrix *fJ,
                     NcmMatrix *J);

FIXME

Parameters

model

a NcmModel

 

fJ

a NcmMatrix

 

J

a NcmMatrix

 

ncm_model_is_submodel ()

gboolean
ncm_model_is_submodel (NcmModel *model);

Parameters

model

a NcmModel

 

Returns

TRUE if model is a submodel of other model class.


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.

Parameters

model

a NcmModel

 

Returns

main model NcmModelID or -1.


ncm_model_add_submodel ()

void
ncm_model_add_submodel (NcmModel *model,
                        NcmModel *submodel);

Adds the submodel to the model submodels.

[virtual add_submodel]

Parameters

model

a NcmModel

 

submodel

a NcmModel

 

ncm_model_get_submodel_len ()

guint
ncm_model_get_submodel_len (NcmModel *model);

Gets the number of submodels set in model .

Parameters

model

a NcmModel

 

Returns

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.

Parameters

model

a NcmModel

 

i

submodel position

 

Returns

a NcmModel.

[transfer none]


ncm_model_peek_submodel_by_mid ()

NcmModel *
ncm_model_peek_submodel_by_mid (NcmModel *model,
                                NcmModelID mid);

Gets the submodel if type NcmModelID mid .

Parameters

model

a NcmModel

 

mid

a NcmModelID

 

Returns

a NcmModel.

[transfer none]


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.

Parameters

model

a NcmModel

 

mid

a NcmModelID

 

Returns

the mid position or -1 if not found.


ncm_model_type_is_submodel ()

gboolean
ncm_model_type_is_submodel (GType model_type);

Parameters

model_type

a GType

 

Returns

TRUE if model_type is a submodel of other model class.


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.

Parameters

model_type

a GType

 

Returns

main model NcmModelID or -1.


NCM_MODEL_OPT2IMPL()

#define NCM_MODEL_OPT2IMPL(opt) (((guint64)1) << ((guint64)(opt)))

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

NCM_MODEL_SET_IMPL_FUNC()

#define             NCM_MODEL_SET_IMPL_FUNC(NS_NAME,NsName,ns_name,type,name)

NCM_MODEL_FUNC0_IMPL()

#define             NCM_MODEL_FUNC0_IMPL(NS_NAME,NsName,ns_name,name)

NCM_MODEL_FUNC1_IMPL()

#define             NCM_MODEL_FUNC1_IMPL(NS_NAME,NsName,ns_name,name,var)

NCM_MODEL_FUNC2_IMPL()

#define             NCM_MODEL_FUNC2_IMPL(NS_NAME,NsName,ns_name,name)

NCM_MODEL_VFUNC0_IMPL()

#define             NCM_MODEL_VFUNC0_IMPL(NS_NAME,NsName,ns_name,name)

NCM_MODEL_VFUNC1_IMPL()

#define             NCM_MODEL_VFUNC1_IMPL(NS_NAME,NsName,ns_name,name,var)

NCM_MODEL_VFUNC2_IMPL()

#define             NCM_MODEL_VFUNC2_IMPL(NS_NAME,NsName,ns_name,name)

ncm_model_orig_param_peek_desc ()

NcmSParam *
ncm_model_orig_param_peek_desc (NcmModel *model,
                                guint n);

Peeks the n -th original parameter description.

Parameters

model

a NcmModel.

 

n

parameter index.

 

Returns

The n -th NcmSParam of the original parametrization.

[transfer none]

Types and Values

NcmModelID

typedef gint NcmModelID;

struct NcmModel

struct NcmModel;

Base class for models.


NCM_MODEL_CLASS_IMPL_ALL

#define NCM_MODEL_CLASS_IMPL_ALL ((guint64)(~((guint64)0)))

Property Details

The “implementation” property

  “implementation”           guint64

Bitwise specification of functions implementation.

Flags: Read

Default value: 0


The “name” property

  “name”                     gchar *

Model's name.

Flags: Read

Default value: NULL


The “nick” property

  “nick”                     gchar *

Model's nick.

Flags: Read

Default value: NULL


The “params-types” property

  “params-types”             GArray *

Parameters' types.

Flags: Read


The “reparam” property

  “reparam”                  NcmReparam *

Model reparametrization.

Flags: Read / Write


The “scalar-params-len” property

  “scalar-params-len”        guint

Number of scalar parameters.

Flags: Read

Default value: 0


The “sparam-array” property

  “sparam-array”             NcmObjArray *

NcmModel array of NcmSParam.

Flags: Read / Write


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