Class FunctionLib


  • public class FunctionLib
    extends Object
    Function library of functions available in stoex in simucom
    • Constructor Detail

      • FunctionLib

        public FunctionLib​(de.uka.ipd.sdq.probfunction.math.IRandomGenerator randomStream,
                           de.uka.ipd.sdq.probfunction.math.IPDFFactory factory)
        Initialise the function library.
    • 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 by getRandomStream().
        Parameters:
        id - Name of the function to add. It is the ID in the stoex
        f - 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 evaluate
        parameterValues - Parameter set to use in evaluation
        Returns:
        Value of the function evaluated using the given parameters