19 #ifndef _biomcmc_randomise_h_ 20 #define _biomcmc_randomise_h_ void create_parent_node_from_children(topology tree, int parent, int lchild, int rchild)
create internal node with given children (children coalesce into parent node)
Definition: topology_randomise.c:109
void topology_apply_shortspr(topology tree, bool update_done)
recursive SPR over all internal nodes, assuming common prob of swap per node
Definition: topology_randomise.c:145
Probability distribution functions and auxiliary mathematical functions from statistical package R...
branch length operations on topologies, including patristic distances
void topology_apply_spr_unrooted(topology tree, bool update_done)
random Subtree Prune-and-Regraft branch swapping generalized (neglecting root)
Definition: topology_randomise.c:341
void topology_apply_spr(topology tree, bool update_done)
random Subtree Prune-and-Regraft branch swapping
Definition: topology_randomise.c:326
void quasi_randomise_topology(topology tree, int sample_type)
generates a random topology if sample_type==0, but can reuse some info later to create a "correlated"...
Definition: topology_randomise.c:52
void randomise_topology(topology tree)
low level function that generates a random tree (equiv. to random refinement of a star topology) ...
Definition: topology_randomise.c:22
bool cant_apply_swap(topology tree)
check if it is possible to apply SPR/NNI without rerooting (used by topology_apply_spr() and MCMC fun...
Definition: topology_randomise.c:471
Information of a node (binary tree).
Definition: topology_common.h:35
void topology_apply_shortspr_weighted(topology tree, double *prob, bool update_done)
recursive SPR over all internal nodes, using prob[] vector as rough guide of error rate for node ...
Definition: topology_randomise.c:163
void topology_apply_spr_on_subtree(topology tree, topol_node lca, bool update_done)
random Subtree Prune-and-Regraft branch swapping for subtree below lca node
Definition: topology_randomise.c:258
void topology_apply_nni(topology tree, bool update_done)
random Nearest Neighbor Interchange branch swapping (SPR where regraft node is close to prune node) ...
Definition: topology_randomise.c:409
Binary unrooted topology (rooted at leaf with ID zero)
Definition: topology_common.h:47
void topology_apply_rerooting(topology tree, bool update_done)
random rerooting
Definition: topology_randomise.c:120