A library for working with phylogenetic and population genetic data.
v0.27.0
SquashClustering::Cluster Struct Reference

#include <genesis/tree/mass_tree/squash_clustering.hpp>

Detailed Description

Definition at line 62 of file squash_clustering.hpp.

Public Attributes

bool active
 Is this cluster active, i.e., is it not yet part of a larger cluster? More...
 
size_t count
 How many end points (Samples) does this cluster represent? More...
 
std::vector< double > distances
 Distances from this cluster to all clusters with a lower index in the clusters vector. More...
 
MassTree tree
 The MassTree that this cluster represents. More...
 

Member Data Documentation

◆ active

bool active

Is this cluster active, i.e., is it not yet part of a larger cluster?

Only active clusters are considered for merging.

Definition at line 85 of file squash_clustering.hpp.

◆ count

size_t count

How many end points (Samples) does this cluster represent?

We need this information for calculating the weighted average of the Sample masses when merging two clusters.

Definition at line 78 of file squash_clustering.hpp.

◆ distances

std::vector<double> distances

Distances from this cluster to all clusters with a lower index in the clusters vector.

We don't store the distances in a global distance matix, but in a vector for each cluster instead, as this makes it trivial to keep track of the data when merging clusters. No need to keep track of which row belongs to which cluster etc.

Definition at line 95 of file squash_clustering.hpp.

◆ tree

MassTree tree

The MassTree that this cluster represents.

In the beginning of the algorithm, those are simply the MassTrees of the Samples. Those are then successively merged to form bigger clusters.

Definition at line 70 of file squash_clustering.hpp.


The documentation for this struct was generated from the following file: