#include <genesis/tree/common_tree/tree.hpp>
Inherits BaseEdgeData.
Inherited by PlacementEdgeData, AttributeTreeEdgeData, LayoutEdgeData, MassTreeEdgeData, and SimpleNewickEdgeData.
Common class containing the commonly needed data for tree edges.
This class is the equivalent of CommonNodeData for the tree edges. It stores a branch length for each edge. For more information, see CommonNodeData.
If you for example do not need a single branch length, but multiple ones (e.g., when working with partitions), simply do not derive from this class, but provide your own implementation.
Definition at line 144 of file tree/common_tree/tree.hpp.
Public Member Functions | |
CommonEdgeData (CommonEdgeData &&)=delete | |
virtual | ~CommonEdgeData () override=default |
virtual std::unique_ptr< BaseEdgeData > | clone () const override |
Polymorphically copy an instance of this class. Use instead of copy constructor. More... | |
CommonEdgeData & | operator= (CommonEdgeData &&)=delete |
virtual std::unique_ptr< BaseEdgeData > | recreate () const override |
Polymorphically create a default-constructed instance of this class with the same derived type as it was called on. More... | |
Public Member Functions inherited from BaseEdgeData | |
BaseEdgeData (BaseEdgeData &&)=delete | |
Deleted move constructor. More... | |
virtual | ~BaseEdgeData ()=default |
Virtual destructor. Needed for polymorphism. More... | |
BaseEdgeData & | operator= (BaseEdgeData &&)=delete |
Deleted move assignment. More... | |
Static Public Member Functions | |
static std::unique_ptr< CommonEdgeData > | create () |
Static Public Member Functions inherited from BaseEdgeData | |
static std::unique_ptr< BaseEdgeData > | create () |
Create a new instance of this class. Use instead of default constructor. More... | |
Public Attributes | |
double | branch_length = 0.0 |
Branch length of the edge. More... | |
Protected Member Functions | |
CommonEdgeData ()=default | |
CommonEdgeData (CommonEdgeData const &)=default | |
CommonEdgeData & | operator= (CommonEdgeData const &)=default |
Protected Member Functions inherited from BaseEdgeData | |
BaseEdgeData ()=default | |
Protected default constructor. Called from the create() function. More... | |
BaseEdgeData (BaseEdgeData const &)=default | |
Protected copy constructor. Called from the clone() function. More... | |
BaseEdgeData & | operator= (BaseEdgeData const &)=default |
Protected copy assignment. Not used right now. More... | |
|
overridevirtualdefault |
|
delete |
|
protecteddefault |
|
protecteddefault |
|
inlineoverridevirtual |
Polymorphically copy an instance of this class. Use instead of copy constructor.
Reimplemented from BaseEdgeData.
Reimplemented in LayoutEdgeData, SimpleNewickEdgeData, AttributeTreeEdgeData, PlacementEdgeData, and MassTreeEdgeData.
Definition at line 178 of file tree/common_tree/tree.hpp.
|
inlinestatic |
Definition at line 168 of file tree/common_tree/tree.hpp.
|
delete |
|
protecteddefault |
|
inlineoverridevirtual |
Polymorphically create a default-constructed instance of this class with the same derived type as it was called on.
Reimplemented from BaseEdgeData.
Reimplemented in LayoutEdgeData, SimpleNewickEdgeData, AttributeTreeEdgeData, PlacementEdgeData, and MassTreeEdgeData.
Definition at line 173 of file tree/common_tree/tree.hpp.
double branch_length = 0.0 |
Branch length of the edge.
Initialized to 0.0. This allows to add default-created edges to the Tree without changing any metrics related to the branch length.
Definition at line 193 of file tree/common_tree/tree.hpp.