ppALIGN API documentation
Frequencies Class Reference
#include <frequencies.hpp>
Public Member Functions | |
| Frequencies (const Alphabet &a) | |
| void | Normalize (bool setupUIPAC=false) |
| void | Reset () |
| double & | operator[] (unsigned long i) |
| const double & | operator[] (unsigned long i) const |
| double & | operator[] (unsigned int i) |
| const double & | operator[] (unsigned int i) const |
| double & | operator[] (int i) |
| const double & | operator[] (int i) const |
| double & | operator[] (char ch) |
| const double & | operator[] (char ch) const |
| void | Count (const Sequence &seq) |
Access to probabilities. | |
| double | GetNormWeight (size_t i) const |
| double | GetLogWeight (size_t i) const |
| double | GetCumWeight (size_t i) const |
Randomization. | |
| int | RandomLetter (DRand48 &rng) const |
| void | RandomSequence (DRand48 &rng, const Sequence::iterator &begin, const Sequence::iterator &end) const |
| void | RandomSequence (DRand48 &rng, Sequence &seq, size_t length) const |
| void | RandomSequence (DRand48 &rng, Sequence &seq) const |
Detailed Description
Frequencies of letters of an alphabet.
- Examples:
Definition at line 32 of file frequencies.hpp.
Member Function Documentation
| void Frequencies::Normalize | ( | bool | setupUIPAC = false |
) |
Normalize the frequencies such that they sum to one
- Parameters:
-
setupUIPAC if true only regular letters are normalized and the extended letters are set the the average value
- Examples:
- freescore.cpp.
| int Frequencies::RandomLetter | ( | DRand48 & | rng | ) | const |
Draw a random letter. Draw a random letter from the alphabet according to the frequency table.
- Parameters:
-
rng reference to the random number generator
- Returns:
- a random encoded letter
Draw a random sequence. Draw a random IID sequence from with probability
.
- Parameters:
-
rng reference to the random number generator seq reference to the sequence that is to be shuffeled length length of the sequence
Definition at line 115 of file frequencies.hpp.
Draw a random sequence. Draw a random IID sequence from with probability
.
- Parameters:
-
rng reference to the random number generator seq reference to the sequence that is to be shuffeled length length of the sequence
The documentation for this class was generated from the following file:
- src/frequencies.hpp