elynx-seq-0.1.0: Handle molecular sequences

Copyright(c) Dominik Schrempf 2019
LicenseGPL-3
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 (for performance reasons this probability matrix needs to be given as a list of generators, see https://hackage.haskell.org/package/distribution-1.1.0.0/docs/Data-Distribution-Sample.html). This function is the bottleneck of the simulator and takes up most of the computation time. However, I was not able to find a faster implementation than the one from Data.Distribution.