Class FunctionLib
- java.lang.Object
-
- de.uka.ipd.sdq.simucomframework.variables.functions.FunctionLib
-
public class FunctionLib extends Object
Function library of functions available in stoex in simucom
-
-
Constructor Summary
Constructors Constructor Description FunctionLib(de.uka.ipd.sdq.probfunction.math.IRandomGenerator randomStream, de.uka.ipd.sdq.probfunction.math.IPDFFactory factory)
Initialise the function library.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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()
-
-
-
Method Detail
-
addFunction
public void addFunction(String id, IFunction f)
Add a function to this function library. The passed function should use the instance of SimuComDefaultRandomNumberGenerator returned bygetRandomStream()
.- Parameters:
id
- Name of the function to add. It is the ID in the stoexf
- The function object used during evaluation
-
getRandomStream
public de.uka.ipd.sdq.probfunction.math.IRandomGenerator getRandomStream()
-
evaluate
public Object evaluate(String functionID, ArrayList<Object> parameterValues)
Evaluate the function with the given ID using the given parameters, e.g. f(10,29)- Parameters:
functionID
- ID of the function to evaluateparameterValues
- Parameter set to use in evaluation- Returns:
- Value of the function evaluated using the given parameters
-
-