|
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_TREE_H_
2 #define GENESIS_TREE_MASS_TREE_TREE_H_
121 static std::unique_ptr< MassTreeNodeData >
create()
126 virtual std::unique_ptr< BaseNodeData >
recreate()
const override
131 virtual std::unique_ptr< BaseNodeData >
clone()
const override
172 static std::unique_ptr< MassTreeEdgeData >
create()
177 virtual std::unique_ptr< BaseEdgeData >
recreate()
const override
182 virtual std::unique_ptr< BaseEdgeData >
clone()
const override
219 auto const& orig_node =
dynamic_cast< CommonNodeData const&
>( node_data );
220 mass_node->
name = orig_node.name;
226 auto const& orig_edge =
dynamic_cast< CommonEdgeData const&
>( edge_data );
237 #endif // include guard
virtual std::unique_ptr< BaseNodeData > recreate() const override
Polymorphically create a default-constructed instance of this class with the same derived type as it ...
Tree convert(Tree const &source, std::function< std::unique_ptr< BaseNodeData >(BaseNodeData const &node_data)> node_data_converter, std::function< std::unique_ptr< BaseEdgeData >(BaseEdgeData const &edge_data)> edge_data_converter)
Create a tree with the same topology as the source tree, while converting its data.
std::map< double, double > masses
List of masses stored on this branch, sorted by their position on the branch.
static std::unique_ptr< MassTreeNodeData > create()
virtual std::unique_ptr< BaseEdgeData > recreate() const override
Polymorphically create a default-constructed instance of this class with the same derived type as it ...
Data class for MassTreeEdges. Stores the branch length and a list of masses with their positions alon...
Tree MassTree
Alias for a Tree that stores masses on its TreeEdges.
Base class for storing data on Edges of a Tree.
Data class for MassTreeNodes. Stores taxon names.
MassTreeEdgeData & operator=(MassTreeEdgeData &&)=delete
Class for representing phylogenetic trees.
double branch_length
Branch length of the edge.
virtual std::unique_ptr< BaseNodeData > clone() const override
Polymorphically copy an instance of this class. Use instead of copy constructor.
std::string name
Name of the node.
static std::unique_ptr< MassTreeEdgeData > create()
Container namespace for all symbols of genesis in order to keep them separate when used as a library.
Base class for storing data on Nodes of a Tree.
virtual std::unique_ptr< BaseEdgeData > clone() const override
Polymorphically copy an instance of this class. Use instead of copy constructor.
virtual ~MassTreeNodeData() override=default
MassTree convert_common_tree_to_mass_tree(CommonTree const &source)
Helper function that takes a CommonTree (or any Tree with Node and Edge data derived from it) and tur...
MassTreeNodeData & operator=(MassTreeNodeData &&)=delete
MassTreeEdgeData()=default
Common class containing the commonly needed data for tree edges.
Common class containing the commonly needed data for tree nodes.
virtual ~MassTreeEdgeData() override=default
MassTreeNodeData()=default