Skip to content

Extending the Library

Michael Gardner edited this page May 9, 2019 · 3 revisions

Extending the Library

New stochastic models can be added to smelt by extending the stochastic::StochasticModel class. Users interested in doing so are referred to the API documentation where they can see details of what is required in the class implementation. Additionally, it is necessary to register the class constructor in the class factory to allow users to access the newly added stochastic model. This is done by providing a Register function in configure.cc so that the factory can be initialized in programs that link to smelt. If no additional helper functions are required, this is all that needs to be provided for new models to be included in smelt.

In the event that additional helper functions are required, users can add these in the relevant location (e.g. window functions, filter functions, or distributions). Depending on whether classes or helper functions are added, these will need to be registered in configure.cc either by providing a Register function or DispatchRegister function. Descriptions of these methods are provided in the API documentation.

If you are interested in adding a model to smelt, but are uncertain how to do so or need help please contact Michael Gardner at mhgardner@berkeley.edu.

Clone this wiki locally
You can’t perform that action at this time.