Class MarkedMAP

All Implemented Interfaces:
Serializable, Copyable
Direct Known Subclasses:
BMAP, MMAP

public class MarkedMAP extends Marked implements Serializable
A Marked Markovian Arrival Process
See Also:
  • Constructor Details

    • MarkedMAP

      public MarkedMAP()
    • MarkedMAP

      public MarkedMAP(MatrixCell mmap)
      Constructs a MarkedMAP from a MatrixCell, normalizing it to the M3A layout {D0, D1_agg, D11, ..., D1K} used throughout the mam API (mmap_sample, mmap_normalize, mmap_super) and by Marked.D(1,k). Accepted input layouts: - {D0, D1_agg, D11, ..., D1K} (M3A): detected when cell 1 equals the sum of cells 2..end; stored as-is. - {D0, D11, ..., D1K} (per-type, no aggregate): the aggregate is inserted at index 1. - {D0} or {D0, D1}: unmarked (K=0); stored as-is. The detection is a sum check with relative tolerance; for ambiguous inputs use MarkedMAP(MatrixCell, int) with an explicit type count, mirroring the MATLAB MarkedMAP(D,K) constructor.
    • MarkedMAP

      public MarkedMAP(MatrixCell mmap, int K)
      Constructs a MarkedMAP with an explicit number of arrival types, mirroring MATLAB MarkedMAP(D,K): K == size-2 means the cell is already in M3A layout {D0, D1_agg, D11..D1K}; K == size-1 means the cell is {D0, D11..D1K} and the aggregate is inserted at index 1.
      Parameters:
      mmap - the process matrices
      K - the number of arrival types (marks)
  • Method Details

    • getNumberOfTypes

      public int getNumberOfTypes()
      Number of arrival types (marks) K under the M3A layout.
      Returns:
      K = size-2, or 0 for an unmarked {D0[,D1]} process
    • normalize

      public void normalize()
      Normalizes the MarkedMAP so that D0+D1_agg rows form a proper infinitesimal generator, with the aggregate at index 1 recomputed from the per-type matrices (M3A layout). Delegates to the mam API mmap_normalize; falls back to a {D0,D1} MAP-style normalization for an unmarked process.
    • sample

      public double[] sample(int n)
      Description copied from class: Distribution
      Generates random samples from this distribution using default random generator.
      Overrides:
      sample in class Markovian
      Parameters:
      n - the number of samples to generate
      Returns:
      array of random samples
    • sample

      public double[] sample(int n, Random random)
      Generates samples from the MarkedMAP using the specified random generator. Returns inter-arrival times with corresponding marks.
      Overrides:
      sample in class Markovian
      Parameters:
      n - the number of samples to generate
      random - the random number generator to use
      Returns:
      array of inter-arrival times (marks are not returned in this basic implementation)
    • toTimeReversed

      public MarkedMAP toTimeReversed()
    • toMAP

      public MAP toMAP()
      Aggregate MAP over all marks: MAP(D0, D1_agg). Mirrors MATLAB MarkedMAP.toMAP.
      Returns:
      the aggregate (unmarked) MAP
    • toMAPs

      public MAP toMAPs(int k)
      Marginal MAP of mark k: arrivals fire only on D1k, while the other marks' transitions become hidden phase changes, i.e. MAP(D0 + D1_agg - D1k, D1k). Mirrors MATLAB MarkedMAP.toMAPs for a single type.
      Parameters:
      k - the mark index (1-based)
      Returns:
      the marginal MAP of mark k