packages feed

dtmc-0.3.0.0: CHANGELOG.md

# Changelog

## 0.3.0.0

- Updated the `Transition` class definition with a defaulted internal dense
  backend method and relaxed finite-state constraints on cached queries.
  Existing custom instances can continue to implement only `transitionLaw`.
  The major version bump accounts for these class and signature changes.

- Updated the package maintainer contact email.
- Made `evolveVectorN` choose between repeated matrix-vector multiplication
  and matrix powering, avoiding unnecessary full matrix powers for moderate
  step counts.
- Added `simulateMatrix`, which lazily prepares and shares cumulative sampling
  rows during a trajectory instead of rebuilding map-backed distributions on
  every transition.
- Reworked the GTH stationary solver around strict indexed mutable-vector
  loops, substantially reducing allocation in large irreducible classes.
- Cached complete communicating-class classifications lazily in transition
  matrices, allowing repeated whole-chain queries to share public results.
- Split warm-class benchmarks into cached access and fully consumed cases,
  with equivalent state traversal in Haskell and Python.
- Reduced support-graph construction allocation by scanning the matrix's
  storable row-major vector directly instead of materialising boxed row and
  value lists first.
- Centralised adaptive dense finite-horizon paths shared by finite-time,
  hitting-time, return-time, and visit-count analyses. Branching
  transition-matrix rows use BLAS-backed vector propagation, while
  deterministic matrices and general locally finite kernels retain the
  existing sparse recurrences and public API.
- Added a batched absorption-probability matrix operation that solves every
  recurrent destination with one shared factorisation, while scalar
  absorption queries now solve their single right-hand side directly instead
  of constructing the complete fundamental inverse.
- Reduced shared @(I - Q)@ solve overhead by proving well-conditioned DTMC
  systems from an extra right-hand side in the existing LU factorisation,
  avoiding a separate singular-value decomposition except near the numerical
  rejection threshold. Matrix validation and residual norms now scan
  unboxed storage rather than materialising boxed element lists.
- Represented dense bounded-hitting targets by their canonical indices rather
  than two full floating-point masks, reducing target-mass collection to the
  target coordinates and clearing only those coordinates after each step.

## 0.2.0.0

First Hackage release.

- Added validated dense and sparse probability distributions.
- Added type-safe finite transition matrices and locally finite transition
  kernels, with representation-independent finite-horizon evolution and
  simulation.
- Added finite-time joint and conditional probabilities.
- Added exact-time, bounded, eventual, competing, and expected hitting and
  return quantities.
- Added finite- and infinite-horizon visit-count analysis, including the
  occupation matrix.
- Added communicating-class, recurrence, transience, periodicity, and cyclic
  class analysis.
- Added canonical decomposition, fundamental matrices, and absorption
  probabilities and expectations.
- Added extremal stationary distributions for every recurrent class, ordinary
  limiting matrices, and cyclic subsequential limits.
- Added state-labelled and list-based construction and inspection. No
  `hmatrix` type appears in the public API.
- Changed the internal dense storage of `DistributionVector` and
  `TransitionMatrix` from statically sized values to ordinary `hmatrix`
  vectors and matrices. The public types remain state-indexed and abstract,
  and their smart constructors continue to validate dimensions against the
  finite state cardinality.
- Added `Dtmc.Distribution.Map.mapStates` for transforming sparse
  distributions, combining the weights of states that share a target.
- Added `Dtmc.Transition.Matrix.fromRows`, which builds a matrix from a grid
  of weights and reports shape mismatches as typed errors.
- Made GTH stationary-distribution normalisation robust when finite weights
  have a sum that overflows `Double`.
- Reduced dense transition-row lookup from quadratic to linear time and
  space.
- Made `Dtmc.Distribution.Vector.fromList` positional: it now takes one weight
  per state in canonical state order, so it is the exact inverse of `toList`,
  and reports a length mismatch through the new `DistributionVectorError`.
  Labelled construction, where duplicates combine and missing states default
  to zero, remains `Dtmc.Distribution.Map.fromList`.
- Supports GHC 9.6 through 9.14.
- Narrowed `Dtmc.Analysis.Classification` to the queries themselves. The
  `Classification` report and `classify` are no longer exported, and with them
  the `Of` suffixes that existed only to keep record fields from colliding
  with the standalone functions. `absorbingStates`, `chainPeriod` and
  `ergodic` are now functions on a matrix, and `communicatingClasses` returns
  `[CommClass state]`, carrying each class's period and closedness rather than
  its members alone.