barry: Your go-to motif accountant
0.0-1
Full enumeration of sample space and fast count of sufficient statistics for binary arrays
|
A Flock is a group of Geese. More...
#include <flock-bones.hpp>
Public Member Functions | |
Flock () | |
~Flock () | |
size_t | add_data (std::vector< std::vector< size_t > > &annotations, std::vector< size_t > &geneid, std::vector< int > &parent, std::vector< bool > &duplication) |
Add a tree to the flock. More... | |
void | set_seed (const size_t &s) |
Set the seed of the model. More... | |
void | init (size_t bar_width=BARRY_PROGRESS_BAR_WIDTH) |
PhyloCounters * | get_counters () |
PhyloSupport * | get_support_fun () |
std::vector< double > * | get_stats_support () |
std::vector< std::vector< double > > * | get_stats_target () |
PhyloModel * | get_model () |
double | likelihood_joint (const std::vector< double > &par, bool as_log=false, bool use_reduced_sequence=true, size_t ncores=1u) |
Returns the joint likelihood of the model. More... | |
Geese * | operator() (size_t i, bool check_bounds=true) |
Access the i-th geese element. More... | |
Information about the model | |
size_t | nfuns () const noexcept |
size_t | ntrees () const noexcept |
std::vector< size_t > | nnodes () const noexcept |
std::vector< size_t > | nleafs () const noexcept |
size_t | nterms () const |
size_t | support_size () const noexcept |
std::vector< std::string > | colnames () const |
size_t | parse_polytomies (bool verb=true, std::vector< size_t > *dist=nullptr) const noexcept |
Check polytomies and return the largest. More... | |
void | print () const |
Public Attributes | |
std::vector< Geese > | dat |
size_t | nfunctions = 0u |
bool | initialized = false |
std::mt19937 | rengine |
PhyloModel | model = PhyloModel() |
This object buils a model with multiple trees (Geese objects), with all of these using the same PhyloModel object. Available counters (terms) can be found in counter-phylo.
Definition at line 14 of file flock-bones.hpp.
|
inline |
Definition at line 25 of file flock-bones.hpp.
|
inline |
Definition at line 26 of file flock-bones.hpp.
|
inline |
Add a tree to the flock.
annotations | see Geese::Geese. |
geneid | see Geese. |
parent | see Geese. |
duplication | see Geese. |
Definition at line 6 of file flock-meat.hpp.
|
inline |
Definition at line 246 of file flock-meat.hpp.
|
inline |
Definition at line 100 of file flock-meat.hpp.
|
inline |
Definition at line 131 of file flock-meat.hpp.
|
inline |
Definition at line 117 of file flock-meat.hpp.
|
inline |
Definition at line 124 of file flock-meat.hpp.
|
inline |
Definition at line 110 of file flock-meat.hpp.
|
inline |
Definition at line 49 of file flock-meat.hpp.
|
inline |
Returns the joint likelihood of the model.
par | Vector of model parameters. |
as_log | When true it will return the value as log. |
use_reduced_sequence | When true (default) will compute the likelihood using the reduced sequence, which is faster. |
Definition at line 138 of file flock-meat.hpp.
|
inlinenoexcept |
Definition at line 189 of file flock-meat.hpp.
|
inlinenoexcept |
Definition at line 217 of file flock-meat.hpp.
|
inlinenoexcept |
Definition at line 203 of file flock-meat.hpp.
|
inline |
Definition at line 231 of file flock-meat.hpp.
|
inlinenoexcept |
Definition at line 196 of file flock-meat.hpp.
|
inline |
Access the i-th geese element.
i | Element to access |
check_bounds | When true, it will check bounds. |
Definition at line 324 of file flock-meat.hpp.
|
inlinenoexcept |
Check polytomies and return the largest.
Definition at line 253 of file flock-meat.hpp.
|
inline |
Definition at line 280 of file flock-meat.hpp.
|
inline |
Set the seed of the model.
s | Passed to the rengine.seed() member object. |
Definition at line 42 of file flock-meat.hpp.
|
inlinenoexcept |
Definition at line 239 of file flock-meat.hpp.
std::vector< Geese > Flock::dat |
Definition at line 17 of file flock-bones.hpp.
bool Flock::initialized = false |
Definition at line 19 of file flock-bones.hpp.
PhyloModel Flock::model = PhyloModel() |
Definition at line 23 of file flock-bones.hpp.
size_t Flock::nfunctions = 0u |
Definition at line 18 of file flock-bones.hpp.
std::mt19937 Flock::rengine |
Definition at line 22 of file flock-bones.hpp.