io.+linemodel.+dist

class linemodel.dist.TimedCodec

TIMEDCODEC Codec of the time-inhomogeneous MAPt and PHt. Segment matrices go out as a cell of matrices, one per segment, so a single-segment schedule keeps its nesting instead of collapsing.

Copyright (c) 2012-2026, Imperial College London All rights reserved.

Method Summary
static classes()
static decode(d)
static encode(dist, cn)
static types()
class linemodel.dist.ScalarCodec

SCALARCODEC Codec of every distribution whose wire form is a flat list of scalar parameters, {“type”: T, “params”: {name: value, …}}.

One row of TABLE per family: MATLAB class (also the wire type), the JSON parameter names, the getParam index each is read from, and the constructor that rebuilds the distribution from the decoded params. A new family of this shape is one new row, nothing else.

Copyright (c) 2012-2026, Imperial College London All rights reserved.

Method Summary
static classes()
static decode(d)
static encode(dist, cn)
static table()
static types()
class linemodel.dist.ReplayerCodec

REPLAYERCODEC Codec of the trace-driven Replayer: the trace file name and mean, plus an APH fit as a fallback for a reader without the file.

Copyright (c) 2012-2026, Imperial College London All rights reserved.

Method Summary
static classes()
static decode(d)
static encode(dist, ~)
static types()
class linemodel.dist.RAPCodec

RAPCODEC Codec of the rational arrival process (H0, H1).

Copyright (c) 2012-2026, Imperial College London All rights reserved.

Method Summary
static classes()
static decode(d)
static encode(dist, ~)
static types()
class linemodel.dist.PriorCodec

PRIORCODEC Codec of Prior: a discrete mixture of alternatives with prior probabilities, or a continuous parameter law plus the factory it feeds, the factory carried as the distribution it builds with the parameter left in the slots it fills (FACTORY, SLOTSUBST).

Copyright (c) 2012-2026, Imperial College London All rights reserved.

Method Summary
static classes()
static decode(d)
static encode(dist, ~)
static factory(prior)

Encode a continuous Prior’s factory as the distribution it BUILDS.

The handle theta -> Distribution cannot cross JSON, but the distribution it returns can, with the parameter left in the slot the handle fills: probing at two distinct quantiles of the parameter law identifies that slot, and a reader that substitutes theta there rebuilds the same alternative at ANY node count, so options.samples still means what it means in MATLAB. A factory that transforms the parameter instead of placing it (@(m) Exp(1/m)) has no such slot and is refused by name – see _kb/09-ldes-and-cache.md.

static slotSubst(tmpl, slots, theta)

Place the Prior parameter into the slots of a factory template distribution.

The twin of PriorCodec.factory: the template carries the constant parameters as probed and each named slot is overwritten with theta, so json2dist rebuilds the alternative the MATLAB factory handle would return.

static types()
class linemodel.dist.PHCodec

PHCODEC Codec of PH and APH, carried in the “ph” object (alpha, T). It is also the representation read from ANY document carrying “ph” (see DistCodec.REPRESENTATIONS), which is how a Replayer’s APH fit comes back.

Copyright (c) 2012-2026, Imperial College London All rights reserved.

Method Summary
static classes()
static decode(d)
static encode(dist, cn)

Keep the concrete class: an APH written back as a generic PH is a lossy downgrade, since solver feature sets admit APH but not PH.

static phObject(alpha, T)

PH = PHOBJECT(ALPHA, T) the “ph” object of the wire format.

static types()
class linemodel.dist.NHPPCodec

NHPPCODEC Codec of the piecewise-constant non-homogeneous Poisson process.

Copyright (c) 2012-2026, Imperial College London All rights reserved.

Method Summary
static classes()
static decode(d)
static encode(dist, ~)
static types()
class linemodel.dist.MarkerCodec

MARKERCODEC Codec of the parameterless markers Disabled and Immediate.

Copyright (c) 2012-2026, Imperial College London All rights reserved.

Method Summary
static classes()
static decode(d)
static encode(~, cn)
static types()
class linemodel.dist.MarkedTimedCodec

MARKEDTIMEDCODEC Codec of the marked time-inhomogeneous MMAPt and MPHt. Mark-major nesting: D1k{c}{j} (resp. exit{c}{j}) is mark c in segment j. The mark index is outermost so the key matches the stationary MMAP’s own ‘D1k’, which is also mark-indexed, and each mark’s segments go through the same per-segment read the unmarked schedules use.

Copyright (c) 2012-2026, Imperial College London All rights reserved.

Method Summary
static classes()
static decode(d)
static encode(dist, ~)
static types()
class linemodel.dist.MarkedMMPPCodec

MARKEDMMPPCODEC Codec of MarkedMMPP, D = {D0, D11, …, D1K}. It extends MarkovModulated, not MarkedMAP, so it is not the MMAP codec – see _kb/09-ldes-and-cache.md

Copyright (c) 2012-2026, Imperial College London All rights reserved.

Method Summary
static classes()
static decode(d)

the ctor rebuilds the aggregate D1 from the K == length(D)-1 form

