|
bpp-phyl
2.1.0
|
#include <Bpp/Phyl/Model/FrequenciesSet/WordFrequenciesSet.h>
Inheritance diagram for bpp::WordFromUniqueFrequenciesSet:
Collaboration diagram for bpp::WordFromUniqueFrequenciesSet:Public Member Functions | |
| WordFromUniqueFrequenciesSet (const WordAlphabet *pWA, FrequenciesSet *pabsfreq, const std::string &prefix="", const std::string &name="WordFromUnique") | |
| Constructor from a WordAlphabet* and a FrequenciesSet* repeated as many times as the length of the words. | |
| WordFromUniqueFrequenciesSet (const WordFromUniqueFrequenciesSet &iwfs) | |
| WordFromUniqueFrequenciesSet & | operator= (const WordFromUniqueFrequenciesSet &iwfs) |
| ~WordFromUniqueFrequenciesSet () | |
| WordFromUniqueFrequenciesSet * | clone () const |
| virtual void | fireParameterChanged (const ParameterList &pl) |
| virtual void | setFrequencies (const std::vector< double > &frequencies) |
| virtual void | updateFrequencies () |
| const FrequenciesSet & | getFrequenciesSetForLetter (size_t i) const |
| size_t | getLength () const |
| void | setNamespace (const std::string &prefix) |
| std::string | getDescription () const |
| const WordAlphabet * | getAlphabet () const |
| virtual const std::vector < double > & | getFrequencies () const =0 |
| const std::vector< double > & | getFrequencies () const |
| virtual void | setFrequenciesFromMap (const std::map< int, double > &frequencies)=0 |
| Set the Frequencies from the one of the map which keys match with a letter of the Alphabet. The frequencies are normalized so that the matching values sum 1. | |
| void | setFrequenciesFromMap (const std::map< int, double > &frequencies) |
| Set the Frequencies from the one of the map which keys match with a letter of the Alphabet. The frequencies are normalized so that the matching values sum 1. | |
| virtual std::string | getName () const =0 |
| std::string | getName () const |
| virtual size_t | getNumberOfFrequencies () const =0 |
| size_t | getNumberOfFrequencies () const |
| virtual bool | hasParameter (const std::string &name) const =0 |
| bool | hasParameter (const std::string &name) const |
| virtual const ParameterList & | getParameters () const =0 |
| const ParameterList & | getParameters () const |
| virtual const Parameter & | getParameter (const std::string &name) const =0 |
| const Parameter & | getParameter (const std::string &name) const |
| virtual double | getParameterValue (const std::string &name) const =0 |
| double | getParameterValue (const std::string &name) const |
| virtual void | setAllParametersValues (const ParameterList ¶meters)=0 |
| void | setAllParametersValues (const ParameterList ¶meters) |
| virtual void | setParameterValue (const std::string &name, double value)=0 |
| void | setParameterValue (const std::string &name, double value) |
| virtual void | setParametersValues (const ParameterList ¶meters)=0 |
| void | setParametersValues (const ParameterList ¶meters) |
| virtual bool | matchParametersValues (const ParameterList ¶meters)=0 |
| bool | matchParametersValues (const ParameterList ¶meters) |
| virtual size_t | getNumberOfParameters () const =0 |
| size_t | getNumberOfParameters () const |
| virtual std::string | getNamespace () const =0 |
| std::string | getNamespace () const |
| virtual std::string | getParameterNameWithoutNamespace (const std::string &name) const =0 |
| std::string | getParameterNameWithoutNamespace (const std::string &name) const |
Static Public Attributes | |
| static IntervalConstraint | FREQUENCE_CONSTRAINT_SMALL |
| static IntervalConstraint | FREQUENCE_CONSTRAINT_MILLI |
Protected Member Functions | |
| size_t | getSizeFromVector (const std::vector< FrequenciesSet * > &freqVector) |
| std::vector< double > & | getFrequencies_ () |
| double & | getFreq_ (size_t i) |
| const double & | getFreq_ (size_t i) const |
| void | setFrequencies_ (const std::vector< double > &frequencies) |
| void | addParameter_ (Parameter *parameter) |
| void | addParameters_ (const ParameterList ¶meters) |
| void | deleteParameter_ (size_t index) |
| void | resetParameters_ () |
| Parameter & | getParameter_ (const std::string &name) |
| Parameter & | getParameter_ (size_t index) |
| const Parameter & | getParameter_ (size_t index) const |
| Parameter & | getParameterWithNamespace_ (const std::string &name) |
| const Parameter & | getParameterWithNamespace_ (const std::string &name) const |
| ParameterList & | getParameters_ () |
Protected Attributes | |
| FrequenciesSet * | pFreq_ |
| std::string | NestedPrefix_ |
| size_t | length_ |
Definition at line 190 of file WordFrequenciesSet.h.
| WordFromUniqueFrequenciesSet::WordFromUniqueFrequenciesSet | ( | const WordAlphabet * | pWA, |
| FrequenciesSet * | pabsfreq, | ||
| const std::string & | prefix = "", |
||
| const std::string & | name = "WordFromUnique" |
||
| ) |
Constructor from a WordAlphabet* and a FrequenciesSet* repeated as many times as the length of the words.
Definition at line 254 of file WordFrequenciesSet.cpp.
References bpp::AbstractParametrizable::addParameters_(), bpp::Parametrizable::getParameters(), length_, NestedPrefix_, pFreq_, bpp::Parametrizable::setNamespace(), bpp::TextTools::toString(), and updateFrequencies().
Referenced by clone().
| WordFromUniqueFrequenciesSet::WordFromUniqueFrequenciesSet | ( | const WordFromUniqueFrequenciesSet & | iwfs | ) |
Definition at line 277 of file WordFrequenciesSet.cpp.
References updateFrequencies().
Definition at line 299 of file WordFrequenciesSet.cpp.
References pFreq_.
| WordFromUniqueFrequenciesSet* bpp::WordFromUniqueFrequenciesSet::clone | ( | ) | const [inline, virtual] |
Implements bpp::AbstractWordFrequenciesSet.
Reimplemented in bpp::CodonFromUniqueFrequenciesSet.
Definition at line 211 of file WordFrequenciesSet.h.
References WordFromUniqueFrequenciesSet().
| void WordFromUniqueFrequenciesSet::fireParameterChanged | ( | const ParameterList & | pl | ) | [virtual] |
Implements bpp::AbstractParametrizable.
Definition at line 306 of file WordFrequenciesSet.cpp.
References bpp::Parametrizable::matchParametersValues(), pFreq_, and updateFrequencies().
| const WordAlphabet* bpp::AbstractWordFrequenciesSet::getAlphabet | ( | ) | const [inline, virtual, inherited] |
Reimplemented from bpp::AbstractFrequenciesSet.
Reimplemented in bpp::CodonFromUniqueFrequenciesSet, and bpp::CodonFromIndependentFrequenciesSet.
Definition at line 118 of file WordFrequenciesSet.h.
Referenced by bpp::AbstractWordFrequenciesSet::getLength(), bpp::WordFromIndependentFrequenciesSet::setFrequencies(), setFrequencies(), bpp::WordFromIndependentFrequenciesSet::updateFrequencies(), and updateFrequencies().
| string WordFromUniqueFrequenciesSet::getDescription | ( | ) | const |
Definition at line 391 of file WordFrequenciesSet.cpp.
References bpp::FrequenciesSet::getName(), bpp::AbstractFrequenciesSet::getName(), length_, pFreq_, and bpp::TextTools::toString().
| double& bpp::AbstractFrequenciesSet::getFreq_ | ( | size_t | i | ) | [inline, protected, inherited] |
Definition at line 161 of file FrequenciesSet.h.
References bpp::AbstractFrequenciesSet::freq_.
Referenced by bpp::GCFrequenciesSet::fireParameterChanged(), bpp::FullCodonFrequenciesSet::fireParameterChanged(), bpp::FullNucleotideFrequenciesSet::fireParameterChanged(), bpp::FullFrequenciesSet::fireParameterChanged(), bpp::FixedCodonFrequenciesSet::FixedCodonFrequenciesSet(), bpp::FixedFrequenciesSet::FixedFrequenciesSet(), bpp::FullCodonFrequenciesSet::FullCodonFrequenciesSet(), bpp::FullFrequenciesSet::FullFrequenciesSet(), bpp::FullNucleotideFrequenciesSet::FullNucleotideFrequenciesSet(), bpp::GCFrequenciesSet::GCFrequenciesSet(), bpp::GCFrequenciesSet::setFrequencies(), bpp::FullCodonFrequenciesSet::setFrequencies(), bpp::FixedCodonFrequenciesSet::setFrequencies(), bpp::MvaFrequenciesSet::updateFrequencies(), bpp::WordFromIndependentFrequenciesSet::updateFrequencies(), bpp::FullPerAACodonFrequenciesSet::updateFrequencies(), updateFrequencies(), bpp::CodonFromIndependentFrequenciesSet::updateFrequencies(), and bpp::CodonFromUniqueFrequenciesSet::updateFrequencies().
| const double& bpp::AbstractFrequenciesSet::getFreq_ | ( | size_t | i | ) | const [inline, protected, inherited] |
Definition at line 162 of file FrequenciesSet.h.
References bpp::AbstractFrequenciesSet::freq_.
| virtual const std::vector<double>& bpp::FrequenciesSet::getFrequencies | ( | ) | const [pure virtual, inherited] |
Implemented in bpp::AbstractFrequenciesSet.
Referenced by bpp::AbstractCodonPhaseFrequenciesSubstitutionModel::AbstractCodonPhaseFrequenciesSubstitutionModel(), bpp::DSO78::DSO78(), bpp::LG08::fireParameterChanged(), bpp::DSO78::fireParameterChanged(), bpp::JTT92::fireParameterChanged(), bpp::WAG01::fireParameterChanged(), bpp::UserProteinSubstitutionModel::fireParameterChanged(), bpp::JCprot::fireParameterChanged(), bpp::MarkovModulatedFrequenciesSet::fireParameterChanged(), bpp::AbstractCodonFitnessSubstitutionModel::getCodonsMulRate(), bpp::AbstractCodonFrequenciesSubstitutionModel::getCodonsMulRate(), bpp::AbstractCodonPhaseFrequenciesSubstitutionModel::getCodonsMulRate(), bpp::JCprot::JCprot(), bpp::JTT92::JTT92(), bpp::LG08::LG08(), bpp::MarkovModulatedFrequenciesSet::MarkovModulatedFrequenciesSet(), bpp::FullPerAACodonFrequenciesSet::updateFrequencies(), updateFrequencies(), bpp::UserProteinSubstitutionModel::UserProteinSubstitutionModel(), bpp::WAG01::WAG01(), and bpp::BppOFrequenciesSetFormat::write().
| const std::vector<double>& bpp::AbstractFrequenciesSet::getFrequencies | ( | ) | const [inline, virtual, inherited] |
Implements bpp::FrequenciesSet.
Definition at line 151 of file FrequenciesSet.h.
References bpp::AbstractFrequenciesSet::freq_.
Referenced by bpp::MvaFrequenciesSet::updateFrequencies().
| std::vector<double>& bpp::AbstractFrequenciesSet::getFrequencies_ | ( | ) | [inline, protected, inherited] |
Definition at line 160 of file FrequenciesSet.h.
References bpp::AbstractFrequenciesSet::freq_.
| const FrequenciesSet& bpp::WordFromUniqueFrequenciesSet::getFrequenciesSetForLetter | ( | size_t | i | ) | const [inline, virtual] |
@ brief Return the n-th FrequenciesSet&
Implements bpp::WordFrequenciesSet.
Definition at line 230 of file WordFrequenciesSet.h.
References pFreq_.
Referenced by bpp::BppOFrequenciesSetFormat::write().
| size_t bpp::WordFromUniqueFrequenciesSet::getLength | ( | ) | const [inline, virtual] |
@ brief Return the length of the words
Reimplemented from bpp::AbstractWordFrequenciesSet.
Definition at line 232 of file WordFrequenciesSet.h.
References length_.
Referenced by bpp::BppOFrequenciesSetFormat::write().
| virtual std::string bpp::FrequenciesSet::getName | ( | ) | const [pure virtual, inherited] |
Implemented in bpp::AbstractFrequenciesSet.
Referenced by bpp::AbstractCodonFrequenciesSubstitutionModel::AbstractCodonFrequenciesSubstitutionModel(), bpp::AbstractCodonPhaseFrequenciesSubstitutionModel::AbstractCodonPhaseFrequenciesSubstitutionModel(), bpp::FullPerAACodonFrequenciesSet::FullPerAACodonFrequenciesSet(), getDescription(), bpp::PhylogeneticsApplicationTools::getRootFrequenciesSet(), bpp::BppOFrequenciesSetFormat::read(), bpp::FullPerAACodonFrequenciesSet::setNamespace(), and bpp::BppOFrequenciesSetFormat::write().
| std::string bpp::AbstractFrequenciesSet::getName | ( | ) | const [inline, virtual, inherited] |
Implements bpp::FrequenciesSet.
Definition at line 157 of file FrequenciesSet.h.
References bpp::AbstractFrequenciesSet::name_.
Referenced by bpp::WordFromIndependentFrequenciesSet::getDescription(), and getDescription().
| virtual size_t bpp::FrequenciesSet::getNumberOfFrequencies | ( | ) | const [pure virtual, inherited] |
Implemented in bpp::AbstractFrequenciesSet.
| size_t bpp::AbstractFrequenciesSet::getNumberOfFrequencies | ( | ) | const [inline, virtual, inherited] |
Implements bpp::FrequenciesSet.
Definition at line 155 of file FrequenciesSet.h.
References bpp::AbstractFrequenciesSet::freq_.
Referenced by bpp::FullFrequenciesSet::setFrequencies(), and bpp::FixedFrequenciesSet::setFrequencies().
| size_t AbstractWordFrequenciesSet::getSizeFromVector | ( | const std::vector< FrequenciesSet * > & | freqVector | ) | [protected, virtual, inherited] |
Implements bpp::WordFrequenciesSet.
Definition at line 48 of file WordFrequenciesSet.cpp.
Referenced by bpp::WordFromIndependentFrequenciesSet::WordFromIndependentFrequenciesSet().
| WordFromUniqueFrequenciesSet & WordFromUniqueFrequenciesSet::operator= | ( | const WordFromUniqueFrequenciesSet & | iwfs | ) |
Definition at line 287 of file WordFrequenciesSet.cpp.
References bpp::FrequenciesSet::clone(), length_, NestedPrefix_, pFreq_, and updateFrequencies().
| void WordFromUniqueFrequenciesSet::setFrequencies | ( | const std::vector< double > & | frequencies | ) | [virtual] |
@ brief letter frequencies from given word frequencies. The frequencies of a letter at a position is the sum of the frequencies of the words that have this letter at this position. The frequencies of each letter is the average of the frequencies of that letter at all positions.
Implements bpp::FrequenciesSet.
Definition at line 334 of file WordFrequenciesSet.cpp.
References bpp::FrequenciesSet::getAlphabet(), bpp::AbstractWordFrequenciesSet::getAlphabet(), bpp::Parametrizable::getParameters(), bpp::WordAlphabet::getSize(), bpp::Alphabet::getSize(), length_, bpp::AbstractParametrizable::matchParametersValues(), pFreq_, bpp::FrequenciesSet::setFrequencies(), bpp::TextTools::toString(), and updateFrequencies().
| void bpp::AbstractFrequenciesSet::setFrequencies_ | ( | const std::vector< double > & | frequencies | ) | [inline, protected, inherited] |
Definition at line 163 of file FrequenciesSet.h.
References bpp::AbstractFrequenciesSet::freq_.
Referenced by bpp::MarkovModulatedFrequenciesSet::fireParameterChanged(), bpp::MarkovModulatedFrequenciesSet::MarkovModulatedFrequenciesSet(), bpp::FullNucleotideFrequenciesSet::setFrequencies(), bpp::FullFrequenciesSet::setFrequencies(), bpp::FixedFrequenciesSet::setFrequencies(), and bpp::MvaFrequenciesSet::updateFrequencies().
| virtual void bpp::FrequenciesSet::setFrequenciesFromMap | ( | const std::map< int, double > & | frequencies | ) | [pure virtual, inherited] |
Set the Frequencies from the one of the map which keys match with a letter of the Alphabet. The frequencies are normalized so that the matching values sum 1.
| frequencies | The set of frequencies to match. |
Implemented in bpp::AbstractFrequenciesSet.
Referenced by bpp::BppOFrequenciesSetFormat::initialize_(), bpp::AbstractCodonFitnessSubstitutionModel::setFreq(), bpp::AbstractCodonFrequenciesSubstitutionModel::setFreq(), and bpp::AbstractCodonPhaseFrequenciesSubstitutionModel::setFreq().
| void AbstractFrequenciesSet::setFrequenciesFromMap | ( | const std::map< int, double > & | frequencies | ) | [virtual, inherited] |
Set the Frequencies from the one of the map which keys match with a letter of the Alphabet. The frequencies are normalized so that the matching values sum 1.
| frequencies | The set of frequencies to match. |
Implements bpp::FrequenciesSet.
Definition at line 58 of file FrequenciesSet.cpp.
| void WordFromUniqueFrequenciesSet::setNamespace | ( | const std::string & | prefix | ) | [virtual] |
Reimplemented from bpp::AbstractParametrizable.
Definition at line 379 of file WordFrequenciesSet.cpp.
References length_, NestedPrefix_, pFreq_, bpp::Parametrizable::setNamespace(), and bpp::TextTools::toString().
| void WordFromUniqueFrequenciesSet::updateFrequencies | ( | ) | [virtual] |
Reimplemented in bpp::CodonFromUniqueFrequenciesSet.
Definition at line 312 of file WordFrequenciesSet.cpp.
References bpp::FrequenciesSet::getAlphabet(), bpp::AbstractWordFrequenciesSet::getAlphabet(), bpp::AbstractFrequenciesSet::getFreq_(), bpp::FrequenciesSet::getFrequencies(), bpp::Alphabet::getSize(), bpp::WordAlphabet::getSize(), length_, and pFreq_.
Referenced by fireParameterChanged(), operator=(), setFrequencies(), and WordFromUniqueFrequenciesSet().
IntervalConstraint FrequenciesSet::FREQUENCE_CONSTRAINT_MILLI [static, inherited] |
Definition at line 101 of file FrequenciesSet.h.
Referenced by bpp::FullCodonFrequenciesSet::FullCodonFrequenciesSet().
IntervalConstraint FrequenciesSet::FREQUENCE_CONSTRAINT_SMALL [static, inherited] |
Definition at line 100 of file FrequenciesSet.h.
Referenced by bpp::F84::F84(), bpp::FullFrequenciesSet::FullFrequenciesSet(), bpp::FullNucleotideFrequenciesSet::FullNucleotideFrequenciesSet(), bpp::GTR::GTR(), bpp::HKY85::HKY85(), bpp::T92::T92(), and bpp::TN93::TN93().
size_t bpp::WordFromUniqueFrequenciesSet::length_ [protected] |
Definition at line 196 of file WordFrequenciesSet.h.
Referenced by getDescription(), getLength(), operator=(), setFrequencies(), setNamespace(), updateFrequencies(), and WordFromUniqueFrequenciesSet().
std::string bpp::WordFromUniqueFrequenciesSet::NestedPrefix_ [protected] |
Definition at line 195 of file WordFrequenciesSet.h.
Referenced by operator=(), setNamespace(), and WordFromUniqueFrequenciesSet().
FrequenciesSet* bpp::WordFromUniqueFrequenciesSet::pFreq_ [protected] |
Definition at line 194 of file WordFrequenciesSet.h.
Referenced by fireParameterChanged(), getDescription(), getFrequenciesSetForLetter(), operator=(), setFrequencies(), setNamespace(), updateFrequencies(), WordFromUniqueFrequenciesSet(), and ~WordFromUniqueFrequenciesSet().