Documentation
¶
Overview ¶
Package diffusion implements an spherical diffusion approximated using a discrete isolatitude pixelation for a phylogenetic biogeography analysis.
Index ¶
- func SetCPU(cpu int)
- type Param
- type SrcDest
- type Tree
- func (t *Tree) Conditional(n int, age int64) map[int]float64
- func (t *Tree) DownPass() float64
- func (t *Tree) LogLike() float64
- func (t *Tree) Name() string
- func (t *Tree) Nodes() []int
- func (t *Tree) Particles(n int, age int64) int
- func (t *Tree) SetConditional(n int, age int64, logLike map[int]float64)
- func (t *Tree) Simulate(particles int)
- func (t *Tree) SrcDest(n, p int, age int64) SrcDest
- func (t *Tree) Stages(n int) []int64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Param ¶
type Param struct { // Paleolandscape model Landscape *model.TimePix // Stage rotation model Rot *model.StageRot // Distance matrix DM *earth.DistMat // Pixel weights PW pixweight.Pixel // Ranges is the collection of terminal ranges Ranges *ranges.Collection // Length in years of the stem node Stem int64 // Lambda is the concentration parameter per million years // in 1/radian units Lambda float64 // Stages is the time stages used to split branches. Stages []int64 }
Param is a collection of parameters for the initialization of a tree.
type Tree ¶
type Tree struct {
// contains filtered or unexported fields
}
A Tree os a phylogenetic tree for biogeography.
func NewSimData ¶ added in v0.3.0
NewSimData creates a new tree for data simulation by copying the indicated source tree.
To make the simulation use method Simulate.
func (*Tree) Conditional ¶ added in v0.2.0
Conditional returns the conditional logLikelihood for a given node at a given age stage (in years). The conditional likelihood is returned as a map of pixels to the logLikelihood of the pixels.
func (*Tree) DownPass ¶ added in v0.2.0
DownPass performs the Felsenstein's pruning algorithm to estimate the likelihood of the data for a tree.
func (*Tree) LogLike ¶
LogLike returns the logLikelihood of the whole reconstruction in the most basal stem node.
func (*Tree) Particles ¶ added in v0.3.0
Particles return the number of particles for a given nodes at a give age stage (in years) for the simulation.
func (*Tree) SetConditional ¶ added in v0.2.0
SetConditional sets the conditional likelihood (in logLike units) of a node at a given time stage.