bpp-core3  3.0.0
bpp::ParameterList Class Reference

The parameter list object. More...

#include <Bpp/Numeric/ParameterList.h>

+ Inheritance diagram for bpp::ParameterList:
+ Collaboration diagram for bpp::ParameterList:

Public Member Functions

 ParameterList ()
 Build a new ParameterList object. More...
 
 ParameterList (const ParameterList &pl)
 Copy constructor. More...
 
ParameterListoperator= (const ParameterList &pl)
 
ParameterListclone () const
 Create a copy of this object and send a pointer to it. More...
 
virtual ~ParameterList ()
 
size_t size () const
 
virtual const Parameteroperator[] (size_t i) const
 
virtual Parameteroperator[] (size_t i)
 
virtual const std::shared_ptr< Parameter > & getParameter (size_t i) const
 
virtual std::shared_ptr< Parameter > & getParameter (size_t i)
 
virtual const Parameterparameter (const std::string &name) const
 Get the parameter with name name. More...
 
virtual const std::shared_ptr< Parameter > & getParameter (const std::string &name) const
 Get the parameter with name name as a shared pointer. More...
 
virtual double getParameterValue (const std::string &name) const
 Get the value of the parameter with name name. More...
 
virtual Parameterparameter (const std::string &name)
 Get the parameter with name name. More...
 
virtual std::shared_ptr< Parameter > & getParameter (const std::string &name)
 Get the parameter with name name as a shared pointer. More...
 
virtual ParameterList createSubList (const std::vector< std::string > &names) const
 Get given parameters as a sublist. More...
 
virtual ParameterList shareSubList (const std::vector< std::string > &names) const
 Share given parameters as a sublist. More...
 
virtual ParameterList createSubList (const std::string &name) const
 Get given parameter as a sublist. More...
 
virtual ParameterList createSubList (const std::vector< size_t > &parameters) const
 Get given parameters as a sublist. More...
 
virtual ParameterList shareSubList (const std::vector< size_t > &parameters) const
 Share given parameters in a sublist. More...
 
virtual ParameterList createSubList (size_t parameter) const
 Get given parameter as a sublist. More...
 
virtual ParameterList getCommonParametersWith (const ParameterList &params) const
 Get the sublist containing all common parameter between this list and pl. More...
 
virtual std::vector< std::string > getParameterNames () const
 Get all parameter names in the list. More...
 
virtual std::vector< std::string > getMatchingParameterNames (const std::string &pattern) const
 Get all parameter names matching with the given name. Up to now, only "*" jokers are available. More...
 
virtual void addParameter (const Parameter &param)
 Add a new parameter at the end of the list. More...
 
virtual void addParameter (Parameter *param)
 Add a new parameter at the end of the list. More...
 
virtual void shareParameter (const std::shared_ptr< Parameter > &param)
 Share a parameter at the end of the list. More...
 
virtual void setParameter (size_t index, const Parameter &param)
 Change given parameter. More...
 
virtual void addParameters (const ParameterList &params)
 Add new parameters at the end of the list. More...
 
virtual void shareParameters (const ParameterList &params)
 Share parameters with a given list. They are added the end of this list. More...
 
virtual void includeParameters (const ParameterList &params)
 Add parameters to the list. If the parameter already exists, only the value is updated, otherwise the new parameter is added at the end of the list. More...
 
virtual void setParameterValue (const std::string &name, double value)
 Set the value of parameter with name name to be equal to value. More...
 
virtual void setAllParametersValues (const ParameterList &params)
 Set the parameters to be equals to params. More...
 
virtual void setParametersValues (const ParameterList &params)
 Update the parameters from the ones in params that have matching names. More...
 
A string name

Returns true if the Parameter of the given name exists.

virtual bool hasParameter (const std::string &name) const
 
virtual bool testParametersValues (const ParameterList &params) const
 Tests the parameters from params. More...
 
virtual bool matchParametersValues (const ParameterList &params, std::vector< size_t > *updatedParameters=0)
 Update the parameters from params. More...
 
