public abstract class Model extends Object
public class SIRModel implements Model {
public void run() {
// perform model specific step here
}
Modifier and Type | Field and Description |
---|---|
private Lookup |
lookup |
private String |
model |
private List<Parameter> |
parameters |
private List<Prior> |
priors |
Constructor and Description |
---|
Model() |
Modifier and Type | Method and Description |
---|---|
abstract void |
finalise()
End the model.
|
String |
getParameterValue(String name)
Get the value of a parameter for the model given the parameter name (as defined in the config file).
|
Boolean |
getParameterValueAsBoolean(String name)
Get the value (as a boolean) of a parameter for the model given the parameter name (as defined in the config
file).
|
Double |
getParameterValueAsDouble(String name)
Get the value (as a double) of a parameter for the model given the parameter name (as defined in the config
file).
|
Integer |
getParameterValueAsInteger(String name)
Get the value (as an integer) of a parameter for the model given the parameter name (as defined in the config
file).
|
UniformPrior |
getUniformPrior(String name)
Get the prior of a paramter for the model given the parameter name (as defined in the config file).
|
boolean |
hasParameter(String name)
Determine whether or not a parameter exists in the config file.
|
abstract void |
init()
Initialise the model.
|
abstract void |
run()
Run the model.
|
void |
setModelConfiguration(String model)
Set the xml string for the
|
void |
setModelDataLookup(Lookup lookup)
Set the lookup object that allows access to the data files specified in the configuration file.
|
void |
setModelParameters(List<Parameter> parameters)
Set the list of parameters for the model.
|
void |
setModelPriors(List<Prior> priors)
Set the list of priors for the model.
|
public final void setModelConfiguration(String model)
model
- a string representation of the xml section defining the configuration of the model.public final void setModelDataLookup(Lookup lookup)
lookup
- the XML element corresponding to the Model element in the config.public final void setModelParameters(List<Parameter> parameters)
parameters
- a collection of parameters for the model.public final void setModelPriors(List<Prior> priors)
priors
- a collection of priors for the model.public final UniformPrior getUniformPrior(String name)
name
- the name of the parameter.public final boolean hasParameter(String name)
name
- the name of the parameter.public final String getParameterValue(String name)
name
- the name of the parameter.public final Double getParameterValueAsDouble(String name)
name
- the name of the parameter.public final Integer getParameterValueAsInteger(String name)
name
- the name of the parameter.public final Boolean getParameterValueAsBoolean(String name)
name
- the name of the parameter.public abstract void init()
public abstract void run()
public abstract void finalise()
Copyright © 2015 University of Glasgow. All rights reserved.