19 std::shared_ptr<const NucleicAlphabet> alphabet,
45 std::shared_ptr<const NucleicAlphabet> alphabet,
77 getFreq_(3) = (1 - theta1) * (1. - theta);
82 if (frequencies.size() != 4)
83 throw DimensionException(
" FullNucleotideFrequencySet::setFrequencies", frequencies.size(), 4);
85 for (
auto& f : frequencies)
91 double theta = frequencies[1] + frequencies[2];
104 getFreq_(0) = theta1 * (1. - theta);
107 getFreq_(3) = (1 - theta1) * (1. - theta);
115 if (frequencies.size() != 4)
118 for (
unsigned int i = 0; i < 4; i++)
120 sum += frequencies[i];
124 double theta = frequencies[1] + frequencies[2];
Basic implementation of the FrequencySet interface.
void setFrequencies_(const std::vector< double > &frequencies)
double & getFreq_(size_t i)
void addParameter_(Parameter *parameter)
Parameter & getParameter_(const std::string &name)
This class implements a state map where all resolved states are modeled.
static std::shared_ptr< IntervalConstraint > FREQUENCE_CONSTRAINT_CENTI
void fireParameterChanged(const ParameterList ¶meters) override
FullNucleotideFrequencySet(std::shared_ptr< const NucleicAlphabet > alphabet, bool allowNullFreqs=false, const std::string &name="Full")
void setFrequencies(const std::vector< double > &frequencies) override
Set the parameters in order to match a given set of frequencies.
void setFrequencies(const std::vector< double > &frequencies) override
Set the parameters in order to match a given set of frequencies.
void fireParameterChanged(const ParameterList ¶meters) override
virtual void setValue(double value)
static const std::shared_ptr< IntervalConstraint > PROP_CONSTRAINT_IN
virtual double getValue() const
static const std::shared_ptr< IntervalConstraint > PROP_CONSTRAINT_EX
std::string toString(T t)
Defines the basic types of data flow nodes.