bpp-phyl3  3.0.0
PhyloBranchParam.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: The Bio++ Development Group
2 //
3 // SPDX-License-Identifier: CECILL-2.1
4 
5 #ifndef BPP_PHYL_TREE_PHYLOBRANCHPARAM_H
6 #define BPP_PHYL_TREE_PHYLOBRANCHPARAM_H
7 
10 
11 
12 namespace bpp
13 {
14 class PhyloBranch;
15 
25 {
26 public:
34  PhyloBranchParam(const std::string& prefix = "") :
36  {
38  }
39 
40  PhyloBranchParam(const PhyloBranch& branch);
41 
49  {}
50 
51 
63  {
64  AbstractParametrizable::operator=(* this);
65  return *this;
66  }
67 
68 
69  PhyloBranchParam* clone() const { return new PhyloBranchParam(*this); }
70 
71 
78  double getLength() const
79  {
80  return getParameter_(0).getValue();
81  }
82 
83 
88  void setLength(double newLength)
89  {
90  getParameter_(0).setValue(newLength);
91  }
92 
93 
95 }; // end of class PhyloBranchParam
96 } // end of namespace bpp.
97 #endif // BPP_PHYL_TREE_PHYLOBRANCHPARAM_H
virtual void addParameter_(Parameter *parameter)
Parameter & getParameter_(const std::string &name)
static double SMALL()
virtual void setValue(double value)
virtual double getValue() const
static const std::shared_ptr< IntervalConstraint > R_PLUS_STAR
PhyloTree with Parametrizable Phylo Branches. They SHARE their branch length parameters.
PhyloBranchParam & operator=(const PhyloBranchParam &branch)
Assignation operator.
PhyloBranchParam(const std::string &prefix="")
Constructors.
PhyloBranchParam(const PhyloBranchParam &branch)
Copy constructor.
double getLength() const
What is the branch length?
void setLength(double newLength)
PhyloBranchParam * clone() const
Defines the basic types of data flow nodes.