A toolkit for working with phylogenetic data.
v0.18.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
DefaultEdgeData Class Reference

#include <genesis/tree/default/tree.hpp>

Inherits BaseEdgeData.

Inherited by PlacementEdgeData, AttributeTreeEdgeData, LayoutEdgeData, and MassTreeEdgeData.

Detailed Description

Default class containing the commonly needed data for tree edges.

This class is the equivalent of DefaultNodeData for the tree edges. It stores a branch length for each edge. For more information, see DefaultNodeData.

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/default/tree.hpp.

Public Member Functions

 DefaultEdgeData (DefaultEdgeData &&)=delete
 
virtual ~DefaultEdgeData ()=default
 
virtual std::unique_ptr
< BaseEdgeData
clone () const override
 Polymorphically copy an instance of this class. Use instead of copy constructor. More...
 
DefaultEdgeDataoperator= (DefaultEdgeData &&)=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...
 
BaseEdgeDataoperator= (BaseEdgeData &&)=delete
 Deleted move assignment. More...
 

Static Public Member Functions

static std::unique_ptr
< DefaultEdgeData
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

 DefaultEdgeData ()=default
 
 DefaultEdgeData (DefaultEdgeData const &)=default
 
DefaultEdgeDataoperator= (DefaultEdgeData 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...
 
BaseEdgeDataoperator= (BaseEdgeData const &)=default
 Protected copy assignment. Not used right now. More...
 

Constructor & Destructor Documentation

virtual ~DefaultEdgeData ( )
virtualdefault
DefaultEdgeData ( )
protecteddefault
DefaultEdgeData ( DefaultEdgeData const &  )
protecteddefault

Member Function Documentation

virtual std::unique_ptr< BaseEdgeData > clone ( ) const
inlineoverridevirtual

Polymorphically copy an instance of this class. Use instead of copy constructor.

Reimplemented from BaseEdgeData.

Reimplemented in AttributeTreeEdgeData, MassTreeEdgeData, PlacementEdgeData, LayoutEdgeData, CircularEdgeData, and RectangularEdgeData.

Definition at line 178 of file tree/default/tree.hpp.

static std::unique_ptr< DefaultEdgeData > create ( )
inlinestatic

Definition at line 168 of file tree/default/tree.hpp.

DefaultEdgeData& operator= ( DefaultEdgeData &&  )
delete
DefaultEdgeData& operator= ( DefaultEdgeData const &  )
protecteddefault
virtual std::unique_ptr< BaseEdgeData > recreate ( ) const
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 AttributeTreeEdgeData, MassTreeEdgeData, PlacementEdgeData, LayoutEdgeData, CircularEdgeData, and RectangularEdgeData.

Definition at line 173 of file tree/default/tree.hpp.

Member Data Documentation

double branch_length = 0.0

Branch length of the edge.

Defaults 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/default/tree.hpp.


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