virtual void setAllParameters (const ParameterList &params)
 Set the parameters to be equals to params. More...
 
virtual void setParameters (const ParameterList &params)
 Update the parameters from params. More...
 
virtual void matchParameters (const ParameterList &params)
 Update the parameters from params. More...
 
virtual void deleteParameter (const std::string &name)
 Delete a parameter from the list. More...
 
virtual void deleteParameters (const std::vector< std::string > &names, bool mustExist=true)
 Delete several parameters from the list. More...
 
virtual void deleteParameter (size_t index)
 Delete a parameter from the list. More...
 
virtual void deleteParameters (const std::vector< size_t > &indices)
 Delete several parameters from the list. More...
 
virtual size_t whichParameterHasName (const std::string &name) const
 Get the position of a given parameter according to its name. More...
 
virtual void printParameters (OutputStream &out) const
 Print all parameters. More...
 
virtual void printParameters (std::ostream &out) const
 
virtual void reset ()
 Reset the list: delete all parameters. More...
 

Private Attributes

std::vector< std::shared_ptr< Parameter > > parameters_
 

Detailed Description

The parameter list object.

Author
Julien Dutheil, Laurent Gueguen This is a vector of Parameter with a few additional methods, mainly for giving name access.

Definition at line 27 of file ParameterList.h.

Constructor & Destructor Documentation

◆ ParameterList() [1/2]

bpp::ParameterList::ParameterList ( )
inline

Build a new ParameterList object.

Definition at line 37 of file ParameterList.h.

References operator=().

Referenced by clone().

◆ ParameterList() [2/2]

ParameterList::ParameterList ( const ParameterList pl)

Copy constructor.

All parameters in the list will be cloned.

Copy constructor:

Definition at line 16 of file ParameterList.cpp.

References parameters_, and size().

◆ ~ParameterList()

ParameterList::~ParameterList ( )
virtual

Destructor:

Definition at line 44 of file ParameterList.cpp.

References reset().

Referenced by clone().

Member Function Documentation

◆ addParameter() [1/2]

◆ addParameter() [2/2]

void ParameterList::addParameter ( Parameter param)
virtual

Add a new parameter at the end of the list.

This function is more efficient than its reference counterpart, as it avoid an object copy. The ParameterList will own the pointer after addition, if it is successful.

Parameters
paramA pointer toward the parameter to add to the list.

Definition at line 265 of file ParameterList.cpp.

References bpp::Parameter::getName(), hasParameter(), and parameters_.

◆ addParameters()

void ParameterList::addParameters ( const ParameterList params)
virtual

Add new parameters at the end of the list.

Parameters
paramsThe parameter list containing the new parameters to add to the list.

Definition at line 308 of file ParameterList.cpp.

References addParameter(), and size().

Referenced by bpp::AbstractParametrizable::addParameters_(), and getParameter().

◆ clone()

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

Create a copy of this object and send a pointer to it.

Returns
A pointer toward the copy object.

Implements bpp::Clonable.

Definition at line 48 of file ParameterList.h.

References ParameterList(), and ~ParameterList().

Referenced by bpp::AbstractParameterAliasable::aliasParameters(), createSubList(), includeParameters(), and bpp::FullHmmTransitionMatrix::setTransitionProbabilities().

◆ createSubList() [1/4]

ParameterList ParameterList::createSubList ( const std::vector< std::string > &  names) const
virtual

Get given parameters as a sublist.

Parameters
namesName of the parameters to be included in the list.
Returns
A list with all parameters specified.
Exceptions
ParameterNotFoundExceptionIf at least one name does not correspond to a parameter in the list.

Definition at line 119 of file ParameterList.cpp.

References addParameter(), and parameter().

