Skip to main content

container-types.tppl

type BranchSample​

Container type for the history along a branch, along with the debt from the independence model

type BranchSample = BranchSample {
history: Event[][], success: Bool
}

type CorrectedBranchSample​

Like the above but with the excess from the full model too

type CorrectedBranchSample = CorrectedBranchSample {
history: Event[],
logDebt: Real,
logExcess: Real,
success: Bool
}

type EmbeddedMarkovChainMatrix​

Container type for a CTMC in jump chain form

type EmbeddedMarkovChainMatrix = EmbeddedMarkovChainMatrix {
totalRates: Real[],
transitionProbs: Real[][],
mat: Matrix[Real]
}

type Event​

Container type for a single event in a host

type Event = Event {eventTime: Real, fromState: Int, toState: Int, host: Int}

type HistoryTree​

This is the final tree with node repertoires and branch histories

type HistoryTree =
| HistoryLeaf {age: Real, label: Int, repertoire: Int[], history: Event[]}
| HistoryNode {age: Real, left: HistoryTree, right: HistoryTree, label: Int, repertoire: Int[], history: Event[]}

type HostBranchSample​

type HostBranchSample = HostBranchSample {
history: Event[], success: Bool
}

type ModelParams​

Container type for all model params

type ModelParams = ModelParams {
beta: Real,
hostMetric: Matrix[Real],
embeddedQMatrix: EmbeddedMarkovChainMatrix,
meanDist: Real
}

type MsgTree​

The result from postorder message passing

type MsgTree =
| MsgLeaf{

type TreeLabeled​

Types shared by several files Tree with labels

type TreeLabeled =
| Leaf{age: Real, label: Int}
| Node{age: Real, left: TreeLabeled, right: TreeLabeled, label: Int}