5 #ifndef BPP_PHYL_MODEL_FREQUENCYSET_WORDFREQUENCYSET_H
6 #define BPP_PHYL_MODEL_FREQUENCYSET_WORDFREQUENCYSET_H
32 virtual size_t getSizeFromVector(
const std::vector<std::unique_ptr<FrequencySetInterface>>& freqVector) = 0;
56 size_t getSizeFromVector(
const std::vector<std::unique_ptr<FrequencySetInterface>>& freqVector)
override;
74 return std::dynamic_pointer_cast<const CoreWordAlphabet>(
getAlphabet());
95 std::vector<std::unique_ptr<FrequencySetInterface>>
vFreq_;
104 std::shared_ptr<const WordAlphabet> pWA,
105 std::vector<std::unique_ptr<FrequencySetInterface>>& freqVector,
106 const std::string& prefix =
"",
107 const std::string& name =
"WordFromIndependent");
110 std::shared_ptr<const CodonAlphabet> pWA,
111 std::vector<std::unique_ptr<FrequencySetInterface>>& freqVector,
112 const std::string& prefix =
"",
113 const std::string& name =
"WordFromIndependent");
137 virtual void setFrequencies(
const std::vector<double>& frequencies)
override;
150 virtual size_t getLength()
const override;
161 std::unique_ptr<FrequencySetInterface>
pFreq_;
171 std::shared_ptr<const WordAlphabet> pWA,
172 std::unique_ptr<FrequencySetInterface> pabsfreq,
173 const std::string& prefix =
"",
174 const std::string& name =
"WordFromUnique");
177 std::shared_ptr<const CodonAlphabet> pWA,
178 std::unique_ptr<FrequencySetInterface> pabsfreq,
179 const std::string& prefix =
"",
180 const std::string& name =
"WordFromUnique");
203 virtual void setFrequencies(
const std::vector<double>& frequencies)
override;
Basic implementation of the FrequencySet interface.
std::shared_ptr< const Alphabet > getAlphabet() const override
AbstractFrequencySet & operator=(const AbstractFrequencySet &af)
const StateMapInterface & stateMap() const override
size_t getLength() const override
AbstractWordFrequencySet(const AbstractWordFrequencySet &af)
virtual ~AbstractWordFrequencySet()
std::shared_ptr< const CoreWordAlphabet > getWordAlphabet() const override
AbstractWordFrequencySet & operator=(const AbstractWordFrequencySet &af)
AbstractWordFrequencySet * clone() const override=0
AbstractWordFrequencySet(std::shared_ptr< const StateMapInterface > stateMap, const std::string &prefix="", const std::string &name="")
size_t getSizeFromVector(const std::vector< std::unique_ptr< FrequencySetInterface >> &freqVector) override
Parametrize a set of state frequencies.
Frequencies in words computed from the frequencies on letters. The parameters are the parameters of t...
virtual size_t getLength() const =0
Returns the length of the words.
virtual const FrequencySetInterface & frequencySetForLetter(size_t i) const =0
Returns the n-th FrequencySet.
virtual size_t getSizeFromVector(const std::vector< std::unique_ptr< FrequencySetInterface >> &freqVector)=0
WordFrequencySetInterface * clone() const override=0
virtual std::shared_ptr< const CoreWordAlphabet > getWordAlphabet() const =0
the Frequencies in words are the product of Independent Frequencies in letters
WordFromIndependentFrequencySet(std::shared_ptr< const WordAlphabet > pWA, std::vector< std::unique_ptr< FrequencySetInterface >> &freqVector, const std::string &prefix="", const std::string &name="WordFromIndependent")
Constructor from a WordAlphabet* and a vector of different std::shared_ptr<FrequencySet>....
virtual ~WordFromIndependentFrequencySet()
std::vector< std::string > vNestedPrefix_
virtual void updateFrequencies()
WordFromIndependentFrequencySet & operator=(const WordFromIndependentFrequencySet &iwfs)
const FrequencySetInterface & frequencySetForLetter(size_t i) const override
Return the n-th FrequencySet&.
WordFromIndependentFrequencySet * clone() const override
std::string getDescription() const
virtual size_t getLength() const override
Return the length of the words.
void setNamespace(const std::string &prefix) override
void fireParameterChanged(const ParameterList &pl) override
std::vector< std::unique_ptr< FrequencySetInterface > > vFreq_
virtual void setFrequencies(const std::vector< double > &frequencies) override
Independent letter frequencies from given word frequencies. The frequencies of a letter at a position...
virtual ~WordFromUniqueFrequencySet()
std::string NestedPrefix_
size_t getLength() const override
std::string getDescription() const
virtual void fireParameterChanged(const ParameterList &pl) override
std::unique_ptr< FrequencySetInterface > pFreq_
WordFromUniqueFrequencySet * clone() const override
virtual void updateFrequencies()
WordFromUniqueFrequencySet & operator=(const WordFromUniqueFrequencySet &iwfs)
const FrequencySetInterface & frequencySetForLetter(size_t i) const override
Return the n-th FrequencySet&.
virtual void setFrequencies(const std::vector< double > &frequencies) override
letter frequencies from given word frequencies. The frequencies of a letter at a position is the sum ...
WordFromUniqueFrequencySet(std::shared_ptr< const WordAlphabet > pWA, std::unique_ptr< FrequencySetInterface > pabsfreq, const std::string &prefix="", const std::string &name="WordFromUnique")
Constructor from a WordAlphabet* and a std::shared_ptr<FrequencySet> repeated as many times as the le...
void setNamespace(const std::string &prefix) override
Defines the basic types of data flow nodes.