21 #ifndef _biomcmc_topology_space_h_ 22 #define _biomcmc_topology_space_h_ 32 int ntrees, ndistinct;
51 void merge_topology_spaces (topology_space ts1, topology_space ts2,
double weight_ts1,
bool use_root_location);
52 void sort_topology_space_by_frequency(topology_space tsp,
double *external_freqs) ;
char * filename
If trees are unrooted, then branch lengths must be accounted for in some comparisons.
Definition: topology_space.h:38
topology_space read_topology_space_from_file_with_burnin_thin(char *seqfilename, hashtable external_taxhash, int burnin, int thin, bool use_root_location)
lower level function where we can specify burnin and thinning factor, in iterations ...
Definition: topology_space.c:139
Hash table (vector indexed by strings).
Definition: hashtable.h:42
Reads a list of trees in newick format and creates vector of topologies.
double * freq
Vector of trees originally in nexus file and compacted.
Definition: topology_space.h:34
topology_space new_topology_space(void)
Allocates memory for topology_space_struct (set of trees present in nexus file).
Definition: topology_space.c:357
vector of strings (char vectors) of variable length
Definition: char_vector.h:27
bool is_rooted
Lookup table with taxon names.
Definition: topology_space.h:37
void merge_topology_spaces(topology_space ts1, topology_space ts2, double weight_ts1, bool use_root_location)
merge trees from two topology_space objects, assuming names hashtable is the same ...
Definition: topology_space.c:232
void add_topology_to_topology_space_if_distinct(topology topol, topology_space tsp, double tree_weight, bool use_root_location)
Add topology to topology_space only if unrooted version is distinct, updating freqs, trees[] etc. Aux for python module.
Definition: topology_space.c:518
void add_string_with_size_to_topology_space(topology_space *tsp_address, char *long_string, size_t string_size, bool use_root_location)
Read tree in newick format until char string_size, returning updated topolgy_space. Auxiliary for python module.
Definition: topology_space.c:80
topology * tree
Number of trees originally in nexus file and compacted (only distinct topologies).
Definition: topology_space.h:33
int estimate_treesize_from_file(char *seqfilename)
Quickly counts the number of leaves in a tree file, without storing any info. Assumes file and trees ...
Definition: topology_space.c:332
Collection of topologies from tree file. When topologies have no branch lengths we store only unique ...
Definition: topology_space.h:30
void del_topology_space(topology_space tsp)
Free memory from topology_space_struct.
Definition: topology_space.c:379
void save_topology_space_to_trprobs_file(topology_space tsp, char *filename, double credible)
Save topology_space to a file, in format nexus w/ trprobs, up to "credible" cummul frequency...
Definition: topology_space.c:292
topology_space read_topology_space_from_file(char *seqfilename, hashtable external_taxhash, bool use_root_location)
Read tree file and store info in topology_space_struct with possible external hashtable to impose the...
Definition: topology_space.c:133
hashtable taxlabel_hash
Taxon names.
Definition: topology_space.h:36
char_vector taxlabel
frequency of each distinct topology (add up to one)
Definition: topology_space.h:35
Binary unrooted topology (rooted at leaf with ID zero)
Definition: topology_common.h:47