bpp-phyl3  3.0.0
PhyloBranchParam.cpp
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: The Bio++ Development Group
2 //
3 // SPDX-License-Identifier: CECILL-2.1
4 
5 #include "PhyloBranch.h"
6 #include "PhyloBranchParam.h"
7 
8 using namespace std;
9 using namespace bpp;
10 
11 PhyloBranchParam::PhyloBranchParam(const PhyloBranch& branch) :
13 {
14  double brLen = NumConstants::SMALL();
15  if (branch.hasLength() && branch.getLength() >= NumConstants::SMALL())
16  brLen = branch.getLength();
17  addParameter_(new Parameter("BrLen", brLen, Parameter::R_PLUS_STAR));
18 }
virtual void addParameter_(Parameter *parameter)
static double SMALL()
static const std::shared_ptr< IntervalConstraint > R_PLUS_STAR
bool hasLength() const
Has the length been set?
Definition: PhyloBranch.h:81
double getLength() const
What is the branch length?
Definition: PhyloBranch.h:101
Defines the basic types of data flow nodes.