Patterns in static

Apophenia

apop_settings.c File Reference

Functions


Detailed Description

Specifying model characteristics and details of estimation methods.


Function Documentation

void apop_settings_copy_group ( apop_model outm,
apop_model inm,
char *  copyme 
)

Copy a settings group with the given name from the second model to the first. (i.e., the arguments are in memcpy order).

You probably won't need this often---just use apop_model_copy.

void* apop_settings_get_group ( apop_model m,
char *  type 
)

This function gets the settings group with the given name. If it isn't found, then it returns NULL, so you can easily put it in a conditional like

  if (!apop_settings_get_group(m, "apop_ols")) ...

The settings macros don't need quotation marks, e.g.

It is recommended that you stick with this form, because other operations on settings require this form.

void* apop_settings_group_alloc ( apop_model model,
char *  type,
void *  free_fn,
void *  copy_fn,
void *  the_group 
)

Don't use this function. It's what the Apop_model_add_group macro uses internally. Use that.

void apop_settings_rm_group ( apop_model m,
char *  delme 
)

Remove a settings group from a model.

There are two ways to use this, the function or the macro:

  apop_settings_rm_group(your_model, "apop_mle");
  //or
  Apop_settings_rm_group(your_model, apop_mle);

The macro just calls the function, but is in line with some of the other macros that are preferred over the function.

If the model has no settings or your preferred settings group is not found, this function does nothing.

SourceForge.net Logo

Autogenerated by doxygen on 23 Nov 2009.