static encode(dist, ~)
static types()
class linemodel.dist.MarkedMAPCodec

MARKEDMAPCODEC Codec of MarkedMAP, written as type MMAP with {D0, per-mark D1k}; the aggregate D1 is rebuilt on load by the constructor (K == length(D)-1 form).

Copyright (c) 2012-2026, Imperial College London All rights reserved.

Method Summary
static classes()
static decode(d)
static encode(dist, ~)
static types()
class linemodel.dist.MPHCodec

MPHCODEC Codec of the marked PH, written as (alpha, S, exits) rather than as the M3A cell it lowers to: writing the lowered cell would come back as a plain MMAP and lose the process type. The lowering is the constructor’s job on read.

Copyright (c) 2012-2026, Imperial College London All rights reserved.

Method Summary
static classes()
static decode(d)
static encode(dist, ~)
static types()
class linemodel.dist.MECodec

MECODEC Codec of ME and CME. CME goes on the wire as its (alpha, A) ME representation; the subclass tag is not preserved.

Copyright (c) 2012-2026, Imperial College London All rights reserved.

Method Summary
static classes()
static decode(d)
static encode(dist, ~)
static types()
class linemodel.dist.MAPCodec

MAPCODEC Codec of MAP, carried in the “map” object (D0, D1).

Copyright (c) 2012-2026, Imperial College London All rights reserved.

Method Summary
static classes()
static decode(d)
static encode(dist, ~)
static types()
class linemodel.dist.HyperExpCodec

HYPEREXPCODEC Codec of HyperExp, in two wire forms: 2-phase (scalar p) and n-phase (vector p, lambda). param2/param3 both store the FULL n-phase rate vector – see _kb/09-ldes-and-cache.md

Copyright (c) 2012-2026, Imperial College London All rights reserved.

Method Summary
static classes()
static decode(d)
static encode(dist, ~)
static types()
class linemodel.dist.ExpolynomialCodec

EXPOLYNOMIALCODEC Codec of Expolynomial: a nested object, mirroring the Python writer (the density is an expolynomial expression string, not a numeric parameter). “Inf” carries an unbounded latest firing time.

Copyright (c) 2012-2026, Imperial College London All rights reserved.

Method Summary
static classes()
static decode(d)
static encode(dist, ~)
static types()
class linemodel.dist.ExpCodec

EXPCODEC Codec of Exp. ‘lambda’ is canonical; ‘rate’ is accepted on read (the manual’s published LQN example uses it, and Python honours it).

Copyright (c) 2012-2026, Imperial College London All rights reserved.

Method Summary
static classes()
static decode(d)
static encode(dist, ~)
static types()
class linemodel.dist.EmpiricalCDFCodec

EMPIRICALCDFCODEC Codec of EmpiricalCDF. Its data is [F, x] rows (cdf value, support point), as assembled by the two-argument ctor; the two columns go on the wire separately.

Copyright (c) 2012-2026, Imperial College London All rights reserved.

Method Summary
static classes()
static decode(d)
static encode(dist, ~)
static types()
class linemodel.dist.DMAPCodec

DMAPCODEC Codec of the discrete-time MAP. Distinct from MAP on the wire: D0+D1 is stochastic, not an infinitesimal generator, so a reader must not rebuild it as MAP.

Copyright (c) 2012-2026, Imperial College London All rights reserved.

Method Summary
static classes()
static decode(d)
static encode(dist, ~)
static types()
class linemodel.dist.CoxianCodec

COXIANCODEC Codec of Coxian and Cox2, both written as type Coxian (mu, phi).

Copyright (c) 2012-2026, Imperial College London All rights reserved.

Method Summary
static classes()
static decode(d)
static encode(dist, ~)
static types()
class linemodel.dist.DiscreteSamplerCodec

DISCRETESAMPLERCODEC Codec of DiscreteSampler (pmf p over support x).

Copyright (c) 2012-2026, Imperial College London All rights reserved.

Method Summary
static classes()
static decode(d)
static encode(dist, ~)
static types()
class linemodel.dist.BMAPCodec

BMAPCODEC Codec of the batch MAP, D = {D0, D1, …, Dk} with Dk driving batches of size k. Must never be emitted as an MMAP (its mark index is a batch size, not a class) – see _kb/09-ldes-and-cache.md

Copyright (c) 2012-2026, Imperial College London All rights reserved.

Method Summary
static classes()
static decode(d)
static encode(dist, ~)
static types()
class linemodel.dist.BMMAPtCodec

BMMAPTCODEC Codec of the batch marked time-inhomogeneous MAP. Mark-major then batch then segment: D1kb{c}{b}{j} releases b jobs of mark c in segment j. The mark index stays outermost so the key extends the MMAPt ‘D1k’ rather than reshaping it, and the batch axis is DENSE in b = 1..B exactly as BMAP’s own ‘D’ is. The derived per-mark and aggregate blocks are NOT written: the constructor rebuilds them, so the document cannot carry a sum that disagrees with its own parts.

Copyright (c) 2012-2026, Imperial College London All rights reserved.

Method Summary
static classes()
static decode(d)
static encode(dist, ~)
static types()