Referenced by bpp::FunctionTools::computeGrid(), getParameter(), bpp::ReparametrizationFunctionWrapper::setParameters(), bpp::AbstractParametrizable::setParameterValue(), bpp::TwoPointsNumericalDerivative::updateDerivatives(), bpp::FivePointsNumericalDerivative::updateDerivatives(), bpp::ThreePointsNumericalDerivative::updateDerivatives(), and bpp::BppOParametrizableFormat::write().

◆ createSubList() [2/4]

ParameterList ParameterList::createSubList ( const std::string &  name) const
virtual

Get given parameter as a sublist.

Parameters
nameName of the parameter to be included in the list.
Returns
A list with the parameter specified.
Exceptions
ParameterNotFoundExceptionIf no parameter with the given name is found.

Definition at line 145 of file ParameterList.cpp.

References addParameter(), and parameter().

◆ createSubList() [3/4]

ParameterList ParameterList::createSubList ( const std::vector< size_t > &  parameters) const
virtual

Get given parameters as a sublist.

Parameters
parametersPositions of the parameters to be included in the list.
Returns
A list with all parameters specified.

Definition at line 155 of file ParameterList.cpp.

References clone(), parameters_, and size().

◆ createSubList() [4/4]

ParameterList ParameterList::createSubList ( size_t  parameter) const
virtual

Get given parameter as a sublist.

Parameters
parameterPosition of the parameters to be included in the list.
Returns
A list with the parameter specified.

Definition at line 182 of file ParameterList.cpp.

References clone(), parameters_, and size().

◆ deleteParameter() [1/2]

void ParameterList::deleteParameter ( const std::string &  name)
virtual

Delete a parameter from the list.

Parameters
nameThe name of the parameter to delete from the list.

Definition at line 495 of file ParameterList.cpp.

References parameters_.

Referenced by bpp::AbstractParameterAliasable::aliasParameters(), bpp::AbstractParametrizable::deleteParameter_(), bpp::AbstractParameterAliasable::deleteParameter_(), deleteParameters(), and getParameter().

◆ deleteParameter() [2/2]

void ParameterList::deleteParameter ( size_t  index)
virtual

Delete a parameter from the list.

Parameters
indexThe position of the parameter to delete in the list.

Definition at line 528 of file ParameterList.cpp.

References parameters_, and size().

◆ deleteParameters() [1/2]

void ParameterList::deleteParameters ( const std::vector< std::string > &  names,
bool  mustExist = true 
)
virtual

Delete several parameters from the list.

Parameters
namesThe names of the parameters to delete from the list.
mustExistIf true, an exception is thrown if a name does not match an extant parameter.

Definition at line 509 of file ParameterList.cpp.

References deleteParameter().

Referenced by bpp::AbstractParametrizable::deleteParameters_(), and getParameter().

◆ deleteParameters() [2/2]

void ParameterList::deleteParameters ( const std::vector< size_t > &  indices)
virtual

Delete several parameters from the list.

Parameters
indicesThe positions of the parameters to delete in the list. Duplicated positions will be considered only one time.

Definition at line 536 of file ParameterList.cpp.

References parameters_, and size().

◆ getCommonParametersWith()

ParameterList ParameterList::getCommonParametersWith ( const ParameterList params) const
virtual

Get the sublist containing all common parameter between this list and pl.

Parameters
paramsThe list to compare to.
Returns
A list with all common parameters.

Definition at line 192 of file ParameterList.cpp.

References bpp::Parameter::clone(), bpp::Parameter::getName(), hasParameter(), parameters_, and size().

Referenced by getParameter().

◆ getMatchingParameterNames()

vector< string > ParameterList::getMatchingParameterNames ( const std::string &  pattern) const
virtual

Get all parameter names matching with the given name. Up to now, only "*" jokers are available.

Parameters
patterna pattern of name
Returns
A vector of matching names

Definition at line 220 of file ParameterList.cpp.

References bpp::StringTokenizer::hasMoreToken(), bpp::StringTokenizer::nextToken(), parameters_, and size().

Referenced by getParameter().

◆ getParameter() [1/4]

