Package jline.io

Class Ret.ProbabilityResult

java.lang.Object
jline.io.Ret.ProbabilityResult
Enclosing class:
Ret

public static class Ret.ProbabilityResult extends Object
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 Details

    • probability

      public Matrix probability
      The probability value(s). Can be a scalar, vector, or matrix depending on the analysis type.
    • logNormalizingConstant

      public double logNormalizingConstant
      The logarithm of the normalizing constant (for methods that compute it).
    • isAggregated

      public boolean isAggregated
      Indicates whether the result is for an aggregated state space.
    • nodeIndex

      public Integer nodeIndex
      The node/station index for marginal probabilities (null for system-wide results).
    • state

      public Matrix 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

      public ProbabilityResult(Matrix probability)
      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

      public Matrix 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