61 double min_bl = std::numeric_limits<double>::max();
62 double max_bl = std::numeric_limits<double>::lowest();
68 for(
auto const& edge : tree.
edges() ) {
72 assert( min_bl <= max_bl );
73 double dist = max_bl - min_bl;
81 for(
auto const& edge : tree.
edges() ) {
82 double val = ( edge.data<
CommonEdgeData>().branch_length - min_bl) / dist;
std::vector< utils::Color > edge_color_branch_length_gradient(Tree const &tree, bool zero_based)
size_t edge_count() const
Return the number of TreeEdges of the Tree.
Container namespace for all symbols of genesis in order to keep them separate when used as a library...
Class for representing phylogenetic trees.
utils::Range< IteratorEdges > edges()
Color heat_gradient(double percentage)
Return a Color that represents a heat gradient for a given percentage value.
double branch_length
Branch length of the edge.
Common class containing the commonly needed data for tree edges.