|
bpp-core
2.1.0
|
Partial implementation of the DiscreteDistribution interface. More...
#include <Bpp/Numeric/Prob/AbstractDiscreteDistribution.h>
Inheritance diagram for bpp::AbstractDiscreteDistribution:
Collaboration diagram for bpp::AbstractDiscreteDistribution:Classes | |
| class | Order |
| Comparator class for AbstractDiscreteDistribution. More... | |
Public Member Functions | |
| AbstractDiscreteDistribution (size_t nbClasses, const std::string &prefix="") | |
| AbstractDiscreteDistribution (size_t nbClasses, double precision, const std::string &prefix="") | |
| AbstractDiscreteDistribution (const AbstractDiscreteDistribution &adde) | |
| AbstractDiscreteDistribution & | operator= (const AbstractDiscreteDistribution &adde) |
| virtual | ~AbstractDiscreteDistribution () |
| virtual void | restrictToConstraint (const Constraint &c) |
| Restricts the distribution to the domain where the constraint is respected, in addition of other predefined constraints. | |
| DiscreteDistribution * | clone () const =0 |
| Create a copy of this object and send a pointer to it. | |
| virtual std::string | getName () const =0 |
| Get the name of the distribution. | |
| virtual double | qProb (double x) const =0 |
Return the quantile of the continuous version of the distribution, ie y such that . | |
| virtual double | pProb (double x) const =0 |
Return the cumulative quantile of the continuous version of the distribution, ie . | |
| virtual double | Expectation (double a) const =0 |
Return a primitive function used for the expectation of the continuous version of the distribution, ie . | |
| virtual size_t | getNumberOfIndependentParameters () const =0 |
| Get the number of independent parameters. | |
| virtual void | aliasParameters (const std::string &p1, const std::string &p2)=0 throw (ParameterNotFoundException, Exception) |
| Set two parameters as 'aliased'. | |
| virtual void | unaliasParameters (const std::string &p1, const std::string &p2)=0 throw (ParameterNotFoundException, Exception) |
| Detach two parameters previously set as 'aliased'. | |
| virtual const ParameterList & | getIndependentParameters () const =0 |
| Get the minimal list of parameters to set the model. | |
| virtual std::vector< std::string > | getAlias (const std::string &name) const =0 |
| virtual bool | hasParameter (const std::string &name) const =0 |
| Tell if there is a parameter with specified name. | |
| virtual const ParameterList & | getParameters () const =0 |
| Get all parameters available. | |
| virtual const Parameter & | getParameter (const std::string &name) const =0 throw (ParameterNotFoundException) |
| Get the parameter with specified name. | |
| virtual double | getParameterValue (const std::string &name) const =0 throw (ParameterNotFoundException) |
| Get the value for parameter of name 'name'. | |
| virtual void | setAllParametersValues (const ParameterList ¶meters)=0 throw (ParameterNotFoundException, ConstraintException) |
| Set the parameters values to be equals to those of parameters. | |
| virtual void | setParameterValue (const std::string &name, double value)=0 throw (ParameterNotFoundException, ConstraintException) |
| Set the value of parameter with name name to be equal to value. | |
| virtual void | setParametersValues (const ParameterList ¶meters)=0 throw (ParameterNotFoundException, ConstraintException) |
| Update the parameters from parameters. | |
| virtual bool | matchParametersValues (const ParameterList ¶meters)=0 throw (ConstraintException) |
| Update the parameters from parameters. | |
| virtual size_t | getNumberOfParameters () const =0 |
| Get the number of parameters. | |
| virtual void | setNamespace (const std::string &prefix)=0 |
| Set the namespace for the parameter names. | |
| virtual std::string | getNamespace () const =0 |
| virtual std::string | getParameterNameWithoutNamespace (const std::string &name) const =0 |
| Resolves a parameter name according to the current namespace. | |
| void | setNamespace (const std::string &prefix) |
| Set the namespace for the parameter names. | |
| const ParameterList & | getIndependentParameters () const |
| Get the minimal list of parameters to set the model. | |
| size_t | getNumberOfIndependentParameters () const |
| Get the number of independent parameters. | |
| void | aliasParameters (const std::string &p1, const std::string &p2) throw (ParameterNotFoundException, Exception) |
| Set two parameters as 'aliased'. | |
| void | unaliasParameters (const std::string &p1, const std::string &p2) throw (ParameterNotFoundException, Exception) |
| Detach two parameters previously set as 'aliased'. | |
| std::vector< std::string > | getAlias (const std::string &name) const |
| std::string | getFrom (const std::string &name) const |
| void | fireParameterChanged (const ParameterList ¶meters) |
| Notify the class when one or several parameters have changed. | |
| bool | hasParameter (const std::string &name) const |
| Tell if there is a parameter with specified name. | |
| const ParameterList & | getParameters () const |
| Get all parameters available. | |
| const Parameter & | getParameter (const std::string &name) const throw (ParameterNotFoundException) |
| Get the parameter with specified name. | |
| double | getParameterValue (const std::string &name) const throw (ParameterNotFoundException) |
| Get the value for parameter of name 'name'. | |
| void | setAllParametersValues (const ParameterList ¶meters) throw (ParameterNotFoundException, ConstraintException) |
| Set the parameters values to be equals to those of parameters. | |
| void | setParameterValue (const std::string &name, double value) throw (ParameterNotFoundException, ConstraintException) |
| Set the value of parameter with name name to be equal to value. | |
| void | setParametersValues (const ParameterList ¶meters) throw (ParameterNotFoundException, ConstraintException) |
| Update the parameters from parameters. | |
| bool | matchParametersValues (const ParameterList ¶meters) throw (ConstraintException) |
| Update the parameters from parameters. | |
| size_t | getNumberOfParameters () const |
| Get the number of parameters. | |
| std::string | getNamespace () const |
| std::string | getParameterNameWithoutNamespace (const std::string &name) const |
| Resolves a parameter name according to the current namespace. | |
The DiscreteDistribution interface. | |
| size_t | getNumberOfCategories () const |
| void | setNumberOfCategories (size_t nbClasses) |
| sets the number of categories and discretizes if there is a change in this number. | |
| double | getCategory (size_t categoryIndex) const |
| double | getProbability (size_t categoryIndex) const |
| double | getProbability (double category) const |
| Vdouble | getCategories () const |
| Vdouble | getProbabilities () const |
| double | getValueCategory (double value) const |
| void | set (double category, double probability) |
| Set the probability associated to a class. | |
| void | add (double category, double probability) |
| Modify the probability associated to a class. | |
| double | getInfCumulativeProbability (double category) const |
| double | getIInfCumulativeProbability (double category) const |
| double | getSupCumulativeProbability (double category) const |
| double | getSSupCumulativeProbability (double category) const |
| double | rand () const |
| Draw a random number from this distribution. | |
| double | randC () const throw (Exception) |
| Draw a random number from the continuous version of this distribution, if it exists. | |
| double | getBound (size_t i) const throw (IndexOutOfBoundsException) |
| double | getLowerBound () const |
| methods about the range of the definition | |
| double | getUpperBound () const |
| bool | strictLowerBound () const |
| bool | strictUpperBound () const |
| Vdouble | getBounds () const |
| void | print (OutputStream &out) const |
| Print the distribution (categories and corresponding probabilities) to a stream. | |
| double | precision () const |
| void | setMedian (bool median) |
| Sets the median value to true to say that the value in a class is proportional to the median value of the class, the proportionality factor being such that the sum of the values equals the expectation of the distribution. If it is set to false, the value is the mean value in the class. | |
| virtual void | discretize () |
| Discretizes the distribution in equiprobable classes. | |
Protected Member Functions | |
| void | addParameter_ (Parameter *parameter) |
| void | addParameters_ (const ParameterList ¶meters) |
| void | deleteParameter_ (size_t index) throw (IndexOutOfBoundsException) |
| void | resetParameters_ () |
| Parameter & | getParameter_ (const std::string &name) throw (ParameterNotFoundException) |
| Parameter & | getParameter_ (size_t index) throw (IndexOutOfBoundsException) |
| const Parameter & | getParameter_ (size_t index) const throw (IndexOutOfBoundsException) |
| Parameter & | getParameterWithNamespace_ (const std::string &name) throw (ParameterNotFoundException) |
| const Parameter & | getParameterWithNamespace_ (const std::string &name) const throw (ParameterNotFoundException) |
| ParameterList & | getParameters_ () |
Protected Attributes | |
| size_t | numberOfCategories_ |
| std::map< double, double, Order > | distribution_ |
| std::vector< double > | bounds_ |
| IntervalConstraint | intMinMax_ |
| the interval where the distribution is defined/restricted. | |
| bool | median_ |
Partial implementation of the DiscreteDistribution interface.
This class uses a map to store the cateogry values as keys and probabilities as values. It uses its own comparator class to deal with double precision. By default, category values that differ less than 10E-9 will be considered identical.
Definition at line 59 of file AbstractDiscreteDistribution.h.
| AbstractDiscreteDistribution::AbstractDiscreteDistribution | ( | size_t | nbClasses, |
| const std::string & | prefix = "" |
||
| ) |
Definition at line 49 of file AbstractDiscreteDistribution.cpp.
| AbstractDiscreteDistribution::AbstractDiscreteDistribution | ( | size_t | nbClasses, |
| double | precision, | ||
| const std::string & | prefix = "" |
||
| ) |
With additional precision value to discriminate categories (default 1e-12)
Definition at line 58 of file AbstractDiscreteDistribution.cpp.
| AbstractDiscreteDistribution::AbstractDiscreteDistribution | ( | const AbstractDiscreteDistribution & | adde | ) |
Definition at line 67 of file AbstractDiscreteDistribution.cpp.
| virtual bpp::AbstractDiscreteDistribution::~AbstractDiscreteDistribution | ( | ) | [inline, virtual] |
Definition at line 146 of file AbstractDiscreteDistribution.h.
| void AbstractDiscreteDistribution::add | ( | double | category, |
| double | probability | ||
| ) | [virtual] |
Modify the probability associated to a class.
If the category does not exist, a new category is created with the corresponding probability. if the category exists, add 'probability' to the existing probability. The sum of all probabilities is not checked.
| category | The class value. |
| probability | The class probability. |
Implements bpp::DiscreteDistribution.
Definition at line 181 of file AbstractDiscreteDistribution.cpp.
References distribution_.
| void bpp::AbstractParameterAliasable::addParameter_ | ( | Parameter * | parameter | ) | [inline, protected, inherited] |
Reimplemented from bpp::AbstractParametrizable.
Definition at line 189 of file AbstractParameterAliasable.h.
References bpp::ParameterList::addParameter(), bpp::Parameter::clone(), and bpp::AbstractParameterAliasable::independentParameters_.
Referenced by bpp::BetaDiscreteDistribution::BetaDiscreteDistribution(), bpp::ConstantDistribution::ConstantDistribution(), bpp::DirichletDiscreteDistribution::DirichletDiscreteDistribution(), bpp::ExponentialDiscreteDistribution::ExponentialDiscreteDistribution(), bpp::GammaDiscreteDistribution::GammaDiscreteDistribution(), bpp::GaussianDiscreteDistribution::GaussianDiscreteDistribution(), bpp::InvariantMixedDiscreteDistribution::InvariantMixedDiscreteDistribution(), bpp::MixtureOfDiscreteDistributions::MixtureOfDiscreteDistributions(), bpp::SimpleDiscreteDistribution::SimpleDiscreteDistribution(), bpp::Simplex::Simplex(), and bpp::TruncatedExponentialDiscreteDistribution::TruncatedExponentialDiscreteDistribution().
| void bpp::AbstractParameterAliasable::addParameters_ | ( | const ParameterList & | parameters | ) | [inline, protected, inherited] |
Reimplemented from bpp::AbstractParametrizable.
Definition at line 195 of file AbstractParameterAliasable.h.
References bpp::ParameterList::addParameters(), and bpp::AbstractParameterAliasable::independentParameters_.
Referenced by bpp::InvariantMixedDiscreteDistribution::InvariantMixedDiscreteDistribution(), and bpp::MixtureOfDiscreteDistributions::MixtureOfDiscreteDistributions().
| virtual void bpp::ParameterAliasable::aliasParameters | ( | const std::string & | p1, |
| const std::string & | p2 | ||
| ) | throw (ParameterNotFoundException, Exception) [pure virtual, inherited] |
Set two parameters as 'aliased'.
The values of the two parameters will be synchronized, so that setting the value of one parameter will automatically set the value of the other one accordingly.
| p1 | Original parameter. |
| p2 | Aliased parameter. |
| ParameterNotFoundException | if p1 or p2 do not correspond to existing parameters. |
| Exception | when trying to perform non-valid association. |
Implemented in bpp::AbstractParameterAliasable.
| void AbstractParameterAliasable::aliasParameters | ( | const std::string & | p1, |
| const std::string & | p2 | ||
| ) | throw (ParameterNotFoundException, Exception) [virtual, inherited] |
Set two parameters as 'aliased'.
The values of the two parameters will be synchronized, so that setting the value of one parameter will automatically set the value of the other one accordingly.
| p1 | Original parameter. |
| p2 | Aliased parameter. |
| ParameterNotFoundException | if p1 or p2 do not correspond to existing parameters. |
| Exception | when trying to perform non-valid association. |
Implements bpp::ParameterAliasable.
Definition at line 103 of file AbstractParameterAliasable.cpp.
References bpp::Parameter::addParameterListener(), bpp::Parameter::getConstraint(), bpp::Constraint::getDescription(), and bpp::Parameter::hasConstraint().
| DiscreteDistribution* bpp::DiscreteDistribution::clone | ( | ) | const [pure virtual, inherited] |
Create a copy of this object and send a pointer to it.
Implements bpp::Clonable.
Implemented in bpp::SimpleDiscreteDistribution, bpp::TruncatedExponentialDiscreteDistribution, bpp::MixtureOfDiscreteDistributions, bpp::InvariantMixedDiscreteDistribution, bpp::GammaDiscreteDistribution, bpp::BetaDiscreteDistribution, bpp::ExponentialDiscreteDistribution, bpp::GaussianDiscreteDistribution, bpp::UniformDiscreteDistribution, and bpp::ConstantDistribution.
Referenced by bpp::InvariantMixedDiscreteDistribution::operator=().
| void bpp::AbstractParameterAliasable::deleteParameter_ | ( | size_t | index | ) | throw (IndexOutOfBoundsException) [inline, protected, inherited] |
Reimplemented from bpp::AbstractParametrizable.
Definition at line 201 of file AbstractParameterAliasable.h.
References bpp::ParameterList::deleteParameter(), bpp::Parameter::getName(), bpp::AbstractParametrizable::getParameter_(), bpp::ParameterList::hasParameter(), and bpp::AbstractParameterAliasable::independentParameters_.
| void AbstractDiscreteDistribution::discretize | ( | ) | [virtual] |
Discretizes the distribution in equiprobable classes.
Implements bpp::DiscreteDistribution.
Reimplemented in bpp::MixtureOfDiscreteDistributions, bpp::InvariantMixedDiscreteDistribution, bpp::SimpleDiscreteDistribution, and bpp::ConstantDistribution.
Definition at line 307 of file AbstractDiscreteDistribution.cpp.
References bounds_, distribution_, bpp::DiscreteDistribution::Expectation(), bpp::IntervalConstraint::getLowerBound(), bpp::IntervalConstraint::getUpperBound(), intMinMax_, median_, numberOfCategories_, bpp::DiscreteDistribution::pProb(), precision(), bpp::DiscreteDistribution::qProb(), bpp::IntervalConstraint::strictLowerBound(), bpp::IntervalConstraint::strictUpperBound(), and bpp::NumConstants::TINY().
Referenced by bpp::BetaDiscreteDistribution::BetaDiscreteDistribution(), bpp::ExponentialDiscreteDistribution::ExponentialDiscreteDistribution(), bpp::GaussianDiscreteDistribution::fireParameterChanged(), bpp::GammaDiscreteDistribution::fireParameterChanged(), bpp::ExponentialDiscreteDistribution::fireParameterChanged(), bpp::BetaDiscreteDistribution::fireParameterChanged(), bpp::TruncatedExponentialDiscreteDistribution::fireParameterChanged(), bpp::GammaDiscreteDistribution::GammaDiscreteDistribution(), bpp::GaussianDiscreteDistribution::GaussianDiscreteDistribution(), restrictToConstraint(), setMedian(), setNumberOfCategories(), bpp::TruncatedExponentialDiscreteDistribution::TruncatedExponentialDiscreteDistribution(), and bpp::UniformDiscreteDistribution::UniformDiscreteDistribution().
| virtual double bpp::DiscreteDistribution::Expectation | ( | double | a | ) | const [pure virtual, inherited] |
Return a primitive function used for the expectation of the continuous version of the distribution, ie
.
Implemented in bpp::MixtureOfDiscreteDistributions, bpp::SimpleDiscreteDistribution, bpp::TruncatedExponentialDiscreteDistribution, bpp::InvariantMixedDiscreteDistribution, bpp::ExponentialDiscreteDistribution, bpp::BetaDiscreteDistribution, bpp::GammaDiscreteDistribution, bpp::UniformDiscreteDistribution, bpp::GaussianDiscreteDistribution, and bpp::ConstantDistribution.
Referenced by discretize(), and bpp::InvariantMixedDiscreteDistribution::Expectation().
| void bpp::AbstractParameterAliasable::fireParameterChanged | ( | const ParameterList & | parameters | ) | [inline, virtual, inherited] |
Notify the class when one or several parameters have changed.
| parameters | A ParameterList object with parameters that changed. |
Implements bpp::AbstractParametrizable.
Reimplemented in bpp::Simplex, bpp::MixtureOfDiscreteDistributions, bpp::SimpleDiscreteDistribution, bpp::DirichletDiscreteDistribution, bpp::TruncatedExponentialDiscreteDistribution, bpp::InvariantMixedDiscreteDistribution, bpp::BetaDiscreteDistribution, bpp::ExponentialDiscreteDistribution, bpp::GammaDiscreteDistribution, bpp::GaussianDiscreteDistribution, bpp::UniformDiscreteDistribution, and bpp::ConstantDistribution.
Definition at line 183 of file AbstractParameterAliasable.h.
References bpp::AbstractParametrizable::getParameters(), bpp::AbstractParameterAliasable::independentParameters_, and bpp::ParameterList::matchParametersValues().
| virtual std::vector<std::string> bpp::ParameterAliasable::getAlias | ( | const std::string & | name | ) | const [pure virtual, inherited] |
| name | The name of the parameter to look for. |
Implemented in bpp::AbstractParameterAliasable.
Referenced by bpp::BppOParametrizableFormat::write().
| vector< string > AbstractParameterAliasable::getAlias | ( | const std::string & | name | ) | const [virtual, inherited] |
| name | The name of the parameter to look for. |
Implements bpp::ParameterAliasable.
Definition at line 198 of file AbstractParameterAliasable.cpp.
References bpp::AbstractParameterAliasable::aliasListenersRegister_, and bpp::VectorTools::append().
| double bpp::AbstractDiscreteDistribution::getBound | ( | size_t | ) | const throw (IndexOutOfBoundsException) [inline, virtual] |
Implements bpp::DiscreteDistribution.
Definition at line 178 of file AbstractDiscreteDistribution.h.
References bounds_, and numberOfCategories_.
Referenced by getBounds().
| Vdouble AbstractDiscreteDistribution::getBounds | ( | ) | const [virtual] |
Implements bpp::DiscreteDistribution.
Definition at line 444 of file AbstractDiscreteDistribution.cpp.
References getBound(), getLowerBound(), getUpperBound(), and numberOfCategories_.
| Vdouble AbstractDiscreteDistribution::getCategories | ( | ) | const [virtual] |
Implements bpp::DiscreteDistribution.
Definition at line 142 of file AbstractDiscreteDistribution.cpp.
References distribution_.
| double AbstractDiscreteDistribution::getCategory | ( | size_t | categoryIndex | ) | const [virtual] |
| categoryIndex | Class index. |
Implements bpp::DiscreteDistribution.
Definition at line 111 of file AbstractDiscreteDistribution.cpp.
References distribution_.
Referenced by bpp::BppODiscreteDistributionFormat::write().
| string AbstractParameterAliasable::getFrom | ( | const std::string & | name | ) | const [inherited] |
| name | The name of the parameter to look for. |
Definition at line 219 of file AbstractParameterAliasable.cpp.
References bpp::AbstractParameterAliasable::aliasListenersRegister_.
| double AbstractDiscreteDistribution::getIInfCumulativeProbability | ( | double | category | ) | const [virtual] |
. | category | The class value. |
Implements bpp::DiscreteDistribution.
Definition at line 230 of file AbstractDiscreteDistribution.cpp.
References distribution_.
| virtual const ParameterList& bpp::ParameterAliasable::getIndependentParameters | ( | ) | const [pure virtual, inherited] |
Get the minimal list of parameters to set the model.
If no parameters are aliased, this is the same a getParameters().
Implemented in bpp::AbstractParameterAliasable.
Referenced by bpp::InvariantMixedDiscreteDistribution::InvariantMixedDiscreteDistribution(), bpp::BppODiscreteDistributionFormat::write(), and bpp::BppOParametrizableFormat::write().
| const ParameterList& bpp::AbstractParameterAliasable::getIndependentParameters | ( | ) | const [inline, virtual, inherited] |
Get the minimal list of parameters to set the model.
If no parameters are aliased, this is the same a getParameters().
Implements bpp::ParameterAliasable.
Definition at line 162 of file AbstractParameterAliasable.h.
References bpp::AbstractParameterAliasable::independentParameters_.
| double AbstractDiscreteDistribution::getInfCumulativeProbability | ( | double | category | ) | const [virtual] |
. | category | The class value. |
Implements bpp::DiscreteDistribution.
Definition at line 215 of file AbstractDiscreteDistribution.cpp.
References distribution_.
| double bpp::AbstractDiscreteDistribution::getLowerBound | ( | ) | const [inline, virtual] |
methods about the range of the definition
Reimplemented from bpp::DiscreteDistribution.
Reimplemented in bpp::SimpleDiscreteDistribution, and bpp::ConstantDistribution.
Definition at line 192 of file AbstractDiscreteDistribution.h.
References bpp::IntervalConstraint::getLowerBound(), and intMinMax_.
Referenced by getBounds(), and bpp::MixtureOfDiscreteDistributions::updateDistribution().
| virtual std::string bpp::DiscreteDistribution::getName | ( | ) | const [pure virtual, inherited] |
Get the name of the distribution.
Implemented in bpp::SimpleDiscreteDistribution, bpp::TruncatedExponentialDiscreteDistribution, bpp::MixtureOfDiscreteDistributions, bpp::InvariantMixedDiscreteDistribution, bpp::BetaDiscreteDistribution, bpp::ExponentialDiscreteDistribution, bpp::ConstantDistribution, bpp::GaussianDiscreteDistribution, bpp::UniformDiscreteDistribution, and bpp::GammaDiscreteDistribution.
Referenced by bpp::BppODiscreteDistributionFormat::write().
| std::string bpp::AbstractParametrizable::getNamespace | ( | ) | const [inline, virtual, inherited] |
Implements bpp::Parametrizable.
Definition at line 124 of file AbstractParametrizable.h.
References bpp::AbstractParametrizable::prefix_.
Referenced by bpp::MixtureOfDiscreteDistributions::MixtureOfDiscreteDistributions(), bpp::Simplex::setFrequencies(), bpp::AbstractParameterAliasable::setNamespace(), and bpp::BppODiscreteDistributionFormat::write().
| virtual std::string bpp::Parametrizable::getNamespace | ( | ) | const [pure virtual, inherited] |
Implemented in bpp::FunctionWrapper, bpp::ParametrizableAdapter, and bpp::AbstractParametrizable.
Referenced by bpp::FunctionWrapper::getNamespace().
| size_t AbstractDiscreteDistribution::getNumberOfCategories | ( | ) | const [virtual] |
Implements bpp::DiscreteDistribution.
Definition at line 91 of file AbstractDiscreteDistribution.cpp.
References numberOfCategories_.
Referenced by bpp::BppODiscreteDistributionFormat::write().
| virtual size_t bpp::ParameterAliasable::getNumberOfIndependentParameters | ( | ) | const [pure virtual, inherited] |
Get the number of independent parameters.
Implemented in bpp::AbstractParameterAliasable.
| size_t bpp::AbstractParameterAliasable::getNumberOfIndependentParameters | ( | ) | const [inline, virtual, inherited] |
Get the number of independent parameters.
Implements bpp::ParameterAliasable.
Definition at line 164 of file AbstractParameterAliasable.h.
References bpp::AbstractParameterAliasable::independentParameters_, and bpp::ParameterList::size().
| size_t bpp::AbstractParametrizable::getNumberOfParameters | ( | ) | const [inline, virtual, inherited] |
Get the number of parameters.
Implements bpp::Parametrizable.
Definition at line 120 of file AbstractParametrizable.h.
References bpp::AbstractParametrizable::parameters_, and bpp::ParameterList::size().
Referenced by bpp::AbstractParameterAliasable::AbstractParameterAliasable(), bpp::SimpleDiscreteDistribution::fireParameterChanged(), bpp::AbstractParameterAliasable::operator=(), bpp::ConstantDistribution::restrictToConstraint(), and bpp::SimpleDiscreteDistribution::restrictToConstraint().
| virtual size_t bpp::Parametrizable::getNumberOfParameters | ( | ) | const [pure virtual, inherited] |
Get the number of parameters.
Implemented in bpp::FunctionWrapper, bpp::ParametrizableAdapter, bpp::AbstractParametrizable, and bpp::DirectionFunction.
Referenced by bpp::FunctionWrapper::getNumberOfParameters(), and bpp::BppODiscreteDistributionFormat::write().
| const Parameter& bpp::AbstractParametrizable::getParameter | ( | const std::string & | name | ) | const throw (ParameterNotFoundException) [inline, virtual, inherited] |
Get the parameter with specified name.
| name | The name of the parameter to look for. |
| ParameterNotFoundException | if no parameter with this name is found. |
Implements bpp::Parametrizable.
Definition at line 79 of file AbstractParametrizable.h.
References bpp::ParameterList::getParameter(), bpp::AbstractParametrizable::parameters_, and bpp::AbstractParametrizable::prefix_.
Referenced by bpp::ReparametrizationDerivableFirstOrderWrapper::getFirstOrderDerivative(), bpp::AbstractParametrizable::getParameterValue(), bpp::AbstractParametrizable::getParameterWithNamespace_(), bpp::ReparametrizationDerivableSecondOrderWrapper::getSecondOrderDerivative(), and bpp::TestFunction::getValue().
| virtual const Parameter& bpp::Parametrizable::getParameter | ( | const std::string & | name | ) | const throw (ParameterNotFoundException) [pure virtual, inherited] |
Get the parameter with specified name.
| name | The name of the parameter to look for. |
| ParameterNotFoundException | if no parameter with this name is found. |
Implemented in bpp::FunctionWrapper, bpp::ParametrizableAdapter, and bpp::AbstractParametrizable.
Referenced by bpp::FunctionWrapper::getParameter().
| Parameter& bpp::AbstractParametrizable::getParameter_ | ( | const std::string & | name | ) | throw (ParameterNotFoundException) [inline, protected, inherited] |
| name | The name of the parameter. |
| ParameterNotFoundException | If no parameter with that name is found in the list. |
Definition at line 164 of file AbstractParametrizable.h.
References bpp::ParameterList::getParameter(), bpp::AbstractParametrizable::parameters_, and bpp::AbstractParametrizable::prefix_.
Referenced by bpp::AbstractParameterAliasable::deleteParameter_(), bpp::AbstractParametrizable::getParameterWithNamespace_(), bpp::ConstantDistribution::restrictToConstraint(), bpp::TruncatedExponentialDiscreteDistribution::restrictToConstraint(), bpp::InvariantMixedDiscreteDistribution::restrictToConstraint(), and bpp::SimpleDiscreteDistribution::restrictToConstraint().
| Parameter& bpp::AbstractParametrizable::getParameter_ | ( | size_t | index | ) | throw (IndexOutOfBoundsException) [inline, protected, inherited] |
Definition at line 188 of file AbstractParametrizable.h.
References bpp::AbstractParametrizable::parameters_, and bpp::ParameterList::size().
| const Parameter& bpp::AbstractParametrizable::getParameter_ | ( | size_t | index | ) | const throw (IndexOutOfBoundsException) [inline, protected, inherited] |
Definition at line 194 of file AbstractParametrizable.h.
References bpp::AbstractParametrizable::parameters_, and bpp::ParameterList::size().
| std::string AbstractParametrizable::getParameterNameWithoutNamespace | ( | const std::string & | name | ) | const [virtual, inherited] |
Resolves a parameter name according to the current namespace.
Implements bpp::Parametrizable.
Definition at line 63 of file AbstractParametrizable.cpp.
References bpp::TextTools::startsWith().
| virtual std::string bpp::Parametrizable::getParameterNameWithoutNamespace | ( | const std::string & | name | ) | const [pure virtual, inherited] |
Resolves a parameter name according to the current namespace.
Implemented in bpp::FunctionWrapper, bpp::ParametrizableAdapter, and bpp::AbstractParametrizable.
Referenced by bpp::FunctionWrapper::getParameterNameWithoutNamespace(), bpp::BppODiscreteDistributionFormat::read(), and bpp::BppOParametrizableFormat::write().
| const ParameterList& bpp::AbstractParametrizable::getParameters | ( | ) | const [inline, virtual, inherited] |
Get all parameters available.
Implements bpp::Parametrizable.
Definition at line 77 of file AbstractParametrizable.h.
References bpp::AbstractParametrizable::parameters_.
Referenced by bpp::AbstractParameterAliasable::fireParameterChanged(), and bpp::MixtureOfDiscreteDistributions::MixtureOfDiscreteDistributions().
| virtual const ParameterList& bpp::Parametrizable::getParameters | ( | ) | const [pure virtual, inherited] |
Get all parameters available.
Implemented in bpp::FunctionWrapper, bpp::ParametrizableAdapter, bpp::DirectionFunction, and bpp::AbstractParametrizable.
Referenced by bpp::NewtonOneDimension::doStep(), bpp::FunctionWrapper::getParameters(), bpp::BppODiscreteDistributionFormat::read(), bpp::AbstractNumericalDerivative::setParameterValue(), bpp::AbstractOptimizer::step(), and bpp::BppOParametrizableFormat::write().
| ParameterList& bpp::AbstractParametrizable::getParameters_ | ( | ) | [inline, protected, inherited] |
Definition at line 201 of file AbstractParametrizable.h.
References bpp::AbstractParametrizable::parameters_.
Referenced by bpp::AbstractParameterAliasable::AbstractParameterAliasable(), and bpp::AbstractParameterAliasable::operator=().
| double bpp::AbstractParametrizable::getParameterValue | ( | const std::string & | name | ) | const throw (ParameterNotFoundException) [inline, virtual, inherited] |
Get the value for parameter of name 'name'.
| name | The name of the parameter. |
Implements bpp::Parametrizable.
Definition at line 84 of file AbstractParametrizable.h.
References bpp::AbstractParametrizable::getParameter(), and bpp::Parameter::getValue().
Referenced by bpp::DirichletDiscreteDistribution::applyParameters(), bpp::ConstantDistribution::fireParameterChanged(), bpp::GaussianDiscreteDistribution::fireParameterChanged(), bpp::GammaDiscreteDistribution::fireParameterChanged(), bpp::ExponentialDiscreteDistribution::fireParameterChanged(), bpp::BetaDiscreteDistribution::fireParameterChanged(), bpp::InvariantMixedDiscreteDistribution::fireParameterChanged(), bpp::TruncatedExponentialDiscreteDistribution::fireParameterChanged(), bpp::SimpleDiscreteDistribution::fireParameterChanged(), bpp::MixtureOfDiscreteDistributions::fireParameterChanged(), bpp::Simplex::fireParameterChanged(), bpp::ExponentialDiscreteDistribution::randC(), bpp::GammaDiscreteDistribution::randC(), bpp::BetaDiscreteDistribution::randC(), bpp::TruncatedExponentialDiscreteDistribution::randC(), and bpp::ConstantDistribution::restrictToConstraint().
| virtual double bpp::Parametrizable::getParameterValue | ( | const std::string & | name | ) | const throw (ParameterNotFoundException) [pure virtual, inherited] |
Get the value for parameter of name 'name'.
| name | The name of the parameter. |
Implemented in bpp::FunctionWrapper, bpp::ParametrizableAdapter, and bpp::AbstractParametrizable.
Referenced by bpp::FunctionWrapper::getParameterValue(), and bpp::BppODiscreteDistributionFormat::read().
| Parameter& bpp::AbstractParametrizable::getParameterWithNamespace_ | ( | const std::string & | name | ) | throw (ParameterNotFoundException) [inline, protected, inherited] |
| name | The name of the parameter, including its namespace. |
| ParameterNotFoundException | If no parameter with that name is found in the list. |
Definition at line 174 of file AbstractParametrizable.h.
References bpp::AbstractParametrizable::getParameter_().
| const Parameter& bpp::AbstractParametrizable::getParameterWithNamespace_ | ( | const std::string & | name | ) | const throw (ParameterNotFoundException) [inline, protected, inherited] |
| name | The name of the parameter, including its namespace. |
| ParameterNotFoundException | If no parameter with that name is found in the list. |
Definition at line 183 of file AbstractParametrizable.h.
References bpp::AbstractParametrizable::getParameter().
| Vdouble AbstractDiscreteDistribution::getProbabilities | ( | ) | const [virtual] |
Implements bpp::DiscreteDistribution.
Definition at line 158 of file AbstractDiscreteDistribution.cpp.
References distribution_.
| double AbstractDiscreteDistribution::getProbability | ( | size_t | categoryIndex | ) | const [virtual] |
| categoryIndex | Class index. |
Implements bpp::DiscreteDistribution.
Definition at line 123 of file AbstractDiscreteDistribution.cpp.
References distribution_.
Referenced by bpp::BppODiscreteDistributionFormat::write().
| double AbstractDiscreteDistribution::getProbability | ( | double | category | ) | const [virtual] |
| category | The value associated to the class. |
Implements bpp::DiscreteDistribution.
Definition at line 135 of file AbstractDiscreteDistribution.cpp.
References distribution_.
| double AbstractDiscreteDistribution::getSSupCumulativeProbability | ( | double | category | ) | const [virtual] |
. | category | The class value. |
Implements bpp::DiscreteDistribution.
Definition at line 264 of file AbstractDiscreteDistribution.cpp.
References distribution_.
| double AbstractDiscreteDistribution::getSupCumulativeProbability | ( | double | category | ) | const [virtual] |
. | category | The class value. |
Implements bpp::DiscreteDistribution.
Definition at line 247 of file AbstractDiscreteDistribution.cpp.
References distribution_.
| double bpp::AbstractDiscreteDistribution::getUpperBound | ( | ) | const [inline, virtual] |
Reimplemented from bpp::DiscreteDistribution.
Reimplemented in bpp::SimpleDiscreteDistribution, and bpp::ConstantDistribution.
Definition at line 197 of file AbstractDiscreteDistribution.h.
References bpp::IntervalConstraint::getUpperBound(), and intMinMax_.
Referenced by getBounds(), and bpp::MixtureOfDiscreteDistributions::updateDistribution().
| double AbstractDiscreteDistribution::getValueCategory | ( | double | value | ) | const [virtual] |
| value |
Implements bpp::DiscreteDistribution.
Definition at line 289 of file AbstractDiscreteDistribution.cpp.
References bounds_, distribution_, intMinMax_, bpp::IntervalConstraint::isCorrect(), and bpp::TextTools::toString().
| virtual bool bpp::Parametrizable::hasParameter | ( | const std::string & | name | ) | const [pure virtual, inherited] |
Tell if there is a parameter with specified name.
| name | The name of the parameter to look for. |
Implemented in bpp::FunctionWrapper, bpp::ParametrizableAdapter, and bpp::AbstractParametrizable.
Referenced by bpp::FunctionWrapper::hasParameter().
| bool bpp::AbstractParametrizable::hasParameter | ( | const std::string & | name | ) | const [inline, virtual, inherited] |
Tell if there is a parameter with specified name.
| name | The name of the parameter to look for. |
Implements bpp::Parametrizable.
Definition at line 75 of file AbstractParametrizable.h.
References bpp::ParameterList::hasParameter(), bpp::AbstractParametrizable::parameters_, and bpp::AbstractParametrizable::prefix_.
Referenced by bpp::ConstantDistribution::fireParameterChanged().
| bool bpp::AbstractParametrizable::matchParametersValues | ( | const ParameterList & | parameters | ) | throw (ConstraintException) [inline, virtual, inherited] |
Update the parameters from parameters.
Only common parameters with parameters will be updated.
| parameters | A list of parameters. |
| ConstraintException | If a value in parameters does not match the constraint in the corresponding parameter in the list. |
Implements bpp::Parametrizable.
Definition at line 111 of file AbstractParametrizable.h.
References bpp::AbstractParametrizable::fireParameterChanged(), bpp::ParameterList::matchParametersValues(), and bpp::AbstractParametrizable::parameters_.
Referenced by bpp::Simplex::setFrequencies(), bpp::ReparametrizationFunctionWrapper::setParameters(), and bpp::TestFunction::setParameters().
| virtual bool bpp::Parametrizable::matchParametersValues | ( | const ParameterList & | parameters | ) | throw (ConstraintException) [pure virtual, inherited] |
Update the parameters from parameters.
Only common parameters with parameters will be updated.
| parameters | A list of parameters. |
| ConstraintException | If a value in parameters does not match the constraint in the corresponding parameter in the list. |
Implemented in bpp::InfinityFunctionWrapper, bpp::FunctionWrapper, bpp::AbstractNumericalDerivative, bpp::ParametrizableAdapter, and bpp::AbstractParametrizable.
Referenced by bpp::InvariantMixedDiscreteDistribution::fireParameterChanged(), bpp::AbstractNumericalDerivative::matchParametersValues(), bpp::FunctionWrapper::matchParametersValues(), and bpp::InfinityFunctionWrapper::matchParametersValues().
| AbstractDiscreteDistribution & AbstractDiscreteDistribution::operator= | ( | const AbstractDiscreteDistribution & | adde | ) |
Definition at line 77 of file AbstractDiscreteDistribution.cpp.
References bounds_, distribution_, intMinMax_, median_, and numberOfCategories_.
| virtual double bpp::DiscreteDistribution::pProb | ( | double | x | ) | const [pure virtual, inherited] |
Return the cumulative quantile of the continuous version of the distribution, ie
.
Implemented in bpp::MixtureOfDiscreteDistributions, bpp::SimpleDiscreteDistribution, bpp::InvariantMixedDiscreteDistribution, bpp::TruncatedExponentialDiscreteDistribution, bpp::BetaDiscreteDistribution, bpp::GammaDiscreteDistribution, bpp::ExponentialDiscreteDistribution, bpp::UniformDiscreteDistribution, bpp::GaussianDiscreteDistribution, and bpp::ConstantDistribution.
Referenced by discretize(), bpp::InvariantMixedDiscreteDistribution::pProb(), and bpp::InvariantMixedDiscreteDistribution::qProb().
| double bpp::AbstractDiscreteDistribution::precision | ( | ) | const [inline] |
Definition at line 216 of file AbstractDiscreteDistribution.h.
References distribution_.
Referenced by discretize(), bpp::BetaDiscreteDistribution::fireParameterChanged(), bpp::SimpleDiscreteDistribution::fireParameterChanged(), bpp::MixtureOfDiscreteDistributions::MixtureOfDiscreteDistributions(), and bpp::SimpleDiscreteDistribution::SimpleDiscreteDistribution().
| void AbstractDiscreteDistribution::print | ( | OutputStream & | out | ) | const [virtual] |
Print the distribution (categories and corresponding probabilities) to a stream.
| out | The outstream where to print the distribution. |
Implements bpp::DiscreteDistribution.
Definition at line 279 of file AbstractDiscreteDistribution.cpp.
References distribution_.
| virtual double bpp::DiscreteDistribution::qProb | ( | double | x | ) | const [pure virtual, inherited] |
Return the quantile of the continuous version of the distribution, ie y such that
.
Implemented in bpp::MixtureOfDiscreteDistributions, bpp::SimpleDiscreteDistribution, bpp::TruncatedExponentialDiscreteDistribution, bpp::InvariantMixedDiscreteDistribution, bpp::ExponentialDiscreteDistribution, bpp::BetaDiscreteDistribution, bpp::GammaDiscreteDistribution, bpp::UniformDiscreteDistribution, bpp::GaussianDiscreteDistribution, and bpp::ConstantDistribution.
Referenced by discretize(), and bpp::InvariantMixedDiscreteDistribution::qProb().
| double AbstractDiscreteDistribution::rand | ( | ) | const [virtual] |
Draw a random number from this distribution.
This number will be one of the class values, drawn according to the class probabilities.
Implements bpp::DiscreteDistribution.
Definition at line 197 of file AbstractDiscreteDistribution.cpp.
References distribution_, and bpp::RandomTools::giveRandomNumberBetweenZeroAndEntry().
| double bpp::AbstractDiscreteDistribution::randC | ( | ) | const throw (Exception) [inline, virtual] |
Draw a random number from the continuous version of this distribution, if it exists.
Uses the continuous version of this distribution to draw a random number.
| Exception | If there is no continuous version of this distribution. |
Implements bpp::DiscreteDistribution.
Reimplemented in bpp::TruncatedExponentialDiscreteDistribution, bpp::BetaDiscreteDistribution, bpp::ExponentialDiscreteDistribution, bpp::GammaDiscreteDistribution, bpp::GaussianDiscreteDistribution, bpp::UniformDiscreteDistribution, and bpp::ConstantDistribution.
Definition at line 171 of file AbstractDiscreteDistribution.h.
| void bpp::AbstractParameterAliasable::resetParameters_ | ( | ) | [inline, protected, inherited] |
Reimplemented from bpp::AbstractParametrizable.
Definition at line 209 of file AbstractParameterAliasable.h.
References bpp::AbstractParameterAliasable::independentParameters_, and bpp::ParameterList::reset().
| void AbstractDiscreteDistribution::restrictToConstraint | ( | const Constraint & | c | ) | [virtual] |
Restricts the distribution to the domain where the constraint is respected, in addition of other predefined constraints.
| c | The Constraint to respect. |
Implements bpp::DiscreteDistribution.
Reimplemented in bpp::MixtureOfDiscreteDistributions, bpp::SimpleDiscreteDistribution, bpp::InvariantMixedDiscreteDistribution, bpp::TruncatedExponentialDiscreteDistribution, and bpp::ConstantDistribution.
Definition at line 454 of file AbstractDiscreteDistribution.cpp.
References discretize(), and intMinMax_.
| void AbstractDiscreteDistribution::set | ( | double | category, |
| double | probability | ||
| ) | [virtual] |
Set the probability associated to a class.
If the category does not exist, a new category is created with the corresponding probability. If the category already exist, its probability is set to 'probability'. The sum of all probabilities is not checked.
| category | The class value. |
| probability | The class probability. |
Implements bpp::DiscreteDistribution.
Definition at line 174 of file AbstractDiscreteDistribution.cpp.
References distribution_.
| void bpp::AbstractParametrizable::setAllParametersValues | ( | const ParameterList & | parameters | ) | throw (ParameterNotFoundException, ConstraintException) [inline, virtual, inherited] |
Set the parameters values to be equals to those of parameters.
The list must contain exactly the same parameters (ie same names) than the parameters available.
| parameters | A list with all parameters. |
| ParameterNotFoundException | If a some parameter in the list is not in params. |
| ConstraintException | If a value in parameters does not match the constraint in the corresponding parameter in the list. |
Implements bpp::Parametrizable.
Definition at line 90 of file AbstractParametrizable.h.
References bpp::AbstractParametrizable::fireParameterChanged(), bpp::AbstractParametrizable::parameters_, and bpp::ParameterList::setAllParametersValues().
| virtual void bpp::Parametrizable::setAllParametersValues | ( | const ParameterList & | parameters | ) | throw (ParameterNotFoundException, ConstraintException) [pure virtual, inherited] |
Set the parameters values to be equals to those of parameters.
The list must contain exactly the same parameters (ie same names) than the parameters available.
| parameters | A list with all parameters. |
| ParameterNotFoundException | If a some parameter in the list is not in params. |
| ConstraintException | If a value in parameters does not match the constraint in the corresponding parameter in the list. |
Implemented in bpp::InfinityFunctionWrapper, bpp::FunctionWrapper, bpp::AbstractNumericalDerivative, bpp::ParametrizableAdapter, and bpp::AbstractParametrizable.
Referenced by bpp::AbstractNumericalDerivative::setAllParametersValues(), bpp::FunctionWrapper::setAllParametersValues(), and bpp::InfinityFunctionWrapper::setAllParametersValues().
| void bpp::AbstractDiscreteDistribution::setMedian | ( | bool | median | ) | [inline, virtual] |
Sets the median value to true to say that the value in a class is proportional to the median value of the class, the proportionality factor being such that the sum of the values equals the expectation of the distribution. If it is set to false, the value is the mean value in the class.
If the median value is modified, the discretization process is launched.
| median | tells how the value associated to each class is computed. |
Implements bpp::DiscreteDistribution.
Reimplemented in bpp::MixtureOfDiscreteDistributions, and bpp::InvariantMixedDiscreteDistribution.
Definition at line 218 of file AbstractDiscreteDistribution.h.
References discretize(), and median_.
| void AbstractParameterAliasable::setNamespace | ( | const std::string & | prefix | ) | [virtual, inherited] |
Set the namespace for the parameter names.
| prefix | The 'namespace', that is a prefix to add to all parameter names. If parameter names are already prefixed, the new prefix will be used instead. |
Reimplemented from bpp::AbstractParametrizable.
Reimplemented in bpp::MixtureOfDiscreteDistributions, and bpp::InvariantMixedDiscreteDistribution.
Definition at line 171 of file AbstractParameterAliasable.cpp.
References bpp::AbstractParameterAliasable::aliasListenersRegister_, bpp::AbstractParametrizable::getNamespace(), bpp::AbstractParameterAliasable::independentParameters_, bpp::ParameterList::size(), and bpp::TextTools::startsWith().
| virtual void bpp::Parametrizable::setNamespace | ( | const std::string & | prefix | ) | [pure virtual, inherited] |
Set the namespace for the parameter names.
| prefix | The 'namespace', that is a prefix to add to all parameter names. If parameter names are already prefixed, the new prefix will be used instead. |
Implemented in bpp::FunctionWrapper, bpp::ParametrizableAdapter, bpp::AbstractParameterAliasable, bpp::MixtureOfDiscreteDistributions, bpp::AbstractParametrizable, and bpp::InvariantMixedDiscreteDistribution.
Referenced by bpp::InvariantMixedDiscreteDistribution::InvariantMixedDiscreteDistribution(), bpp::InvariantMixedDiscreteDistribution::setNamespace(), and bpp::FunctionWrapper::setNamespace().
| void AbstractDiscreteDistribution::setNumberOfCategories | ( | size_t | nbClasses | ) | [virtual] |
sets the number of categories and discretizes if there is a change in this number.
Implements bpp::DiscreteDistribution.
Reimplemented in bpp::MixtureOfDiscreteDistributions.
Definition at line 96 of file AbstractDiscreteDistribution.cpp.
References discretize(), and numberOfCategories_.
| void bpp::AbstractParametrizable::setParametersValues | ( | const ParameterList & | parameters | ) | throw (ParameterNotFoundException, ConstraintException) [inline, virtual, inherited] |
Update the parameters from parameters.
parameters must be a subset of all parameters available.
| parameters | A list containing all parameters to update. |
| ParameterNotFoundException | If a some parameter in params is not in the list. |
| ConstraintException | If a value in parameters does not match the constraint in the corresponding parameter in the list. |
Implements bpp::Parametrizable.
Definition at line 104 of file AbstractParametrizable.h.
References bpp::AbstractParametrizable::fireParameterChanged(), bpp::AbstractParametrizable::parameters_, and bpp::ParameterList::setParametersValues().
Referenced by bpp::RescaledHmmLikelihood::setParameters(), bpp::LogsumHmmLikelihood::setParameters(), and bpp::LowMemoryRescaledHmmLikelihood::setParameters().
| virtual void bpp::Parametrizable::setParametersValues | ( | const ParameterList & | parameters | ) | throw (ParameterNotFoundException, ConstraintException) [pure virtual, inherited] |
Update the parameters from parameters.
parameters must be a subset of all parameters available.
| parameters | A list containing all parameters to update. |
| ParameterNotFoundException | If a some parameter in params is not in the list. |
| ConstraintException | If a value in parameters does not match the constraint in the corresponding parameter in the list. |
Implemented in bpp::InfinityFunctionWrapper, bpp::FunctionWrapper, bpp::AbstractNumericalDerivative, bpp::ParametrizableAdapter, and bpp::AbstractParametrizable.
Referenced by bpp::AbstractNumericalDerivative::setParametersValues(), bpp::FunctionWrapper::setParametersValues(), and bpp::InfinityFunctionWrapper::setParametersValues().
| void bpp::AbstractParametrizable::setParameterValue | ( | const std::string & | name, |
| double | value | ||
| ) | throw (ParameterNotFoundException, ConstraintException) [inline, virtual, inherited] |
Set the value of parameter with name name to be equal to value.
| name | the name of the parameter to set. |
| value | The value of the parameter. |
| ParameterNotFoundException | If no parameter in the list has the name name. |
| ConstraintException | If value does not match the constraint associated to parameter name. |
Implements bpp::Parametrizable.
Definition at line 97 of file AbstractParametrizable.h.
References bpp::AbstractParametrizable::fireParameterChanged(), bpp::AbstractParametrizable::parameters_, bpp::AbstractParametrizable::prefix_, bpp::ParameterList::setParameterValue(), and bpp::ParameterList::subList().
| virtual void bpp::Parametrizable::setParameterValue | ( | const std::string & | name, |
| double | value | ||
| ) | throw (ParameterNotFoundException, ConstraintException) [pure virtual, inherited] |
Set the value of parameter with name name to be equal to value.
| name | the name of the parameter to set. |
| value | The value of the parameter. |
| ParameterNotFoundException | If no parameter in the list has the name name. |
| ConstraintException | If value does not match the constraint associated to parameter name. |
Implemented in bpp::InfinityFunctionWrapper, bpp::FunctionWrapper, bpp::AbstractNumericalDerivative, bpp::ParametrizableAdapter, and bpp::AbstractParametrizable.
Referenced by bpp::AbstractNumericalDerivative::setParameterValue(), bpp::FunctionWrapper::setParameterValue(), and bpp::InfinityFunctionWrapper::setParameterValue().
| bool bpp::AbstractDiscreteDistribution::strictLowerBound | ( | ) | const [inline, virtual] |
Reimplemented from bpp::DiscreteDistribution.
Definition at line 202 of file AbstractDiscreteDistribution.h.
References intMinMax_, and bpp::IntervalConstraint::strictLowerBound().
| bool bpp::AbstractDiscreteDistribution::strictUpperBound | ( | ) | const [inline, virtual] |
Reimplemented from bpp::DiscreteDistribution.
Definition at line 207 of file AbstractDiscreteDistribution.h.
References intMinMax_, and bpp::IntervalConstraint::strictUpperBound().
| virtual void bpp::ParameterAliasable::unaliasParameters | ( | const std::string & | p1, |
| const std::string & | p2 | ||
| ) | throw (ParameterNotFoundException, Exception) [pure virtual, inherited] |
Detach two parameters previously set as 'aliased'.
The values of the two parameters will now be independent.
| p1 | Original parameter. |
| p2 | Aliased parameter. |
| ParameterNotFoundException | if p1 or p2 do not correspond to existing parameters. |
| Exception | when trying to perform non-valid dissociation. |
Implemented in bpp::AbstractParameterAliasable.
| void AbstractParameterAliasable::unaliasParameters | ( | const std::string & | p1, |
| const std::string & | p2 | ||
| ) | throw (ParameterNotFoundException, Exception) [virtual, inherited] |
Detach two parameters previously set as 'aliased'.
The values of the two parameters will now be independent.
| p1 | Original parameter. |
| p2 | Aliased parameter. |
| ParameterNotFoundException | if p1 or p2 do not correspond to existing parameters. |
| Exception | when trying to perform non-valid dissociation. |
Implements bpp::ParameterAliasable.
Definition at line 151 of file AbstractParameterAliasable.cpp.
std::vector<double> bpp::AbstractDiscreteDistribution::bounds_ [protected] |
Definition at line 117 of file AbstractDiscreteDistribution.h.
Referenced by bpp::SimpleDiscreteDistribution::discretize(), discretize(), getBound(), getValueCategory(), operator=(), bpp::InvariantMixedDiscreteDistribution::updateDistribution(), and bpp::MixtureOfDiscreteDistributions::updateDistribution().
std::map<double, double, Order> bpp::AbstractDiscreteDistribution::distribution_ [protected] |
These fields must be initialized in the constructor of the derived classes.
Definition at line 115 of file AbstractDiscreteDistribution.h.
Referenced by add(), bpp::ConstantDistribution::ConstantDistribution(), bpp::SimpleDiscreteDistribution::discretize(), discretize(), bpp::SimpleDiscreteDistribution::Expectation(), bpp::ConstantDistribution::fireParameterChanged(), bpp::SimpleDiscreteDistribution::fireParameterChanged(), getCategories(), getCategory(), getIInfCumulativeProbability(), getInfCumulativeProbability(), bpp::SimpleDiscreteDistribution::getLowerBound(), getProbabilities(), getProbability(), getSSupCumulativeProbability(), getSupCumulativeProbability(), bpp::SimpleDiscreteDistribution::getUpperBound(), getValueCategory(), operator=(), bpp::SimpleDiscreteDistribution::pProb(), precision(), print(), bpp::SimpleDiscreteDistribution::qProb(), rand(), bpp::SimpleDiscreteDistribution::restrictToConstraint(), set(), bpp::SimpleDiscreteDistribution::SimpleDiscreteDistribution(), bpp::InvariantMixedDiscreteDistribution::updateDistribution(), and bpp::MixtureOfDiscreteDistributions::updateDistribution().
the interval where the distribution is defined/restricted.
Definition at line 124 of file AbstractDiscreteDistribution.h.
Referenced by bpp::BetaDiscreteDistribution::BetaDiscreteDistribution(), discretize(), bpp::ExponentialDiscreteDistribution::ExponentialDiscreteDistribution(), bpp::BetaDiscreteDistribution::fireParameterChanged(), bpp::TruncatedExponentialDiscreteDistribution::fireParameterChanged(), bpp::SimpleDiscreteDistribution::fireParameterChanged(), bpp::GammaDiscreteDistribution::GammaDiscreteDistribution(), getLowerBound(), getUpperBound(), getValueCategory(), operator=(), bpp::UniformDiscreteDistribution::randC(), bpp::GammaDiscreteDistribution::randC(), bpp::ExponentialDiscreteDistribution::randC(), bpp::BetaDiscreteDistribution::randC(), bpp::TruncatedExponentialDiscreteDistribution::randC(), bpp::ConstantDistribution::restrictToConstraint(), bpp::TruncatedExponentialDiscreteDistribution::restrictToConstraint(), bpp::SimpleDiscreteDistribution::restrictToConstraint(), restrictToConstraint(), strictLowerBound(), strictUpperBound(), bpp::TruncatedExponentialDiscreteDistribution::TruncatedExponentialDiscreteDistribution(), bpp::UniformDiscreteDistribution::UniformDiscreteDistribution(), bpp::InvariantMixedDiscreteDistribution::updateDistribution(), and bpp::MixtureOfDiscreteDistributions::updateDistribution().
bool bpp::AbstractDiscreteDistribution::median_ [protected] |
Tells if the values in the classes is associated to the median or not (default: false)
Definition at line 131 of file AbstractDiscreteDistribution.h.
Referenced by discretize(), operator=(), bpp::InvariantMixedDiscreteDistribution::setMedian(), bpp::MixtureOfDiscreteDistributions::setMedian(), and setMedian().
size_t bpp::AbstractDiscreteDistribution::numberOfCategories_ [protected] |
Definition at line 111 of file AbstractDiscreteDistribution.h.
Referenced by bpp::SimpleDiscreteDistribution::discretize(), discretize(), getBound(), getBounds(), getNumberOfCategories(), operator=(), setNumberOfCategories(), bpp::SimpleDiscreteDistribution::SimpleDiscreteDistribution(), bpp::InvariantMixedDiscreteDistribution::updateDistribution(), and bpp::MixtureOfDiscreteDistributions::updateDistribution().