A library for working with phylogenetic and population genetic data.
v0.27.0
PlacementEdgeData Class Reference

#include <genesis/placement/placement_tree.hpp>

Inherits CommonEdgeData.

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::CommonEdgeData. 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 () override=default
 
virtual std::unique_ptr< BaseEdgeDataclone () const override
 Polymorphically copy an instance of this class. Use instead of copy constructor. More...
 
EdgeNumType 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< BaseEdgeDatarecreate () 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 (EdgeNumType val)
 Force to set the edge_num to a certain value. More...
 
- Public Member Functions inherited from CommonEdgeData
 CommonEdgeData (CommonEdgeData &&)=delete
 
virtual ~CommonEdgeData () override=default
 
CommonEdgeDataoperator= (CommonEdgeData &&)=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< PlacementEdgeDatacreate ()
 
- Static Public Member Functions inherited from CommonEdgeData
static std::unique_ptr< CommonEdgeDatacreate ()
 
- Static Public Member Functions inherited from BaseEdgeData
static std::unique_ptr< BaseEdgeDatacreate ()
 Create a new instance of this class. Use instead of default constructor. More...
 

Public Types

using EdgeNumType = int
 Data type used for the edge_num() property of the edges in a PlacementTree. More...
 

Protected Member Functions

 PlacementEdgeData ()=default
 
 PlacementEdgeData (PlacementEdgeData const &)=default
 
PlacementEdgeDataoperator= (PlacementEdgeData const &)=default
 
- Protected Member Functions inherited from CommonEdgeData
 CommonEdgeData ()=default
 
 CommonEdgeData (CommonEdgeData const &)=default
 
CommonEdgeDataoperator= (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...
 
BaseEdgeDataoperator= (BaseEdgeData const &)=default
 Protected copy assignment. Not used right now. More...
 

Additional Inherited Members

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

Constructor & Destructor Documentation

◆ ~PlacementEdgeData()

virtual ~PlacementEdgeData ( )
overridevirtualdefault

◆ PlacementEdgeData() [1/3]

◆ PlacementEdgeData() [2/3]

PlacementEdgeData ( )
protecteddefault

◆ PlacementEdgeData() [3/3]

PlacementEdgeData ( PlacementEdgeData const &  )
protecteddefault

Member Function Documentation

◆ clone()

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

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

Reimplemented from CommonEdgeData.

Definition at line 182 of file placement_tree.hpp.

◆ create()

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

Definition at line 172 of file placement_tree.hpp.

◆ edge_num()

EdgeNumType edge_num ( ) const
inline

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

Definition at line 194 of file placement_tree.hpp.

◆ operator=() [1/2]

PlacementEdgeData& operator= ( PlacementEdgeData &&  )
delete

◆ operator=() [2/2]

PlacementEdgeData& operator= ( PlacementEdgeData const &  )
protecteddefault

◆ recreate()

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 CommonEdgeData.

Definition at line 177 of file placement_tree.hpp.

◆ reset_edge_num()

void reset_edge_num ( EdgeNumType  val)
inline

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 205 of file placement_tree.hpp.

Member Typedef Documentation

◆ EdgeNumType

using EdgeNumType = int

Data type used for the edge_num() property of the edges in a PlacementTree.

Definition at line 150 of file placement_tree.hpp.


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