NcmReparam

NcmReparam — Abstract class for model reparametrization.

Functions

Properties

char * compat-type Read / Write / Construct Only
guint length Read / Write / Construct Only
NcmObjDictInt * params-desc Read / Write

Types and Values

Object Hierarchy

    GObject
    ╰── NcmReparam
        ├── NcHICosmoDEReparamCMB
        ├── NcHICosmoDEReparamOk
        ├── NcHICosmoGCGReparamCMB
        ├── NcHICosmoGCGReparamOk
        ├── NcHICosmoIDEM2ReparamCMB
        ├── NcHICosmoIDEM2ReparamOk
        ├── NcHIReionCambReparamTau
        ╰── NcmReparamLinear

Description

NcmReparam is an abstract class for model reparametrization.

Functions

NcmReparamV ()

gboolean
(*NcmReparamV) (NcmReparam *reparam,
                struct _NcmModel *model);

Function type for reparameterization. See also NcmReparam.

Parameters

reparam

a NcmReparam

 

model

a NcmModel

 

ncm_reparam_ref ()

NcmReparam *
ncm_reparam_ref (NcmReparam *reparam);

Increases the reference count of reparam by one.

Parameters

reparam

a NcmReparam

 

Returns

the passed NcmReparam.

[transfer full]


ncm_reparam_free ()

void
ncm_reparam_free (NcmReparam *reparam);

Decreases the reference count of reparam by one. If the reference count reaches zero, the NcmReparam is freed.

Parameters

reparam

a NcmReparam

 

ncm_reparam_clear ()

void
ncm_reparam_clear (NcmReparam **reparam);

If *reparam is not NULL, unrefs it and sets *reparam to NULL. If *reparam is NULL, does nothing.

Parameters

reparam

a NcmReparam

 

ncm_reparam_set_compat_type ()

void
ncm_reparam_set_compat_type (NcmReparam *reparam,
                             GType compat_type);

Sets the compatible GType for this reparametrization.

Parameters

reparam

a NcmReparam

 

compat_type

a GType

 

ncm_reparam_get_compat_type ()

GType
ncm_reparam_get_compat_type (NcmReparam *reparam);

Gets the compatible GType for this reparametrization.

Parameters

reparam

a NcmReparam

 

Returns

the compatible GType for this reparametrization.


ncm_reparam_old2new ()

void
ncm_reparam_old2new (NcmReparam *reparam,
                     struct _NcmModel *model);

Using the values set in the original parametrization update the values of the new parametrization.

[virtual old2new]

Parameters

reparam

a NcmReparam

 

model

a NcmModel

 

ncm_reparam_new2old ()

void
ncm_reparam_new2old (NcmReparam *reparam,
                     struct _NcmModel *model);

Using the values set in the new parametrization update the values of the original parametrization.

[virtual new2old]

Parameters

reparam

a NcmReparam

 

model

a NcmModel

 

ncm_reparam_set_param_desc ()

void
ncm_reparam_set_param_desc (NcmReparam *reparam,
                            guint i,
                            NcmSParam *sp);

Change the i -th parameter description using sp .

Parameters

reparam

a NcmReparam

 

i

index of the changed parameter.

 

sp

NcmSParam describing the new parameter.

 

ncm_reparam_peek_param_desc ()

NcmSParam *
ncm_reparam_peek_param_desc (NcmReparam *reparam,
                             guint i);

Peeks the i -th parameter description.

Parameters

reparam

a NcmReparam

 

i

index of the changed parameter.

 

Returns

The i -th parameter description.

[transfer none]


ncm_reparam_get_param_desc ()

NcmSParam *
ncm_reparam_get_param_desc (NcmReparam *reparam,
                            guint i);

Gets the i -th parameter description.

Parameters

reparam

a NcmReparam

 

i

index of the changed parameter.

 

Returns

The i -th parameter description.

[transfer full]


ncm_reparam_set_param_desc_full ()

void
ncm_reparam_set_param_desc_full (NcmReparam *reparam,
                                 guint i,
                                 const gchar *name,
                                 const gchar *symbol,
                                 gdouble lower_bound,
                                 gdouble upper_bound,
                                 gdouble scale,
                                 gdouble abstol,
                                 gdouble default_val,
                                 NcmParamType ftype);

Change the i -th parameter description using the given values.

Parameters

reparam

a NcmReparam

 

i

index of the changed parameter.

 

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

gboolean
ncm_reparam_index_from_name (NcmReparam *reparam,
                             const gchar *param_name,
                             guint *i);

Looks for a parameter named param_name and returns TRUE if found. If found puts at i its index.

Parameters

reparam

a NcmReparam.

 

param_name

parameter name.

 

i

parameter index.

[out]

Returns

whenever the parameter is found.


ncm_reparam_get_length ()

guint
ncm_reparam_get_length (NcmReparam *reparam);

Gets the number of parameters.

Parameters

reparam

a NcmReparam

 

ncm_reparam_peek_params ()

NcmVector *
ncm_reparam_peek_params (NcmReparam *reparam);

Gets the NcmVector containing the new parameters. This vector is owned by the NcmReparam and should not be freed. This method is used by NcmModel and subclasses to get the new parameters and should not be used by the user. The pointer returned by this method is guaranteed to be valid until the destruction of the NcmReparam.

Parameters

reparam

a NcmReparam.

 

Returns

a NcmVector containing the new parameters.

[transfer none]

Types and Values

NCM_TYPE_REPARAM

#define NCM_TYPE_REPARAM (ncm_reparam_get_type ())

struct NcmReparamClass

struct NcmReparamClass {
};

NcmReparam

typedef struct _NcmReparam NcmReparam;

Property Details

The “compat-type” property

  “compat-type”              char *

Compatible type.

Owner: NcmReparam

Flags: Read / Write / Construct Only

Default value: "NcmModel"


The “length” property

  “length”                   guint

System's length.

Owner: NcmReparam

Flags: Read / Write / Construct Only

Default value: 0


The “params-desc” property

  “params-desc”              NcmObjDictInt *

News parameter descriptions.

Owner: NcmReparam

Flags: Read / Write