|
A library for working with phylogenetic and population genetic data.
v0.32.0
|
|
Go to the documentation of this file. 1 #ifndef GENESIS_TREE_MASS_TREE_SQUASH_CLUSTERING_H_
2 #define GENESIS_TREE_MASS_TREE_SQUASH_CLUSTERING_H_
147 void run( std::vector<MassTree>&& trees );
199 void init_( std::vector<MassTree>&& trees );
200 std::pair<size_t, size_t> min_entry_()
const;
201 void merge_clusters_(
size_t i,
size_t j );
211 std::vector<Cluster> clusters_;
212 std::vector<Merger> mergers_;
218 #endif // include guard
void clear()
Clear the clusters() and mergers() data.
SquashClustering & operator=(SquashClustering const &)=default
std::function< void(MassTree const &cluster_tree, size_t index)> write_cluster_tree
std::vector< Cluster > const & clusters() const
bool active
Is this cluster active, i.e., is it not yet part of a larger cluster?
SquashClustering()=default
std::function< void(size_t i, size_t total)> report_step
std::string tree_string(std::vector< std::string > const &labels) const
Build a Newick-format tree for visualizing the result of a squash_clustering().
double distance_a
Distance of the first data point to the cluster node.
void run(std::vector< MassTree > &&trees)
Perfom Squash Clustering.
Class for representing phylogenetic trees.
MassTree tree
The MassTree that this cluster represents.
std::vector< Merger > const & mergers() const
~SquashClustering()=default
std::unordered_set< std::string > labels(SequenceSet const &set)
Return a set of all labels of the SequenceSet.
std::vector< double > distances
Distances from this cluster to all clusters with a lower index in the clusters vector.
Container namespace for all symbols of genesis in order to keep them separate when used as a library.
size_t index_b
Index of the second data point in the cluster.
double distance_b
Distance of the second data point to the cluster node.
Perform Squash Clustering.
size_t index_a
Index of the first data point in the cluster.
std::function< void(void)> report_initialization
size_t count
How many end points (Samples) does this cluster represent?
SquashClustering & p(double value)