#chain #markov #probability #random #numerics


Simulation of Markov Processes as stochastic processes

3 releases

✓ Uses Rust 2018 edition

new 0.1.2 Apr 2, 2020
0.1.1 Mar 24, 2020
0.1.0 Mar 24, 2020

#82 in Science


271 lines


Simulation of Markov Processes as stochastic processes.

Main features

  • Easy construction of Markov processes, including:
    • Discrete time
    • Continuous time (exponential times)
  • Type agnostic


Last version:

  • 0.1.2
    • Documentation added.
    • Fixed bug in method markovian::traits::BranchingTrait::approx_generating_fun.

For more, see Changelog.

To do list

  • Tests


Separate sub and proper stochastic processes

Goal: Construct correctly stochastic and sub-stochastic process in different structs.

Current implementation: Sub-stochastic process for all structs.


  • Needs:
    • Exact transitions

Implement Distribution

Goal: Random processes are also source of random transitions, therefore, we should be able to sample transitions.

Current implementation: None


  • rand_distr::Distribution

Differentiate Markov Chains in continuous space

Goal: Easier and checkable implementation of continuous space markov processes by using randomness from the chain to simulate the next step.

Current implementation: Random transition function that leads a vector of one element.


  • Needs
    • random generator choice.

Sample trajectory

Goal: Random processes are also source of random trajectories. Therefore, we should be able to sample them.

Current implementation: None


  • method sample_trajectory
    • sample_trajectory_iter as in rand_distr::Distribution

Random generator choice

Goal: Include random generator to the construction step.

Current implementation: New standard sampler for each step simulation.


  • rand

Exact transitions

Goal: Integration with some crate for creation of a correct (sub-)distribution for each step.

Current implementation: f64 for probabilities and there is no correctness check.


  • Rational numbers
  • statrs
  • rand_distr
  • probability


Your contribution is highly appreciated. Do not hesitate to open an issue or a pull request. Note that any contribution submitted for inclusion in the project will be licensed according to the terms of the dual license (MIT and Apache-2.0).


~11K SLoC