virtual const std::shared_ptr<Parameter>& bpp::ParameterList::getParameter ( size_t  i) const
inlinevirtual
Returns
The shared_ptr parameter at a given position.
Warning
No check is performed on the validity of the index given as input!

Definition at line 69 of file ParameterList.h.

Referenced by bpp::AbstractParametrizable::getParameter(), getParameter(), shareParameters(), and shareSubList().

◆ getParameter() [2/4]

◆ getParameter() [3/4]

const shared_ptr< Parameter > & ParameterList::getParameter ( const std::string &  name) const
virtual

Get the parameter with name name as a shared pointer.

Parameters
nameThe name of the parameter to look for.
Returns
A const shared parameter toward the parameter with name name.
Exceptions
ParameterNotFoundExceptionIf no parameter with the given name is found.

Definition at line 65 of file ParameterList.cpp.

References parameters_, and size().

◆ getParameter() [4/4]

shared_ptr< Parameter > & ParameterList::getParameter ( const std::string &  name)
virtual

Get the parameter with name name as a shared pointer.

Parameters
nameThe name of the parameter to look for.
Returns
A shared parameter toward the parameter with name name.
Exceptions
ParameterNotFoundExceptionIf no parameter with the given name is found.

Definition at line 105 of file ParameterList.cpp.

References parameters_, and size().

◆ getParameterNames()

std::vector< std::string > ParameterList::getParameterNames ( ) const
virtual

Get all parameter names in the list.

Returns
A vector with all names in the same order as the parameters in the list.

Definition at line 208 of file ParameterList.cpp.

References parameters_, and size().

Referenced by bpp::NumTools::computeHessianMatrix(), getParameter(), bpp::BppODiscreteDistributionFormat::readDiscreteDistribution(), bpp::ReparametrizationFunctionWrapper::setParameters(), and bpp::BppODiscreteDistributionFormat::writeDiscreteDistribution().

◆ getParameterValue()

double ParameterList::getParameterValue ( const std::string &  name) const
virtual

Get the value of the parameter with name name.

Parameters
nameThe name of the parameter to look for.
Returns
A value of the parameter with name name.
Exceptions
ParameterNotFoundExceptionIf no parameter with the given name is found.

Definition at line 79 of file ParameterList.cpp.

References bpp::Parameter::getName(), bpp::Parameter::getValue(), parameters_, and size().

Referenced by getParameter(), bpp::AbstractOptimizer::getParameterValue(), bpp::TwoPointsNumericalDerivative::updateDerivatives(), bpp::FivePointsNumericalDerivative::updateDerivatives(), and bpp::ThreePointsNumericalDerivative::updateDerivatives().

◆ hasParameter()

◆ includeParameters()

void ParameterList::includeParameters ( const ParameterList params)
virtual

Add parameters to the list. If the parameter already exists, only the value is updated, otherwise the new parameter is added at the end of the list.

Parameters
paramsThe parameter list containing the new paramters to add to the list.

Definition at line 295 of file ParameterList.cpp.

References clone(), hasParameter(), parameters_, setParameterValue(), and size().

Referenced by getParameter(), and bpp::AbstractParametrizable::includeParameters_().

◆ matchParameters()

void ParameterList::matchParameters ( const ParameterList params)
virtual

Update the parameters from params.

Only common parameters with params will be updated.

Parameters
paramsA list of parameters.
See also
setParameters(), setAllParameters()

Definition at line 482 of file ParameterList.cpp.

References hasParameter(), parameter(), and parameters_.

Referenced by getParameter().

◆ matchParametersValues()

bool ParameterList::matchParametersValues ( const ParameterList params,
std::vector< size_t > *  updatedParameters = 0 
)
virtual

Update the parameters from params.

Only common parameters with params will be updated.

Parameters
paramsA list of parameters.
updatedParametersAn optional pointer toward a vector which will store the indices of parameters for which a value has changed. Indices are relative on the input parameter list "params".
Returns
true iff a least one parameter value has been changed.
See also
setParameters(), setAllParameters()

