Package jline.util
Class PrecomputedRateFunction
java.lang.Object
jline.util.PrecomputedTableFunction
jline.util.PrecomputedRateFunction
- All Implemented Interfaces:
Serializable,Function<Matrix,,Double> SerializableFunction<Matrix,Double>
public class PrecomputedRateFunction
extends PrecomputedTableFunction
implements SerializableFunction<Matrix,Double>, Serializable
A pre-computed scalar rate function that stores function values for all
possible state combinations.
This class is used to convert the MATLAB mu(c) handle of a pass-and-swap
(PAS) or order-independent (OI) queue to Java, by pre-computing the rate over
every ordered class sequence in MATLAB and storing it in a lookup table (see
PrecomputedTableFunction). The state c is the ordered list of 0-based
class indices, keyed as "c1,c2,...,cp".
Unlike the dimensionless class dependence of PrecomputedCDFunction,
mu(c) is a total service RATE and is consumed as a scalar
(QueueNodeParam.svcRateFun), hence the Double return type.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionPrecomputedRateFunction(int numClasses) Creates a new pre-computed rate function defaulting to a zero rate on states absent from the table.PrecomputedRateFunction(int numClasses, double defaultValue) Creates a new pre-computed rate function. -
Method Summary
Methods inherited from class jline.util.PrecomputedTableFunction
addValue, addValue, addValue, getNumClasses, lookup, lookupVector, size, toString
-
Constructor Details
-
PrecomputedRateFunction
public PrecomputedRateFunction(int numClasses, double defaultValue) Creates a new pre-computed rate function.- Parameters:
numClasses- the number of classes in the modeldefaultValue- the default rate to return when a state is not found
-
PrecomputedRateFunction
public PrecomputedRateFunction(int numClasses) Creates a new pre-computed rate function defaulting to a zero rate on states absent from the table.- Parameters:
numClasses- the number of classes in the model
-
-
Method Details