![]() |
![]() |
![]() |
NumCosmo Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
Synopsis
enum NcmFitType; enum NcmFitGradType; void (*_NcmFitLSJ) (NcmFit *fit
,NcmMatrix *J
); void (*_NcmFitLSFJ) (NcmFit *fit
,NcmVector *f
,NcmMatrix *J
); void (*_NcmFitM2lnLGrad) (NcmFit *fit
,NcmVector *grad
); void (*_NcmFitM2lnLValGrad) (NcmFit *fit
,gdouble *m2lnL
,NcmVector *grad
); enum NcmFitRunMsgs; struct NcmFitClass; struct NcmFit; struct NcmFitConstraint; NcmFitConstraint * ncm_fit_constraint_new (NcmFit *fit
,NcmMSetFunc *func
,gdouble tot
); NcmFitConstraint * ncm_fit_constraint_dup (NcmFitConstraint *fitc
); void ncm_fit_constraint_free (NcmFitConstraint *fitc
); NcmFit * ncm_fit_new (NcmFitType ftype
,gchar *algo_name
,NcmLikelihood *lh
,NcmMSet *mset
,NcmFitGradType gtype
); NcmFit * ncm_fit_ref (NcmFit *fit
); NcmFit * ncm_fit_copy_new (NcmFit *fit
,NcmLikelihood *lh
,NcmMSet *mset
,NcmFitGradType gtype
); void ncm_fit_free (NcmFit *fit
); void ncm_fit_clear (NcmFit **fit
); void ncm_fit_set_grad_type (NcmFit *fit
,NcmFitGradType gtype
); void ncm_fit_ls_set_state (NcmFit *fit
,gdouble prec
,NcmVector *x
,NcmVector *f
,NcmMatrix *J
); void ncm_fit_set_maxiter (NcmFit *fit
,guint maxiter
); guint ncm_fit_get_maxiter (NcmFit *fit
); void ncm_fit_add_equality_constraint (NcmFit *fit
,NcmMSetFunc *func
,gdouble tot
); void ncm_fit_add_inequality_constraint (NcmFit *fit
,NcmMSetFunc *func
,gdouble tot
); void ncm_fit_remove_equality_constraints (NcmFit *fit
); void ncm_fit_remove_inequality_constraints (NcmFit *fit
); guint ncm_fit_has_equality_constraints (NcmFit *fit
); guint ncm_fit_has_inequality_constraints (NcmFit *fit
); gboolean ncm_fit_is_least_squares (NcmFit *fit
); const gchar * ncm_fit_get_desc (NcmFit *fit
); void ncm_fit_log_info (NcmFit *fit
); void ncm_fit_log_covar (NcmFit *fit
); void ncm_fit_log_start (NcmFit *fit
); void ncm_fit_log_state (NcmFit *fit
); void ncm_fit_log_step (NcmFit *fit
); void ncm_fit_log_step_error (NcmFit *fit
,const gchar *strerror
,...
); void ncm_fit_log_end (NcmFit *fit
); void ncm_fit_fishermatrix_print (NcmFit *fit
,FILE *out
,gchar *header
); void ncm_fit_data_m2lnL_val (NcmFit *fit
,gdouble *data_m2lnL
); void ncm_fit_priors_m2lnL_val (NcmFit *fit
,gdouble *priors_m2lnL
); void ncm_fit_m2lnL_val (NcmFit *fit
,gdouble *m2lnL
); void ncm_fit_ls_f (NcmFit *fit
,NcmVector *f
); void ncm_fit_m2lnL_grad (NcmFit *fit
,NcmVector *df
); void ncm_fit_m2lnL_grad_an (NcmFit *fit
,NcmVector *df
); void ncm_fit_m2lnL_grad_nd_fo (NcmFit *fit
,NcmVector *grad
); void ncm_fit_m2lnL_grad_nd_ce (NcmFit *fit
,NcmVector *grad
); void ncm_fit_m2lnL_grad_nd_ac (NcmFit *fit
,NcmVector *grad
); void ncm_fit_m2lnL_val_grad (NcmFit *fit
,gdouble *result
,NcmVector *df
); void ncm_fit_m2lnL_val_grad_an (NcmFit *fit
,gdouble *result
,NcmVector *df
); void ncm_fit_m2lnL_val_grad_nd_fo (NcmFit *fit
,gdouble *m2lnL
,NcmVector *grad
); void ncm_fit_m2lnL_val_grad_nd_ce (NcmFit *fit
,gdouble *m2lnL
,NcmVector *grad
); void ncm_fit_m2lnL_val_grad_nd_ac (NcmFit *fit
,gdouble *m2lnL
,NcmVector *grad
); void ncm_fit_ls_J (NcmFit *fit
,NcmMatrix *J
); void ncm_fit_ls_J_an (NcmFit *fit
,NcmMatrix *J
); void ncm_fit_ls_J_nd_fo (NcmFit *fit
,NcmMatrix *J
); void ncm_fit_ls_J_nd_ce (NcmFit *fit
,NcmMatrix *J
); void ncm_fit_ls_f_J (NcmFit *fit
,NcmVector *f
,NcmMatrix *J
); void ncm_fit_ls_f_J_an (NcmFit *fit
,NcmVector *f
,NcmMatrix *J
); void ncm_fit_ls_f_J_nd_fo (NcmFit *fit
,NcmVector *f
,NcmMatrix *J
); void ncm_fit_ls_f_J_nd_ce (NcmFit *fit
,NcmVector *f
,NcmMatrix *J
); void ncm_fit_numdiff_m2lnL_hessian (NcmFit *fit
,NcmMatrix *H
); void ncm_fit_numdiff_m2lnL_covar (NcmFit *fit
); void ncm_fit_ls_covar (NcmFit *fit
); gdouble ncm_fit_covar_var (NcmFit *fit
,NcmModelID mid
,guint pid
); gdouble ncm_fit_covar_sd (NcmFit *fit
,NcmModelID mid
,guint pid
); gdouble ncm_fit_covar_cov (NcmFit *fit
,NcmModelID mid1
,guint pid1
,NcmModelID mid2
,guint pid2
); gdouble ncm_fit_covar_cor (NcmFit *fit
,NcmModelID mid1
,guint pid1
,NcmModelID mid2
,guint pid2
); gdouble ncm_fit_covar_fparam_var (NcmFit *fit
,guint fpi
); gdouble ncm_fit_covar_fparam_sd (NcmFit *fit
,guint fpi
); gdouble ncm_fit_covar_fparam_cov (NcmFit *fit
,guint fpi1
,guint fpi2
); gdouble ncm_fit_covar_fparam_cor (NcmFit *fit
,guint fpi1
,guint fpi2
); void ncm_fit_lr_test_range (NcmFit *fit
,NcmModelID mid
,guint pid
,gdouble start
,gdouble stop
,gdouble step
); void ncm_fit_dprob (NcmFit *fit
,NcmModelID mid
,guint pid
,gdouble a
,gdouble b
,gdouble step
,gdouble norm
); gdouble ncm_fit_lr_test (NcmFit *fit
,NcmModelID mid
,guint pid
,gdouble val
,gint dof
); gdouble ncm_fit_prob (NcmFit *fit
,NcmModelID mid
,guint pid
,gdouble a
,gdouble b
); gdouble ncm_fit_chisq_test (NcmFit *fit
,size_t bins
); void ncm_fit_reset (NcmFit *fit
); gboolean ncm_fit_run (NcmFit *fit
,NcmFitRunMsgs mtype
); gdouble ncm_fit_type_constrain_error (NcmFit *fit
,gdouble p
,gint nu
,gdouble dir
,NcmMSetFunc *func
,gdouble z
,gboolean walk
); void ncm_fit_function_error (NcmFit *fit
,NcmMSetFunc *func
,gdouble *x
,gboolean pretty_print
,gdouble *f
,gdouble *sigma_f
); gdouble ncm_fit_function_cov (NcmFit *fit
,NcmMSetFunc *func1
,gdouble z1
,NcmMSetFunc *func2
,gdouble z2
,gboolean pretty_print
); #define NCM_FIT_NUMDIFF_SCALE #define NCM_FIT_NPARAM (fit) #define NCM_FIT_DEFAULT_M2LNL_ABSTOL #define NCM_FIT_DEFAULT_M2LNL_RELTOL #define NCM_FIT_MAXITER
Object Hierarchy
GObject +----NcmFit +----NcmFitGSLLS +----NcmFitGSLMM +----NcmFitGSLMMS +----NcmFitLevmar +----NcmFitNLOpt
GBoxed +----NcmFitConstraint
Properties
"grad-type" NcmFitGradType : Read / Write / Construct "likelihood" NcmLikelihood* : Read / Write / Construct "maxiter" guint : Read / Write / Construct "mset" NcmMSet* : Read / Write / Construct
Details
enum NcmFitType
typedef enum { NCM_FIT_TYPE_GSL_LS = 0, NCM_FIT_TYPE_GSL_MM, NCM_FIT_TYPE_GSL_MMS, NCM_FIT_TYPE_LEVMAR, NCM_FIT_TYPE_NLOPT, } NcmFitType;
FIXME
enum NcmFitGradType
typedef enum { NCM_FIT_GRAD_ANALYTICAL = 0, NCM_FIT_GRAD_NUMDIFF_FORWARD, NCM_FIT_GRAD_NUMDIFF_CENTRAL, NCM_FIT_GRAD_NUMDIFF_ACCURATE, } NcmFitGradType;
FIXME
enum NcmFitRunMsgs
typedef enum { NCM_FIT_RUN_MSGS_NONE = 0, NCM_FIT_RUN_MSGS_SIMPLE, NCM_FIT_RUN_MSGS_FULL, } NcmFitRunMsgs;
FIXME
ncm_fit_constraint_new ()
NcmFitConstraint * ncm_fit_constraint_new (NcmFit *fit
,NcmMSetFunc *func
,gdouble tot
);
FIXME
|
FIXME |
|
FIXME |
|
FIXME |
Returns : |
FIXME. [transfer full] |
ncm_fit_constraint_dup ()
NcmFitConstraint * ncm_fit_constraint_dup (NcmFitConstraint *fitc
);
FIXME
|
FIXME |
Returns : |
FIXME. [transfer full] |
ncm_fit_constraint_free ()
void ncm_fit_constraint_free (NcmFitConstraint *fitc
);
FIXME
|
FIXME |
ncm_fit_new ()
NcmFit * ncm_fit_new (NcmFitType ftype
,gchar *algo_name
,NcmLikelihood *lh
,NcmMSet *mset
,NcmFitGradType gtype
);
FIXME
|
a NcmFitType |
|
name of the algorithm to be used |
|
a NcmLikelihood |
|
a NcmMSet |
|
a NcmFitGradType |
Returns : |
FIXME |
ncm_fit_ref ()
NcmFit * ncm_fit_ref (NcmFit *fit
);
FIXME
|
a NcmFit. |
Returns : |
FIXME. [transfer full] |
ncm_fit_copy_new ()
NcmFit * ncm_fit_copy_new (NcmFit *fit
,NcmLikelihood *lh
,NcmMSet *mset
,NcmFitGradType gtype
);
Duplicates the NcmFit object with new references for its contents.
|
a NcmFit |
|
a NcmLikelihood |
|
a NcmMSet |
|
a NcmFitGradType |
Returns : |
FIXME. [transfer full] |
ncm_fit_set_grad_type ()
void ncm_fit_set_grad_type (NcmFit *fit
,NcmFitGradType gtype
);
FIXME
|
a NcmLikelihood. |
|
a NcmFitGradType. |
ncm_fit_ls_set_state ()
void ncm_fit_ls_set_state (NcmFit *fit
,gdouble prec
,NcmVector *x
,NcmVector *f
,NcmMatrix *J
);
FIXME
ncm_fit_set_maxiter ()
void ncm_fit_set_maxiter (NcmFit *fit
,guint maxiter
);
FIXME
|
a NcmFit. |
|
FIXME. |
ncm_fit_get_maxiter ()
guint ncm_fit_get_maxiter (NcmFit *fit
);
FIXME
|
a NcmFit. |
Returns : |
FIXME |
ncm_fit_add_equality_constraint ()
void ncm_fit_add_equality_constraint (NcmFit *fit
,NcmMSetFunc *func
,gdouble tot
);
FIXME
|
a NcmFit. |
|
FIXME |
|
FIXME |
ncm_fit_add_inequality_constraint ()
void ncm_fit_add_inequality_constraint (NcmFit *fit
,NcmMSetFunc *func
,gdouble tot
);
FIXME
|
a NcmFit. |
|
FIXME |
|
FIXME |
ncm_fit_remove_equality_constraints ()
void ncm_fit_remove_equality_constraints (NcmFit *fit
);
FIXME
|
a NcmFit. |
ncm_fit_remove_inequality_constraints ()
void ncm_fit_remove_inequality_constraints
(NcmFit *fit
);
FIXME
|
a NcmFit. |
ncm_fit_has_equality_constraints ()
guint ncm_fit_has_equality_constraints (NcmFit *fit
);
FIXME
|
a NcmFit. |
Returns : |
FIXME |
ncm_fit_has_inequality_constraints ()
guint ncm_fit_has_inequality_constraints (NcmFit *fit
);
FIXME
|
a NcmFit. |
Returns : |
FIXME |
ncm_fit_is_least_squares ()
gboolean ncm_fit_is_least_squares (NcmFit *fit
);
FIXME
|
a NcmFit |
Returns : |
whenever the fit object use a least squares method. |
ncm_fit_get_desc ()
const gchar * ncm_fit_get_desc (NcmFit *fit
);
FIXME
|
a NcmFit |
Returns : |
fit object description. [transfer none] |
ncm_fit_log_state ()
void ncm_fit_log_state (NcmFit *fit
);
This function prints in the log the current state.
|
a NcmFit |
ncm_fit_log_step_error ()
void ncm_fit_log_step_error (NcmFit *fit
,const gchar *strerror
,...
);
FIXME
|
a NcmFit |
|
FIXME |
|
FIXME |
ncm_fit_log_end ()
void ncm_fit_log_end (NcmFit *fit
);
This function prints in the log the precision with which the best-fit was found.
|
a NcmFit |
ncm_fit_fishermatrix_print ()
void ncm_fit_fishermatrix_print (NcmFit *fit
,FILE *out
,gchar *header
);
ncm_fit_data_m2lnL_val ()
void ncm_fit_data_m2lnL_val (NcmFit *fit
,gdouble *data_m2lnL
);
This function computes minus two times the logarithm base e of the likelihood
using only the data set and not considering any prior. The result is set
on data_m2lnL
.
|
a NcmFit |
|
minus two times the logarithm base e of the likelihood. [out] |
ncm_fit_priors_m2lnL_val ()
void ncm_fit_priors_m2lnL_val (NcmFit *fit
,gdouble *priors_m2lnL
);
This function computes minus two times the logarithm base e of the likelihood
using the data set and taking into account the assumed priors. The result is
set on priors_m2lnL
.
|
a NcmFit |
|
minus two times the logarithm base e of the likelihood. [out] |
ncm_fit_m2lnL_val ()
void ncm_fit_m2lnL_val (NcmFit *fit
,gdouble *m2lnL
);
FIXME
|
a NcmFit |
|
minus two times the logarithm base e of the likelihood. [out] |
ncm_fit_m2lnL_grad_an ()
void ncm_fit_m2lnL_grad_an (NcmFit *fit
,NcmVector *df
);
Analytical gradient.
ncm_fit_m2lnL_grad_nd_fo ()
void ncm_fit_m2lnL_grad_nd_fo (NcmFit *fit
,NcmVector *grad
);
Numerical differentiation (forward).
ncm_fit_m2lnL_grad_nd_ce ()
void ncm_fit_m2lnL_grad_nd_ce (NcmFit *fit
,NcmVector *grad
);
Numerical differentiation (central).
ncm_fit_m2lnL_grad_nd_ac ()
void ncm_fit_m2lnL_grad_nd_ac (NcmFit *fit
,NcmVector *grad
);
Numerical differentiation (accurate).
ncm_fit_m2lnL_val_grad ()
void ncm_fit_m2lnL_val_grad (NcmFit *fit
,gdouble *result
,NcmVector *df
);
FIXME
ncm_fit_m2lnL_val_grad_an ()
void ncm_fit_m2lnL_val_grad_an (NcmFit *fit
,gdouble *result
,NcmVector *df
);
FIXME
ncm_fit_m2lnL_val_grad_nd_fo ()
void ncm_fit_m2lnL_val_grad_nd_fo (NcmFit *fit
,gdouble *m2lnL
,NcmVector *grad
);
FIXME
ncm_fit_m2lnL_val_grad_nd_ce ()
void ncm_fit_m2lnL_val_grad_nd_ce (NcmFit *fit
,gdouble *m2lnL
,NcmVector *grad
);
FIXME
ncm_fit_m2lnL_val_grad_nd_ac ()
void ncm_fit_m2lnL_val_grad_nd_ac (NcmFit *fit
,gdouble *m2lnL
,NcmVector *grad
);
FIXME
ncm_fit_numdiff_m2lnL_hessian ()
void ncm_fit_numdiff_m2lnL_hessian (NcmFit *fit
,NcmMatrix *H
);
FIXME
ncm_fit_covar_var ()
gdouble ncm_fit_covar_var (NcmFit *fit
,NcmModelID mid
,guint pid
);
FIXME
|
a NcmFit. |
|
a NcmModelID. |
|
FIXME |
Returns : |
FIXME |
ncm_fit_covar_sd ()
gdouble ncm_fit_covar_sd (NcmFit *fit
,NcmModelID mid
,guint pid
);
FIXME
|
a NcmFit. |
|
a NcmModelID. |
|
FIXME |
Returns : |
FIXME |
ncm_fit_covar_cov ()
gdouble ncm_fit_covar_cov (NcmFit *fit
,NcmModelID mid1
,guint pid1
,NcmModelID mid2
,guint pid2
);
FIXME
|
a NcmFit |
|
a NcmModelID. |
|
FIXME |
|
a NcmModelID. |
|
FIXME |
Returns : |
FIXME |
ncm_fit_covar_cor ()
gdouble ncm_fit_covar_cor (NcmFit *fit
,NcmModelID mid1
,guint pid1
,NcmModelID mid2
,guint pid2
);
FIXME
|
a NcmFit |
|
a NcmModelID. |
|
FIXME |
|
a NcmModelID. |
|
FIXME |
Returns : |
FIXME |
ncm_fit_covar_fparam_var ()
gdouble ncm_fit_covar_fparam_var (NcmFit *fit
,guint fpi
);
FIXME
|
a NcmFit. |
|
FIXME |
Returns : |
FIXME |
ncm_fit_covar_fparam_sd ()
gdouble ncm_fit_covar_fparam_sd (NcmFit *fit
,guint fpi
);
FIXME
|
a NcmFit. |
|
FIXME |
Returns : |
FIXME |
ncm_fit_covar_fparam_cov ()
gdouble ncm_fit_covar_fparam_cov (NcmFit *fit
,guint fpi1
,guint fpi2
);
FIXME
|
a NcmFit. |
|
FIXME |
|
FIXME |
Returns : |
FIXME |
ncm_fit_covar_fparam_cor ()
gdouble ncm_fit_covar_fparam_cor (NcmFit *fit
,guint fpi1
,guint fpi2
);
FIXME
|
a NcmFit. |
|
FIXME |
|
FIXME |
Returns : |
FIXME |
ncm_fit_lr_test_range ()
void ncm_fit_lr_test_range (NcmFit *fit
,NcmModelID mid
,guint pid
,gdouble start
,gdouble stop
,gdouble step
);
FIXME
|
a NcmFit |
|
a NcmModelID. |
|
FIXME |
|
FIXME |
|
FIXME |
|
FIXME |
ncm_fit_dprob ()
void ncm_fit_dprob (NcmFit *fit
,NcmModelID mid
,guint pid
,gdouble a
,gdouble b
,gdouble step
,gdouble norm
);
FIXME
|
a NcmFit. |
|
a NcmModelID. |
|
FIXME |
|
FIXME |
|
FIXME |
|
FIXME |
|
FIXME |
Returns : |
FIXME |
ncm_fit_lr_test ()
gdouble ncm_fit_lr_test (NcmFit *fit
,NcmModelID mid
,guint pid
,gdouble val
,gint dof
);
FIXME
|
a NcmFit. |
|
a NcmModelID. |
|
FIXME |
|
FIXME |
|
FIXME |
Returns : |
FIXME |
ncm_fit_prob ()
gdouble ncm_fit_prob (NcmFit *fit
,NcmModelID mid
,guint pid
,gdouble a
,gdouble b
);
FIXME
|
a NcmFit. |
|
a NcmModelID. |
|
FIXME |
|
FIXME |
|
FIXME |
Returns : |
FIXME |
ncm_fit_run ()
gboolean ncm_fit_run (NcmFit *fit
,NcmFitRunMsgs mtype
);
FIXME
|
a NcmFit |
|
a NcmFitRunMsgs |
Returns : |
FIXME |
ncm_fit_type_constrain_error ()
gdouble ncm_fit_type_constrain_error (NcmFit *fit
,gdouble p
,gint nu
,gdouble dir
,NcmMSetFunc *func
,gdouble z
,gboolean walk
);
ncm_fit_function_error ()
void ncm_fit_function_error (NcmFit *fit
,NcmMSetFunc *func
,gdouble *x
,gboolean pretty_print
,gdouble *f
,gdouble *sigma_f
);
FIXME
|
a NcmFit |
|
a NcmMSetFunc |
|
FIXME |
|
FIXME |
|
FIXME. [out] |
|
FIXME. [out] |
ncm_fit_function_cov ()
gdouble ncm_fit_function_cov (NcmFit *fit
,NcmMSetFunc *func1
,gdouble z1
,NcmMSetFunc *func2
,gdouble z2
,gboolean pretty_print
);
FIXME
|
a NcmFit |
|
a NcmMSetFunc |
|
FIXME |
|
a NcmMSetFunc |
|
FIXME |
|
FIXME |
Returns : |
FIXME |
Property Details
The "grad-type"
property
"grad-type" NcmFitGradType : Read / Write / Construct
Differentiation method.
Default value: NCM_FIT_GRAD_NUMDIFF_FORWARD
The "maxiter"
property
"maxiter" guint : Read / Write / Construct
Maximum number of interations.
Default value: 10000