elynx-markov-0.5.0.2: Simulate molecular sequences along trees
Copyright(c) Dominik Schrempf 2020
LicenseGPL-3.0-or-later
Maintainerdominik.schrempf@gmail.com
Stabilityunstable
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

ELynx.Simulate.MarkovProcess

Description

Creation date: Thu Jan 24 09:02:25 2019.

Synopsis

Documentation

type ProbMatrix = Matrix R Source #

A probability matrix, P_ij(t) = Pr (X_t = j | X_0 = i).

type State = Int Source #

Make type signatures a little clearer.

probMatrix :: RateMatrix -> Double -> ProbMatrix Source #

The important matrix that gives the probabilities to move from one state to another in a specific time (branch length).

jump :: PrimMonad m => State -> ProbMatrix -> Gen (PrimState m) -> m State Source #

Move from a given state to a new one according to a transition probability matrix .

This function is the bottleneck of the simulator and takes up most of the computation time.