Class StoExCache
java.lang.Object
de.uka.ipd.sdq.simucomframework.variables.cache.StoExCache
A cache for Stoex. This saves the time to parse the stoex again. Caches also the
IRandomGenerator
which may contain a fixed seed.-
Constructor Summary
ModifierConstructorDescriptionprotected
StoExCache
(de.uka.ipd.sdq.probfunction.math.IProbabilityFunctionFactory probFunctionFactory) Only protected because the cost model should have its own instance of the StoExCache so that it can be resetted independently of the main singleton instance. -
Method Summary
Modifier and TypeMethodDescriptionGet a cached stoex parse tree and visitors.de.uka.ipd.sdq.probfunction.math.IProbabilityFunctionFactory
de.uka.ipd.sdq.probfunction.math.IRandomGenerator
static void
initialiseStoExCache
(de.uka.ipd.sdq.probfunction.math.IProbabilityFunctionFactory probFunctionFactory) static StoExCache
-
Constructor Details
-
StoExCache
protected StoExCache(de.uka.ipd.sdq.probfunction.math.IProbabilityFunctionFactory probFunctionFactory) Only protected because the cost model should have its own instance of the StoExCache so that it can be resetted independently of the main singleton instance.- Parameters:
randomGenerator
-
-
-
Method Details
-
initialiseStoExCache
public static void initialiseStoExCache(de.uka.ipd.sdq.probfunction.math.IProbabilityFunctionFactory probFunctionFactory) -
singleton
-
getEntry
Get a cached stoex parse tree and visitors. If entry is not in the cache it is created and added automatically.- Parameters:
spec
- The stoex to search for in the cache- Returns:
- The StoExCacheEntry containing the static information on the stoex
-
getRandomGenerator
public de.uka.ipd.sdq.probfunction.math.IRandomGenerator getRandomGenerator() -
getProbabilityFunctionFactory
public de.uka.ipd.sdq.probfunction.math.IProbabilityFunctionFactory getProbabilityFunctionFactory()
-