Definition at line 414 of file ParameterList.cpp.

References bpp::Parameter::getConstraint(), bpp::Parameter::getValue(), bpp::Parameter::hasConstraint(), hasParameter(), parameter(), parameters_, and bpp::Parameter::setValue().

Referenced by bpp::MetaOptimizer::doInit(), bpp::SimpleNewtonMultiDimensions::doStep(), bpp::SimpleMultiDimensions::doStep(), bpp::MetaOptimizer::doStep(), getParameter(), bpp::AbstractParametrizable::matchParametersValues(), and bpp::AbstractOptimizer::step().

◆ operator=()

ParameterList & ParameterList::operator= ( const ParameterList pl)

Assignation operator:

Definition at line 28 of file ParameterList.cpp.

References parameters_, and size().

Referenced by ParameterList().

◆ operator[]() [1/2]

virtual const Parameter& bpp::ParameterList::operator[] ( size_t  i) const
inlinevirtual
Returns
The parameter at a given position.
Warning
No check is performed on the validity of the index given as input!

Definition at line 62 of file ParameterList.h.

◆ operator[]() [2/2]

virtual Parameter& bpp::ParameterList::operator[] ( size_t  i)
inlinevirtual

Definition at line 63 of file ParameterList.h.

◆ parameter() [1/2]

const Parameter & ParameterList::parameter ( const std::string &  name) const
virtual

◆ parameter() [2/2]

Parameter & ParameterList::parameter ( const std::string &  name)
virtual

Get the parameter with name name.

Parameters
nameThe name of the parameter to look for.
Returns
A reference toward the parameter with name name.
Exceptions
ParameterNotFoundExceptionIf no parameter with the given name is found.

Definition at line 92 of file ParameterList.cpp.

References bpp::Parameter::getName(), parameters_, and size().

◆ printParameters() [1/2]

void ParameterList::printParameters ( OutputStream out) const
virtual

Print all parameters.

Definition at line 563 of file ParameterList.cpp.

References bpp::OutputStream::endLine(), parameters_, and size().

Referenced by getParameter(), and printParameters().

◆ printParameters() [2/2]

virtual void bpp::ParameterList::printParameters ( std::ostream &  out) const
inlinevirtual

Definition at line 402 of file ParameterList.h.

References printParameters(), and reset().

◆ reset()

void ParameterList::reset ( )
virtual

Reset the list: delete all parameters.

Definition at line 577 of file ParameterList.cpp.

References parameters_.

Referenced by printParameters(), bpp::AbstractParametrizable::resetParameters_(), bpp::AbstractParameterAliasable::resetParameters_(), and ~ParameterList().

◆ setAllParameters()

void ParameterList::setAllParameters ( const ParameterList params)
virtual

Set the parameters to be equals to params.

The list must contain exactly the same parameters (ie same names) than the parameters available.

Parameters
paramsA list with all parameters.
See also
setParameters(), matchParameters();

Definition at line 450 of file ParameterList.cpp.

References parameter(), and parameters_.

Referenced by getParameter().

◆ setAllParametersValues()

void ParameterList::setAllParametersValues ( const ParameterList params)
virtual

Set the parameters to be equals to params.

The list must contain exactly the same parameters (ie same names) than the parameters available.

Parameters
paramsA list with all parameters.
See also
setParameters(), matchParameters();
Exceptions
ParameterNotFoundExceptionIf at least one name does not correspond to a parameter in the list.
ConstraintExceptionIf one value is incorrect (and the two parameter list do not have the same constraints).

Definition at line 336 of file ParameterList.cpp.

References bpp::Parameter::getValue(), parameter(), parameters_, and bpp::Parameter::setValue().

Referenced by getParameter(), and bpp::AbstractParametrizable::setAllParametersValues().

◆ setParameter()

void ParameterList::setParameter ( size_t  index,
const Parameter param 
)
virtual

Change given parameter.

