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

#include <genesis/placement/placement_tree.hpp>

Inherits DefaultEdgeData.

Detailed Description

Data class for PlacementTreeEdges. Stores the branch length of the edge, and the edge_num, as defined in the jplace standard.

This class is derived from tree::DefaultEdgeData. See there for more information. Also, see PlacementTree for information on how and where this class is used.

Definition at line 139 of file placement_tree.hpp.

Public Member Functions

 PlacementEdgeData (PlacementEdgeData &&)=delete
 
virtual ~PlacementEdgeData ()=default
 
virtual std::unique_ptr
< BaseEdgeData
clone () const override
 Polymorphically copy an instance of this class. Use instead of copy constructor. More...
 
int edge_num () const
 Return the edge_num of this edge. This value is defined by the jplace standard. More...
 
PlacementEdgeDataoperator= (PlacementEdgeData &&)=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...
 
void reset_edge_num (int val)
 Force to set the edge_num to a certain value. 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
< PlacementEdgeData
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...
 

Protected Member Functions

 PlacementEdgeData ()=default
 
 PlacementEdgeData (PlacementEdgeData const &)=default
 
PlacementEdgeDataoperator= (PlacementEdgeData 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...
 

Additional Inherited Members

- Public Attributes inherited from DefaultEdgeData
double branch_length = 0.0
 Branch length of the edge. More...
 

Constructor & Destructor Documentation

virtual ~PlacementEdgeData ( )
virtualdefault
PlacementEdgeData ( )
protecteddefault
PlacementEdgeData ( PlacementEdgeData 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 173 of file placement_tree.hpp.

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

Definition at line 163 of file placement_tree.hpp.

int edge_num ( ) const

Return the edge_num of this edge. This value is defined by the jplace standard.

Definition at line 48 of file placement_tree.cpp.

PlacementEdgeData& operator= ( PlacementEdgeData &&  )
delete
PlacementEdgeData& operator= ( PlacementEdgeData 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 168 of file placement_tree.hpp.

void reset_edge_num ( int  val)

Force to set the edge_num to a certain value.

The edge_num is usually considered to be constant for the tree. It rarely needs to be set, except for when constructing the object. Use with care.

Definition at line 59 of file placement_tree.cpp.


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