41 #ifndef BPP_NUMERIC_PROB_SIMPLEX_H
42 #define BPP_NUMERIC_PROB_SIMPLEX_H
49 #include "../AbstractParameterAliasable.h"
145 Simplex(
size_t dim,
unsigned short method = 0,
bool allowNull =
false,
const std::string& name =
"Simplex.");
160 Simplex(
const std::vector<double>& probas,
unsigned short method = 0,
bool allowNull =
false,
const std::string& name =
"Simplex.");
A partial implementation of the Parametrizable interface.
The parameter list object.
A Simplex object, used to define sets of probabilities that sum 1.
unsigned short getMethod() const
double prob(size_t i) const
unsigned short method_
the method of parametrization.
const std::vector< double > & getFrequencies() const
Simplex * clone() const
Create a copy of this object and send a pointer to it.
void fireParameterChanged(const ParameterList ¶meters)
Notify the class when one or several parameters have changed.
std::vector< double > vProb_
size_t dim_
The dimension+1 of the space simplex (ie the number of probabilities).
std::vector< double > valpha_
just used with local ratio (method 2)
void setFrequencies(const std::vector< double > &)
std::vector< double > & getFrequencies()
Simplex(size_t dim, unsigned short method=0, bool allowNull=false, const std::string &name="Simplex.")
Builds a new Simplex object from a number of probabilities. They are initialized equal.