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 Details

    • FunctionLib

      public FunctionLib(de.uka.ipd.sdq.probfunction.math.IRandomGenerator randomStream, de.uka.ipd.sdq.probfunction.math.IPDFFactory factory)
      Initialise the function library.
  • Method Details

    • 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