Package jline.io
Class Ret.ProbabilityResult
java.lang.Object
jline.io.Ret.ProbabilityResult
- Enclosing class:
Ret
Unified result type for probability computations in queueing network solvers.
This class provides a standardized interface for returning probability values from various probability analyses including:
- State probabilities (marginal or joint)
- Normalizing constants
- Aggregated state probabilities
- Node-specific marginal probabilities
The result can represent scalar probabilities, probability vectors, or probability matrices depending on the specific analysis performed.
-
Field Summary
FieldsModifier and TypeFieldDescriptionbooleanIndicates whether the result is for an aggregated state space.doubleThe logarithm of the normalizing constant (for methods that compute it).The node/station index for marginal probabilities (null for system-wide results).The probability value(s).The state specification for which the probability was computed. -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.ProbabilityResult(double probability) Constructor for scalar probability results.ProbabilityResult(double logNormalizingConstant, boolean isLogNormConst) Constructor for normalizing constant results.ProbabilityResult(Matrix probability) Constructor for matrix probability results. -
Method Summary
Modifier and TypeMethodDescriptionGets the probability matrix.doubleGets the probability as a scalar value.booleanChecks if this result contains a valid normalizing constant.booleanChecks if this result contains a valid probability value.
-
Field Details
-
probability
The probability value(s). Can be a scalar, vector, or matrix depending on the analysis type. -
logNormalizingConstant
public double logNormalizingConstantThe logarithm of the normalizing constant (for methods that compute it). -
isAggregated
public boolean isAggregatedIndicates whether the result is for an aggregated state space. -
nodeIndex
The node/station index for marginal probabilities (null for system-wide results). -
state
The state specification for which the probability was computed.
-
-
Constructor Details
-
ProbabilityResult
public ProbabilityResult()Default constructor. -
ProbabilityResult
public ProbabilityResult(double probability) Constructor for scalar probability results.- Parameters:
probability- the probability value
-
ProbabilityResult
Constructor for matrix probability results.- Parameters:
probability- the probability matrix
-
ProbabilityResult
public ProbabilityResult(double logNormalizingConstant, boolean isLogNormConst) Constructor for normalizing constant results.- Parameters:
logNormalizingConstant- the log of the normalizing constant
-
-
Method Details
-
getScalarProbability
public double getScalarProbability()Gets the probability as a scalar value.- Returns:
- the scalar probability value
- Throws:
IllegalStateException- if the result is not a scalar
-
getProbabilityMatrix
Gets the probability matrix.- Returns:
- the probability matrix
-
hasValidProbability
public boolean hasValidProbability()Checks if this result contains a valid probability value.- Returns:
- true if the probability is valid
-
hasValidNormalizingConstant
public boolean hasValidNormalizingConstant()Checks if this result contains a valid normalizing constant.- Returns:
- true if the normalizing constant is valid
-