With this data structure, you can wrap a partition of choice.
The idea is that in some message passing algorithms, there is only a wave of partitions which need to actualize.
For instance, a wave following a root-leaf path, or a depth-first traversal.
In which case, we can be more economical with our memory consumption.
With a worst case memory complexity of O(log(n)), where n is the number of nodes, functionality is provided for:
log_likelihood!
felsenstein!
sample_down
(Further functionality is under development)
Introduces
LazyPartition
Summary
With this data structure, you can wrap a partition of choice. The idea is that in some message passing algorithms, there is only a wave of partitions which need to actualize. For instance, a wave following a root-leaf path, or a depth-first traversal. In which case, we can be more economical with our memory consumption. With a worst case memory complexity of O(log(n)), where n is the number of nodes, functionality is provided for:
log_likelihood!
felsenstein!
sample_down
(Further functionality is under development)Documentation
An example of how to use
LazyPartition
is provided in https://github.com/nossleinad/MolecularEvolution.jl/tree/LazyPartition/docs/src/models.mdUse case
An argument in favour of this PR is that
LazyPartition
could be integrated in the difFUBAR method with brevity, where it dramatically reduced the memory footprint of larger datasets. https://github.com/MurrellGroup/CodonMolecularEvolution.jl/commit/b09b0c95cabd43cf3d7a604d810cf4351cfc460e