Parameters
indexThe position of the parameter to alter.
paramThe parameter to add to the list.
Exceptions
IndexOutOfBoundsExceptionif the index is not valid.

Definition at line 285 of file ParameterList.cpp.

References bpp::Parameter::clone(), parameters_, and size().

Referenced by bpp::AbstractOptimizer::autoParameter(), getParameter(), and bpp::BppODiscreteDistributionFormat::initialize_().

◆ setParameters()

void ParameterList::setParameters ( const ParameterList params)
virtual

Update the parameters from params.

params must be a subset of all parameters available.

Parameters
paramsA list containing all parameters to update.
See also
setAllParameters(), matchParameters()

Definition at line 460 of file ParameterList.cpp.

References parameter(), and parameters_.

Referenced by getParameter(), bpp::DirectionFunction::setParameters(), bpp::TwoPointsNumericalDerivative::updateDerivatives(), bpp::FivePointsNumericalDerivative::updateDerivatives(), and bpp::ThreePointsNumericalDerivative::updateDerivatives().

◆ setParametersValues()

void ParameterList::setParametersValues ( const ParameterList params)
virtual

Update the parameters from the ones in params that have matching names.

Parameters
paramsA list containing all parameters to update.
See also
setAllParameters(), matchParameters()
Exceptions
ConstraintExceptionIf one value is incorrect (and the two parameter list do not have the same constraints).

Definition at line 356 of file ParameterList.cpp.

References bpp::Parameter::getConstraint(), bpp::Parameter::getValue(), bpp::Parameter::hasConstraint(), hasParameter(), parameter(), parameters_, and bpp::Parameter::setValue().

Referenced by getParameter(), and bpp::AbstractParametrizable::setParametersValues().

◆ setParameterValue()

void ParameterList::setParameterValue ( const std::string &  name,
double  value 
)
virtual

Set the value of parameter with name name to be equal to value.

Parameters
namethe name of the parameter to set.
valueThe value of the parameter.
Exceptions
ParameterNotFoundExceptionIf no parameter with the given name is found in the list.
ConstraintExceptionIf the value is incorrect.

Definition at line 328 of file ParameterList.cpp.

References parameter(), and bpp::Parameter::setValue().

Referenced by bpp::FunctionTools::computeGrid(), bpp::DirichletDiscreteDistribution::discretize(), getParameter(), includeParameters(), bpp::AbstractParametrizable::setParameterValue(), and shareParameter().

◆ shareParameter()

◆ shareParameters()

void ParameterList::shareParameters ( const ParameterList params)
virtual

Share parameters with a given list. They are added the end of this list.

Parameters
paramsThe parameter list containing the parameters to share with to the list.

Definition at line 318 of file ParameterList.cpp.

References getParameter(), shareParameter(), and size().

Referenced by bpp::AbstractParameterAliasable::aliasParameters(), getParameter(), and bpp::AbstractParametrizable::shareParameters_().

◆ shareSubList() [1/2]

ParameterList ParameterList::shareSubList ( const std::vector< std::string > &  names) const
virtual

Share given parameters as a sublist.

Parameters
namesName of the parameters to be included in the list.
Returns
A list with all parameters specified.
Exceptions
ParameterNotFoundExceptionIf at least one name does not correspond to a parameter in the list.

Definition at line 132 of file ParameterList.cpp.

References getParameter(), and shareParameter().

Referenced by getParameter(), and bpp::AbstractParametrizable::matchParametersValues().

◆ shareSubList() [2/2]

ParameterList ParameterList::shareSubList ( const std::vector< size_t > &  parameters) const
virtual

Share given parameters in a sublist.

Parameters
parametersPositions of the parameters to be included in the list.
Returns
A list with all parameters specified.

Definition at line 168 of file ParameterList.cpp.

References parameters_, shareParameter(), and size().

◆ size()

size_t bpp::ParameterList::size ( ) const
inline
Returns
The number of parameters in the list.

Definition at line 56 of file ParameterList.h.

