Top |
NcmModelBuilderNcmModelBuilder — A NcmModel builder |
char * | description | Read / Write / Construct Only |
char * | name | Read / Write / Construct Only |
char * | parent-type-string | Read / Write / Construct Only |
NcmObjArray * | sparams | Read / Write / Construct Only |
gboolean | stackable | Read / Write / Construct Only |
NcmObjArray * | vparams | Read / Write / Construct Only |
This model can be used to create runtime NcmModels. It is particularly useful to create models in binded languages, e.g., python.
NcmModelBuilder * ncm_model_builder_new (GType ptype
,const gchar *name
,const gchar *desc
);
Creates a new NcmModelBuilder object. This does not create the new class
after defining all parameters one should call ncm_model_builder_create()
to effectively define a new class.
NcmModelBuilder *
ncm_model_builder_ref (NcmModelBuilder *mb
);
Increase reference count of mb
by one.
void ncm_model_builder_add_sparam_obj (NcmModelBuilder *mb
,NcmSParam *sparam
);
Adds the parameters described by sparam
to mb
.
void ncm_model_builder_add_vparam_obj (NcmModelBuilder *mb
,NcmVParam *vparam
);
Adds the parameters described by sparam
to mb
.
void ncm_model_builder_add_sparam (NcmModelBuilder *mb
,const gchar *symbol
,const gchar *name
,gdouble lower_bound
,gdouble upper_bound
,gdouble scale
,gdouble abstol
,gdouble default_value
,NcmParamType ppt
);
Creates a new NcmSParam from arguments and add it to mb
.
void ncm_model_builder_add_vparam (NcmModelBuilder *mb
,guint default_length
,const gchar *symbol
,const gchar *name
,gdouble lower_bound
,gdouble upper_bound
,gdouble scale
,gdouble abstol
,gdouble default_value
,NcmParamType ppt
);
Creates a new NcmVParam from arguments and add it to mb
.
GType
ncm_model_builder_create (NcmModelBuilder *mb
);
Creates a new object type using the scalar and vector parameters defined
in mb
. If the object type was already created, this function just returns
the type.
void ncm_model_builder_add_sparams (NcmModelBuilder *mb
,NcmObjArray *sparams
);
Adds all NcmSParam objects in sparams
to mb
.
“description”
property “description” char *
Model's description.
Owner: NcmModelBuilder
Flags: Read / Write / Construct Only
Default value: "no-description"
“name”
property “name” char *
Model's name.
Owner: NcmModelBuilder
Flags: Read / Write / Construct Only
Default value: "no-name"
“parent-type-string”
property “parent-type-string” char *
Parent type name.
Owner: NcmModelBuilder
Flags: Read / Write / Construct Only
Default value: "NcmModel"
“sparams”
property“sparams” NcmObjArray *
Scalar parameters.
Owner: NcmModelBuilder
Flags: Read / Write / Construct Only
“stackable”
property “stackable” gboolean
Stackable.
Owner: NcmModelBuilder
Flags: Read / Write / Construct Only
Default value: FALSE
“vparams”
property“vparams” NcmObjArray *
Vector parameters.
Owner: NcmModelBuilder
Flags: Read / Write / Construct Only