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

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

Inherits DefaultEdgeData.

Detailed Description

Data class for MassTreeEdges. Stores the branch length and a list of masses with their positions along the edge.

See MassTree for more information.

Definition at line 148 of file tree/mass_tree/tree.hpp.

Public Member Functions

 MassTreeEdgeData (MassTreeEdgeData &&)=delete
 
virtual ~MassTreeEdgeData ()=default
 
virtual std::unique_ptr
< BaseEdgeData
clone () const override
 Polymorphically copy an instance of this class. Use instead of copy constructor. More...
 
MassTreeEdgeDataoperator= (MassTreeEdgeData &&)=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 DefaultEdgeData
 DefaultEdgeData (DefaultEdgeData &&)=delete
 
virtual ~DefaultEdgeData ()=default
 
DefaultEdgeDataoperator= (DefaultEdgeData &&)=delete
 
- 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
< MassTreeEdgeData
create ()
 
- Static Public Member Functions inherited from DefaultEdgeData
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

std::map< double, double > masses
 List of masses stored on this branch, sorted by their position on the branch. More...
 
- Public Attributes inherited from DefaultEdgeData
double branch_length = 0.0
 Branch length of the edge. More...
 

Protected Member Functions

 MassTreeEdgeData ()=default
 
 MassTreeEdgeData (MassTreeEdgeData const &)=default
 
MassTreeEdgeDataoperator= (MassTreeEdgeData const &)=default
 
- Protected Member Functions inherited from DefaultEdgeData
 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 ~MassTreeEdgeData ( )
virtualdefault
MassTreeEdgeData ( )
protecteddefault
MassTreeEdgeData ( MassTreeEdgeData 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 DefaultEdgeData.

Definition at line 182 of file tree/mass_tree/tree.hpp.

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

Definition at line 172 of file tree/mass_tree/tree.hpp.

MassTreeEdgeData& operator= ( MassTreeEdgeData &&  )
delete
MassTreeEdgeData& operator= ( MassTreeEdgeData 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 DefaultEdgeData.

Definition at line 177 of file tree/mass_tree/tree.hpp.

Member Data Documentation

std::map<double, double> masses

List of masses stored on this branch, sorted by their position on the branch.

This data member maps from a position on the branch to the mass at that position. In order to be valid, the positions have to be in the interval [0.0, branch_length]. See mass_tree_validate() for a validation function.

Definition at line 199 of file tree/mass_tree/tree.hpp.


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