NcmDataset

NcmDataset — A set of NcmData objects

Functions

Properties

Types and Values

Object Hierarchy

    GEnum
    ╰── NcmDatasetBStrapType
    GObject
    ╰── NcmDataset

Description

The purpose of this class is to define a collection of NcmData objects. These objects serve as containers for NcmData intended for use within the NumCosmo library. Each individual NcmData object is responsible for defining a distinct data likelihood function. It is essential to note that all NcmData objects are designed to be entirely statistically independent of each other.

Functions

ncm_dataset_new ()

NcmDataset *
ncm_dataset_new (void);

Creates a new empty NcmDataset object.

Returns

a new NcmDataset.


ncm_dataset_new_list ()

NcmDataset *
ncm_dataset_new_list (gpointer data0,
                      ...);

Creates a new NcmDataset object and adds a NULL ended list of NcmData.

Parameters

data0

first NcmData to be added.

 

...

a NULL ended list of NcmData

 

Returns

a new NcmDataset.


ncm_dataset_new_array ()

NcmDataset *
ncm_dataset_new_array (NcmData **data_array,
                       guint len);

Creates a new NcmDataset object and adds len NcmData from data_array .

Parameters

data_array

array of NcmData to be added.

[array length=len][element-type NcmData]

len

length of data_array

 

Returns

a new NcmDataset.


ncm_dataset_dup ()

NcmDataset *
ncm_dataset_dup (NcmDataset *dset,
                 NcmSerialize *ser);

Duplicates the object and all of its content.

Parameters

dset

a NcmDataset

 

ser

a NcmSerialize

 

Returns

the duplicate of dset .

[transfer full]


ncm_dataset_ref ()

NcmDataset *
ncm_dataset_ref (NcmDataset *dset);

Increases the reference count of dset by one.

Parameters

dset

pointer to type defined by NcmDataset

 

Returns

dset .

[transfer full]


ncm_dataset_copy ()

NcmDataset *
ncm_dataset_copy (NcmDataset *dset);

Duplicates the object getting a reference of its content.

Parameters

dset

pointer to type defined by NcmDataset

 

Returns

the duplicate of dset , new container.

[transfer full]


ncm_dataset_free ()

void
ncm_dataset_free (NcmDataset *dset);

Decreses the reference count of dset by one.

Parameters

dset

pointer to type defined by NcmDataset

 

ncm_dataset_clear ()

void
ncm_dataset_clear (NcmDataset **dset);

Decreses the reference count of *dset by one, and sets *dset to NULL.

Parameters

dset

pointer to type defined by NcmDataset

 

ncm_dataset_get_length ()

guint
ncm_dataset_get_length (NcmDataset *dset);

Number of diferent NcmData in dset .

Parameters

dset

pointer to type defined by NcmDataset

 

Returns

number of NcmData objects in the set


ncm_dataset_get_n ()

guint
ncm_dataset_get_n (NcmDataset *dset);

Calculates the total number of data set points.

Parameters

dset

pointer to type defined by NcmDataset

 

Returns

total number of data set points.


ncm_dataset_get_dof ()

guint
ncm_dataset_get_dof (NcmDataset *dset);

Calculate the total degrees of freedom associated with all NcmData objects.

Parameters

dset

pointer to type defined by NcmDataset

 

Returns

summed degrees of freedom of all NcmData in dset .


ncm_dataset_all_init ()

gboolean
ncm_dataset_all_init (NcmDataset *dset);

Checks whenever all NcmData in dset are initiated.

Parameters

dset

pointer to type defined by NcmDataset

 

Returns

whenever dset is initiated.


ncm_dataset_append_data ()

void
ncm_dataset_append_data (NcmDataset *dset,
                         NcmData *data);

Appends data to dset .

Parameters

dset

pointer to type defined by NcmDataset

 

data

NcmData object to be appended to NcmDataset

 

ncm_dataset_get_data ()

NcmData *
ncm_dataset_get_data (NcmDataset *dset,
                      guint n);