Referenced by bpp::AbstractParameterAliasable::AbstractParameterAliasable(), addParameters(), bpp::AbstractParameterAliasable::addParameters_(), bpp::AbstractParameterAliasable::aliasParameters(), bpp::AbstractOptimizer::autoParameter(), bpp::NumTools::computeHessianMatrix(), createSubList(), deleteParameter(), bpp::AbstractParametrizable::deleteParameter_(), deleteParameters(), bpp::NewtonOneDimension::doInit(), bpp::SimpleNewtonMultiDimensions::doInit(), bpp::SimpleMultiDimensions::doInit(), bpp::ConjugateGradientMultiDimensions::doInit(), bpp::BfgsMultiDimensions::doInit(), bpp::PowellMultiDimensions::doInit(), bpp::NewtonBacktrackOneDimension::doInit(), bpp::GoldenSectionSearch::doInit(), bpp::BrentOneDimension::doInit(), bpp::DownhillSimplexMethod::doInit(), bpp::ConjugateGradientMultiDimensions::doStep(), bpp::BfgsMultiDimensions::doStep(), bpp::PowellMultiDimensions::doStep(), bpp::ParametrizableCollection< N >::fireParameterChanged(), getCommonParametersWith(), bpp::ParametersStopCondition::getCurrentTolerance(), bpp::NumCalcApplicationTools::getDefaultValue(), getMatchingParameterNames(), bpp::AbstractParameterAliasable::getNumberOfIndependentParameters(), bpp::DirectionFunction::getNumberOfParameters(), bpp::AbstractParametrizable::getNumberOfParameters(), getParameter(), bpp::AbstractParametrizable::getParameter_(), getParameterNames(), bpp::ParametrizableCollection< N >::getParametersForObject(), getParameterValue(), hasParameter(), bpp::AbstractOptimizer::ignoreConstraints(), includeParameters(), bpp::AbstractParameterAliasable::includeParameters_(), bpp::AbstractOptimizer::init(), bpp::BppODiscreteDistributionFormat::initialize_(), bpp::ParametersStopCondition::isToleranceReached(), bpp::OneDimensionOptimizationTools::lineMinimization(), bpp::OneDimensionOptimizationTools::lineSearch(), operator=(), bpp::AbstractParameterAliasable::operator=(), bpp::BackupListener::optimizationStepPerformed(), parameter(), ParameterList(), bpp::ParametersStopCondition::ParametersStopCondition(), printParameters(), bpp::AbstractOptimizer::printPoint(), bpp::ParametrizableCollection< N >::removeObject(), bpp::BfgsMultiDimensions::setDirection(), setParameter(), bpp::FullHmmTransitionMatrix::setTransitionProbabilities(), shareParameters(), bpp::AbstractParameterAliasable::shareParameters_(), shareSubList(), whichParameterHasName(), and bpp::BppOParametrizableFormat::write().

◆ testParametersValues()

bool ParameterList::testParametersValues ( const ParameterList params) const
virtual

Tests the parameters from params.

Only common parameters with params are compared.

Parameters
paramsA list of parameters.
Returns
true iff a least one parameter value is different.

Definition at line 384 of file ParameterList.cpp.

References bpp::Parameter::getConstraint(), bpp::Parameter::getValue(), bpp::Parameter::hasConstraint(), hasParameter(), parameter(), and parameters_.

Referenced by getParameter().

◆ whichParameterHasName()

size_t ParameterList::whichParameterHasName ( const std::string &  name) const
virtual

Get the position of a given parameter according to its name.

Parameters
nameThe name of the parameter to look for.
Returns
The position of the parameter if found. If several parameters exist with the given name, the position of the first one is returned.
Exceptions
ParameterNotFoundExceptionIf no parameter with the given name is found.

Definition at line 552 of file ParameterList.cpp.

References parameters_, and size().

Referenced by bpp::AbstractParameterAliasable::aliasParameters(), and getParameter().

Member Data Documentation

◆ parameters_


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