bpp-phyl3  3.0.0
bpp::PhyloBranchParam Class Reference

#include <Bpp/Phyl/Tree/PhyloBranchParam.h>

+ Inheritance diagram for bpp::PhyloBranchParam:
+ Collaboration diagram for bpp::PhyloBranchParam:

Public Member Functions

 PhyloBranchParam (const std::string &prefix="")
 Constructors. More...
 
 PhyloBranchParam (const PhyloBranch &branch)
 
 PhyloBranchParam (const PhyloBranchParam &branch)
 Copy constructor. More...
 
PhyloBranchParamoperator= (const PhyloBranchParam &branch)
 Assignation operator. More...
 
PhyloBranchParamclone () const
 
double getLength () const
 What is the branch length? More...
 
void setLength (double newLength)
 
bool hasParameter (const std::string &name) const override
 
const ParameterListgetParameters () const override
 
const Parameterparameter (const std::string &name) const override
 
const std::shared_ptr< Parameter > & getParameter (const std::string &name) const
 
double getParameterValue (const std::string &name) const override
 
void setAllParametersValues (const ParameterList &parameters) override
 
void setParameterValue (const std::string &name, double value) override
 
void setParametersValues (const ParameterList &parameters) override
 
bool matchParametersValues (const ParameterList &parameters) override
 
void removeConstraint (const std::string &name) override
 
void setConstraint (const std::string &name, std::shared_ptr< ConstraintInterface > constraint) override
 
size_t getNumberOfParameters () const override
 
void setNamespace (const std::string &prefix) override
 
std::string getNamespace () const override
 
std::string getParameterNameWithoutNamespace (const std::string &name) const override
 
virtual void fireParameterChanged (const ParameterList &parameters)
 

Protected Member Functions

const std::shared_ptr< Parameter > & getParameter (size_t i) const
 
std::shared_ptr< Parameter > & getParameter (size_t i)
 
virtual void addParameter_ (Parameter *parameter)
 
virtual void addParameters_ (const ParameterList &parameters)
 
virtual void shareParameter_ (const std::shared_ptr< Parameter > &parameter)
 
virtual void shareParameters_ (const ParameterList &parameters)
 
virtual void includeParameters_ (const ParameterList &parameters)
 
virtual void deleteParameter_ (size_t index)
 
virtual void deleteParameter_ (std::string &name)
 
virtual void deleteParameters_ (const std::vector< std::string > &names)
 
void resetParameters_ ()
 
ParametergetParameter_ (const std::string &name)
 
ParametergetParameter_ (size_t index)
 
const ParametergetParameter_ (size_t index) const
 
ParametergetParameterWithNamespace_ (const std::string &name)
 
const ParametergetParameterWithNamespace_ (const std::string &name) const
 
ParameterListgetParameters_ () override
 

Private Attributes

ParameterList parameters_
 
std::string prefix_
 

Friends

class ParametrizablePhyloTree
 

Detailed Description

Basic branch in which length is parameterized.

Note : Branch Length must be the first parameter (index 0).

Definition at line 23 of file PhyloBranchParam.h.

Constructor & Destructor Documentation

◆ PhyloBranchParam() [1/3]

bpp::PhyloBranchParam::PhyloBranchParam ( const std::string &  prefix = "")
inline

Constructors.

Warning
phyloTree_ does not know the edge exists.

Definition at line 34 of file PhyloBranchParam.h.

References bpp::AbstractParametrizable::addParameter_(), bpp::Parameter::R_PLUS_STAR, and bpp::NumConstants::SMALL().

Referenced by clone().

◆ PhyloBranchParam() [2/3]

◆ PhyloBranchParam() [3/3]

bpp::PhyloBranchParam::PhyloBranchParam ( const PhyloBranchParam branch)
inline

Copy constructor.

Parameters
branchThe branch to copy.

Definition at line 47 of file PhyloBranchParam.h.

Member Function Documentation

◆ clone()

PhyloBranchParam* bpp::PhyloBranchParam::clone ( ) const
inlinevirtual

Implements bpp::AbstractParametrizable.

Definition at line 69 of file PhyloBranchParam.h.

References PhyloBranchParam().

◆ getLength()

double bpp::PhyloBranchParam::getLength ( ) const
inline

What is the branch length?

Returns
a double representing the branch length, 0 if length is not defined.

Definition at line 78 of file PhyloBranchParam.h.

References bpp::AbstractParametrizable::getParameter_(), and bpp::Parameter::getValue().

◆ operator=()

PhyloBranchParam& bpp::PhyloBranchParam::operator= ( const PhyloBranchParam branch)
inline

Assignation operator.

Warning
This operator copies all fields, excepted father and son branch pointers. Without specific id, the PhyloTree does not know the existence of the new edge.
Parameters
branchthe branch to copy.
Returns
A reference toward this branch.

Definition at line 62 of file PhyloBranchParam.h.

◆ setLength()

void bpp::PhyloBranchParam::setLength ( double  newLength)
inline

Define a new branch length

Parameters
newLengtha double repserenting the new length of the branch

Definition at line 88 of file PhyloBranchParam.h.

References bpp::AbstractParametrizable::getParameter_(), and bpp::Parameter::setValue().

Friends And Related Function Documentation

◆ ParametrizablePhyloTree

friend class ParametrizablePhyloTree
friend

Definition at line 94 of file PhyloBranchParam.h.


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