public class FunctionLib extends Object
Constructor and Description |
---|
FunctionLib(de.uka.ipd.sdq.probfunction.math.IRandomGenerator randomStream,
de.uka.ipd.sdq.probfunction.math.IPDFFactory factory)
Initialise the function library.
|
Modifier and Type | Method and Description |
---|---|
void |
addFunction(String id,
IFunction f)
Add a function to this function library.
|
Object |
evaluate(String functionID,
ArrayList<Object> parameterValues)
Evaluate the function with the given ID using the given parameters, e.g.
|
de.uka.ipd.sdq.probfunction.math.IRandomGenerator |
getRandomStream() |
public FunctionLib(de.uka.ipd.sdq.probfunction.math.IRandomGenerator randomStream, de.uka.ipd.sdq.probfunction.math.IPDFFactory factory)
public void addFunction(String id, IFunction f)
getRandomStream()
.id
- Name of the function to add. It is the ID in the stoexf
- The function object used during evaluationpublic de.uka.ipd.sdq.probfunction.math.IRandomGenerator getRandomStream()
public Object evaluate(String functionID, ArrayList<Object> parameterValues)
functionID
- ID of the function to evaluateparameterValues
- Parameter set to use in evaluation