Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data SimulationConfiguration r p = SimulationConfiguration {
- rates :: r
- population :: p
- newIdentifier :: Integer
- timeLimit :: Time
- initialIdentifier :: Integer
- newPerson :: Integer -> (Person, Integer)
- selectElem :: Vector a -> Int -> (a, Vector a)
- randomPerson :: Vector Person -> GenIO -> IO (Person, Vector Person)
- type NName = Maybe String
- type NLength = Maybe Double
- data NBranch = NBranch NSubtree NLength
- data NBranchSet = NBranchSet [NBranch]
- data NSubtree
- data NTree = NTree [NBranch]
- newickName :: (Monad f, CharParsing f) => f NName
- newickLeaf :: (Monad f, CharParsing f) => f NSubtree
- newickLength :: (TokenParsing f, Monad f, CharParsing f) => f NLength
- newickBranch :: (TokenParsing f, Monad f, CharParsing f) => f NBranch
- newickBranchSet :: (TokenParsing f, Monad f, CharParsing f) => f NBranchSet
- newickInternal :: (TokenParsing f, Monad f, CharParsing f) => f NSubtree
- newickSubtree :: (TokenParsing f, Monad f, CharParsing f) => f NSubtree
- newickTree :: (TokenParsing f, Monad f, CharParsing f) => f NTree
- sort :: Ord a => [a] -> [a]
- count' :: (a -> Bool) -> [a] -> Int
- simulation :: ModelParameters a => Bool -> SimulationConfiguration a b -> (a -> Time -> (Time, [EpidemicEvent], b, Integer) -> GenIO -> IO (Time, [EpidemicEvent], b, Integer)) -> IO [EpidemicEvent]
- isNonReconTreeObservation :: EpidemicEvent -> Bool
- isReconTreeLeaf :: EpidemicEvent -> Bool
- simulation' :: ModelParameters a => SimulationConfiguration a b -> (a -> Time -> (Time, [EpidemicEvent], b, Integer) -> GenIO -> IO (Time, [EpidemicEvent], b, Integer)) -> GenIO -> IO [EpidemicEvent]
- simulationWithSystemRandom :: ModelParameters a => Bool -> SimulationConfiguration a b -> (a -> Time -> (Time, [EpidemicEvent], b, Integer) -> GenIO -> IO (Time, [EpidemicEvent], b, Integer)) -> IO [EpidemicEvent]
- finalSize :: [EpidemicEvent] -> Integer
- inhomExponential :: PrimMonad m => Timed Double -> Gen (PrimState m) -> m Double
- randInhomExp :: PrimMonad m => Double -> Timed Double -> Gen (PrimState m) -> m (Maybe Double)
Documentation
data SimulationConfiguration r p Source #
SimulationConfiguration | |
|
data NBranchSet Source #
Instances
Eq NBranchSet Source # | |
Defined in Epidemic.Utility (==) :: NBranchSet -> NBranchSet -> Bool # (/=) :: NBranchSet -> NBranchSet -> Bool # | |
Show NBranchSet Source # | |
Defined in Epidemic.Utility showsPrec :: Int -> NBranchSet -> ShowS # show :: NBranchSet -> String # showList :: [NBranchSet] -> ShowS # |
newickName :: (Monad f, CharParsing f) => f NName Source #
newickLeaf :: (Monad f, CharParsing f) => f NSubtree Source #
newickLength :: (TokenParsing f, Monad f, CharParsing f) => f NLength Source #
newickBranch :: (TokenParsing f, Monad f, CharParsing f) => f NBranch Source #
newickBranchSet :: (TokenParsing f, Monad f, CharParsing f) => f NBranchSet Source #
newickInternal :: (TokenParsing f, Monad f, CharParsing f) => f NSubtree Source #
newickSubtree :: (TokenParsing f, Monad f, CharParsing f) => f NSubtree Source #
newickTree :: (TokenParsing f, Monad f, CharParsing f) => f NTree Source #
sort :: Ord a => [a] -> [a] Source #
Example run > (Success foo) = parseString newickTree mempty "((foo:1.1,bar:1.2):1.3,baz:1.4);" > (Success bar) = parseString newickTree mempty $ show foo > foo == bar True
:: ModelParameters a | |
=> Bool | Condition upon at least two leaves in the reconstructed tree |
-> SimulationConfiguration a b | |
-> (a -> Time -> (Time, [EpidemicEvent], b, Integer) -> GenIO -> IO (Time, [EpidemicEvent], b, Integer)) | |
-> IO [EpidemicEvent] |
Run a simulation described by a configuration object.
isNonReconTreeObservation :: EpidemicEvent -> Bool Source #
Predicate for whether an epidemic event is either an occurrence or a disaaster.
isReconTreeLeaf :: EpidemicEvent -> Bool Source #
Predicate for whether an epidemic event will appear as a leaf in the reconstructed tree.
simulation' :: ModelParameters a => SimulationConfiguration a b -> (a -> Time -> (Time, [EpidemicEvent], b, Integer) -> GenIO -> IO (Time, [EpidemicEvent], b, Integer)) -> GenIO -> IO [EpidemicEvent] Source #
simulationWithSystemRandom Source #
:: ModelParameters a | |
=> Bool | Condition upon at least two leaves in the reconstructed tree |
-> SimulationConfiguration a b | |
-> (a -> Time -> (Time, [EpidemicEvent], b, Integer) -> GenIO -> IO (Time, [EpidemicEvent], b, Integer)) | |
-> IO [EpidemicEvent] |
Run a simulation described by a configuration object but using a random seed generated by the system rather than a seed
:: [EpidemicEvent] | The events from the simulation |
-> Integer |
The number of lineages at the end of a simulation.
Generate exponentially distributed random variates with inhomogeneous rate.