Class PrecomputedCDFunction
- All Implemented Interfaces:
Serializable,Function<Matrix,,Matrix> SerializableFunction<Matrix,Matrix>
This class is used to convert MATLAB class-dependence handles to Java by
pre-computing all possible function values in MATLAB and storing them in a
lookup table (see PrecomputedTableFunction). When the function is
called in Java, it looks up the pre-computed value.
A chain-independent handle returns the dimensionless scaling as a scalar,
which MATLAB broadcasts over the classes by elementwise multiplication in
State.afterEventStation. Such a scalar is returned here as a 1x1 Matrix, which
the JAR state machinery (AfterEventStation.cdScalar) broadcasts over
the classes in the same way.
A chain-specific handle instead returns the length-R row vector
[beta_1(n), ..., beta_R(n)] (Sauer's mu_{r,i}(n)), as the flow-equivalent-server
aggregation produces; see FesBetaFunction. Such a state is
tabulated whole via PrecomputedTableFunction.addValue(Matrix, double[])
and returned here as a 1xR Matrix. Collapsing it to a scalar would silently
drop the per-class resolution and yield the unscaled network.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionPrecomputedCDFunction(int numClasses) Creates a new pre-computed class dependence function with default value of 1.0, i.e.PrecomputedCDFunction(int numClasses, double defaultValue) Creates a new pre-computed class dependence function. -
Method Summary
Methods inherited from class jline.util.PrecomputedTableFunction
addValue, addValue, addValue, getNumClasses, lookup, lookupVector, size, toString
-
Constructor Details
-
PrecomputedCDFunction
public PrecomputedCDFunction(int numClasses, double defaultValue) Creates a new pre-computed class dependence function.- Parameters:
numClasses- the number of classes in the modeldefaultValue- the default value to return when a state is not found
-
PrecomputedCDFunction
public PrecomputedCDFunction(int numClasses) Creates a new pre-computed class dependence function with default value of 1.0, i.e. the neutral scaling.- Parameters:
numClasses- the number of classes in the model
-
-
Method Details
-
apply
Applies the class dependence function to the given state.
-