Gets the n -th NcmData in dset and increses its reference count by one.

Parameters

dset

pointer to type defined by NcmDataset

 

n

the NcmData index.

 

Returns

the NcmData associated with n .

[transfer full]


ncm_dataset_peek_data ()

NcmData *
ncm_dataset_peek_data (NcmDataset *dset,
                       guint n);

Gets the n -th NcmData in dset .

Parameters

dset

a NcmDataset

 

n

the NcmData index.

 

Returns

the NcmData associated with n .

[transfer none]


ncm_dataset_get_ndata ()

guint
ncm_dataset_get_ndata (NcmDataset *dset);

Gets number of NcmData in dset .

Parameters

dset

a NcmDataset

 

Returns

number of NcmData objects in dset .


ncm_dataset_set_data_array ()

void
ncm_dataset_set_data_array (NcmDataset *dset,
                            NcmObjArray *oa);

Sets the dset with oa .

Parameters

dset

a NcmDataset

 

oa

a NcmObjArray containing NcmData objects.

 

ncm_dataset_get_data_array ()

NcmObjArray *
ncm_dataset_get_data_array (NcmDataset *dset);

Gets the NcmObjArray from dset .

Parameters

dset

a NcmDataset

 

Returns

the array of NcmData.

[transfer full]


ncm_dataset_peek_data_array ()

NcmObjArray *
ncm_dataset_peek_data_array (NcmDataset *dset);

Gets the NcmObjArray from dset .

Parameters

dset

a NcmDataset

 

Returns

the array of NcmData.

[transfer none]


ncm_dataset_resample ()

void
ncm_dataset_resample (NcmDataset *dset,
                      NcmMSet *mset,
                      NcmRNG *rng);

Resamples every NcmData in dset with the models contained in mset .

Parameters

dset

a NcmDataset

 

mset

a NcmMSet

 

rng

a NcmRNG

 

ncm_dataset_bootstrap_set ()

void
ncm_dataset_bootstrap_set (NcmDataset *dset,
                           NcmDatasetBStrapType bstype);

Disable or sets bootstrap method for dset .

Parameters

dset

a NcmDataset.

 

bstype

a NcmDatasetBStrapType.

 

ncm_dataset_bootstrap_resample ()

void
ncm_dataset_bootstrap_resample (NcmDataset *dset,
                                NcmRNG *rng);

Perform one bootstrap as in ncm_data_bootstrap_resample() in every NcmData in dset .

Parameters

dset

a NcmDataset.

 

rng

a NcmRNG.

 

ncm_dataset_log_info ()

void
ncm_dataset_log_info (NcmDataset *dset);

Prints in the log the informations associated with every NcmData in dset .

Parameters

dset

a NcmDataset

 

ncm_dataset_get_info ()

gchar *
ncm_dataset_get_info (NcmDataset *dset);

Obtains the informations associated with every NcmData in dset .

Parameters

dset

a NcmDataset

 

Returns

dset description.

[transfer full]


ncm_dataset_has_leastsquares_f ()

gboolean
ncm_dataset_has_leastsquares_f (NcmDataset *dset);

Whether all the NcmData in dset have a ncm_data_leastsquares_f() method.

Parameters

dset

a NcmDataset

 

Returns

TRUE if all the NcmData in dset have a ncm_data_leastsquares_f() method.


ncm_dataset_has_m2lnL_val ()

gboolean
ncm_dataset_has_m2lnL_val (NcmDataset *dset);

Whether all the NcmData in dset have a ncm_data_m2lnL_val() method.

Parameters

dset

a NcmDataset

 

Returns

TRUE if all the NcmData in dset have a ncm_data_m2lnL_val() method.


ncm_dataset_leastsquares_f ()

void
ncm_dataset_leastsquares_f (NcmDataset *dset,
                            NcmMSet *mset,
                            NcmVector *f);

ncm_dataset_m2lnL_val ()

