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) :
12
AbstractParametrizable
(
""
)
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
}
PhyloBranchParam.h
PhyloBranch.h
bpp::AbstractParametrizable
bpp::AbstractParametrizable::addParameter_
virtual void addParameter_(Parameter *parameter)
bpp::NumConstants::SMALL
static double SMALL()
bpp::Parameter
bpp::Parameter::R_PLUS_STAR
static const std::shared_ptr< IntervalConstraint > R_PLUS_STAR
bpp::PhyloBranch
Definition:
PhyloBranch.h:21
bpp::PhyloBranch::hasLength
bool hasLength() const
Has the length been set?
Definition:
PhyloBranch.h:81
bpp::PhyloBranch::getLength
double getLength() const
What is the branch length?
Definition:
PhyloBranch.h:101
bpp
Defines the basic types of data flow nodes.
Bpp
Phyl
Tree
PhyloBranchParam.cpp
Generated on Fri Jul 19 2024 11:49:22 for bpp-phyl3 by
1.9.1