void
ncm_dataset_m2lnL_val (NcmDataset *dset,
                       NcmMSet *mset,
                       gdouble *m2lnL);

Computes the value of the m2lnL for the data data . The value of the m2lnL is stored in m2lnL .

Parameters

dset

a NcmLikelihood.

 

mset

a NcmMSet.

 

m2lnL

a pointer to a double.

[out]

ncm_dataset_m2lnL_vec ()

void
ncm_dataset_m2lnL_vec (NcmDataset *dset,
                       NcmMSet *mset,
                       NcmVector *m2lnL_v);

Computes the value of $-2\ln L$ for every element in the dset . The values of $-2\ln L$ are stored in the NcmVector m2lnL_v .

Parameters

dset

a NcmLikelihood.

 

mset

a NcmMSet.

 

m2lnL_v

a NcmVector

 

ncm_dataset_m2lnL_i_val ()

void
ncm_dataset_m2lnL_i_val (NcmDataset *dset,
                         NcmMSet *mset,
                         guint i,
                         gdouble *m2lnL_i);

Get the value of the i -th data in the dataset.

Parameters

dset

a NcmLikelihood

 

mset

a NcmMSet

 

i

an integer

 

m2lnL_i

a pointer to a double.

[out]

ncm_dataset_has_mean_vector ()

gboolean
ncm_dataset_has_mean_vector (NcmDataset *dset);

Whether all the NcmData in dset have a ncm_data_mean_vector() method.

Parameters

dset

a NcmDataset

 

Returns

TRUE if all the NcmData in dset have a ncm_data_mean_vector() method.


ncm_dataset_mean_vector ()

void
ncm_dataset_mean_vector (NcmDataset *dset,
                         NcmMSet *mset,
                         NcmVector *mu);

Calculates the mean vector f concatenating the individual ones from each NcmData in dset .

Parameters

dset

a NcmDataset

 

mset

a NcmMSet

 

mu

a NcmVector

 

ncm_dataset_fisher_matrix ()

void
ncm_dataset_fisher_matrix (NcmDataset *dset,
                           NcmMSet *mset,
                           NcmMatrix **IM);

Calculates the Fisher-information matrix I adding the individual ones from each NcmData in dset . If the NcmMatrix pointer in *IM is NULL a new NcmMatrix will be allocated otherwise *IM will be used.

Parameters

dset

a NcmDataset

 

mset

a NcmMSet

 

IM

The fisher matrix.

[out][transfer full]

ncm_dataset_fisher_matrix_bias ()

void
ncm_dataset_fisher_matrix_bias (NcmDataset *dset,
                                NcmMSet *mset,
                                NcmVector *f_true,
                                NcmMatrix **IM,
                                NcmVector **delta_theta);

Calculates the Fisher-information matrix IM and and the bias vector delta_theta adding the individual ones from each NcmData in dset .

Parameters

dset

a NcmDataset

 

mset

a NcmMSet

 

f_true

a NcmVector

 

IM

The fisher matrix.

[out][transfer full]

delta_theta

The bias vector.

[out][transfer full]

Types and Values

NCM_TYPE_DATASET

#define NCM_TYPE_DATASET (ncm_dataset_get_type ())

enum NcmDatasetBStrapType

Bootstrap types.

Members

NCM_DATASET_BSTRAP_DISABLE

Bootstrap disabled.

 

NCM_DATASET_BSTRAP_PARTIAL

Partial bootstrap, each NcmData is bootstraped individually.

 

NCM_DATASET_BSTRAP_TOTAL

Total bootstrap, all data is bootstraped simultaneously.

 

NcmDataset

typedef struct _NcmDataset NcmDataset;

Property Details

The “bootstrap-type” property

  “bootstrap-type”           NcmDatasetBStrapType

Bootstrap type.

Owner: NcmDataset

Flags: Read / Write

Default value: NCM_DATASET_BSTRAP_DISABLE


The “data-array” property

  “data-array”               NcmObjArray *

NcmData array.

Owner: NcmDataset

Flags: Read / Write