![]() |
Version 4.2.0 |
#include <seqpp/PrimaryCount.h>

Public Member Functions | |
| virtual | ~PrimaryCount () |
| destructor | |
| void | clear_count () const |
| clear the count | |
| void | null_count () const |
| put all counts down to 0 | |
| short | tell_order () const |
| returns the markovian order | |
| int | tell_nb_value () const |
| returns the nber of codes/words taking into interest | |
| long | tell_jump () const |
| returns the jump to the codes of _order+1 letters | |
| long * | get_jump () const |
| returns the vector of the jumps to the codes of i letters, 0<i<=order+2 | |
| Coder & | get_coder () const |
| allows a const access to the coder | |
| bool | is_count_ok () const |
| checks if the count is available | |
| unsigned long ** | get_p_count () const |
| get the total count, in the phased case | |
| unsigned long * | get_count (short p=0) const |
| get the total count in a phase p, or in the unphased case | |
| short | tell_phase () const |
| returns nb of phase | |
| void | count_p_occurencies (short phase, short initial_phase, unsigned long beg, unsigned long end) const |
| Phased count the number of occurencies of all the nbvalue codes (in the sub-sequence [beg...end])... beware: beg>=0 but not >0. | |
| void | count_p_occurencies (unsigned long **extern_count, short phase, short initial_phase, unsigned long beg, unsigned long end) const |
| Phased extern count the number of occurencies of all the nbvalue codes (in the sub-sequence [beg...end])... beware: beg>=0 but not >0. | |
| void | count_p_occurencies (unsigned long **extern_count, short phase, short initial_phase=0) const |
| Phased extern count the number of occurencies of all the nbvalue codes in the whole sequence. | |
| void | count_p_occurencies (short phase, short initial_phase=0) const |
| Phased count the number of occurencies of all the nbvalue codes in the whole sequence. | |
| void | count_occurencies (unsigned long beg, unsigned long end) const |
| Extern count the number of occurencies of all the nbvalue codes (in the sub-sequence [beg...end])... beware: beg>=0 but not >0. | |
| void | count_occurencies () const |
| Count the number of occurencies of all the nbvalue codes in the whole sequence. | |
| unsigned long | tell_p_occurencies (long code, short numphase) const |
| extract the number of occurencies of code in phase | |
| unsigned long | tell_occurencies (long code) const |
| extract the number of occurencies of obs | |
Protected Member Functions | |
| void | init_count () const |
| initialize the count | |
| virtual unsigned long | tell_max_count () const =0 |
| return the max length for the count | |
| virtual void | compute_count (unsigned long **extern_count, short phase, short initial_phase, unsigned long beg, unsigned long end) const =0 |
| compute the count | |
Protected Attributes | |
| short | _order |
| Order of the model. | |
| long | _nbvalue |
| nber of codes/words taking into interest | |
| short | _nbinv |
| number of invalid negative code | |
| Coder * | _coder |
| markovian coder associated to the order of the sequence | |
| bool | _coder_in |
| true if _coder is build in the class | |
| unsigned long ** | _count |
| count of each code/word, even invalid (-1) | |
| bool | _count_ok |
| if the count is available | |
| short | _phase |
| phase for the count | |
This object is based on integer codes to store words as required for a markov modelling (see Sequence). The words are coded in alphabet_size base, coding the 1-token words, then the 2-tokens words, the 3-tokens words... Let call jump(i) the first code of a i-tokens words, a PrimaryCount object is designed to count all words:
(example with alphabet AGCT and order=2) 0 first word ( 0 -> A) .. .. 1-token words (from A to T) .. jump(1) (4 -> AA) .. .. 2-tokens words (from AA to TT) .. jump(2) (20 -> AAA) .. .. 3-tokens words (from AAA to TTT) .. .. .. last word (TTT) jump(order+1) (64 -> /end)
| unsigned long* PrimaryCount::get_count | ( | short | p = 0 |
) | const [inline] |
get the total count in a phase p, or in the unphased case
| p | selected phase, default 0 if unphased case. |
References _count.
Referenced by PMarkov::PMarkov().
| void PrimaryCount::count_p_occurencies | ( | short | phase, | |
| short | initial_phase, | |||
| unsigned long | beg, | |||
| unsigned long | end | |||
| ) | const [inline] |
Phased count the number of occurencies of all the nbvalue codes (in the sub-sequence [beg...end])... beware: beg>=0 but not >0.
| phase | phase | |
| initial_phase | phase of the first element of associated sequence | |
| beg | the sub-sequence [beg... | |
| end | the sub-sequence ...end] |
References _count, and compute_count().
Referenced by count_occurencies(), count_p_occurencies(), PhasedMarkov::log_likelihood(), PhasedMarkov::PhasedMarkov(), and PhasedPMarkov::PhasedPMarkov().
| void PrimaryCount::count_p_occurencies | ( | unsigned long ** | extern_count, | |
| short | phase, | |||
| short | initial_phase, | |||
| unsigned long | beg, | |||
| unsigned long | end | |||
| ) | const [inline] |
Phased extern count the number of occurencies of all the nbvalue codes (in the sub-sequence [beg...end])... beware: beg>=0 but not >0.
| extern_count | extern count storage | |
| phase | phase | |
| initial_phase | phase of the first element of associated sequence | |
| beg | the sub-sequence [beg... | |
| end | the sub-sequence ...end] |
References compute_count().
| void PrimaryCount::count_p_occurencies | ( | unsigned long ** | extern_count, | |
| short | phase, | |||
| short | initial_phase = 0 | |||
| ) | const [inline] |
Phased extern count the number of occurencies of all the nbvalue codes in the whole sequence.
| extern_count | extern count storage | |
| phase | phase | |
| initial_phase | phase of the first element of associated sequence |
References count_p_occurencies().
| void PrimaryCount::count_p_occurencies | ( | short | phase, | |
| short | initial_phase = 0 | |||
| ) | const [inline] |
Phased count the number of occurencies of all the nbvalue codes in the whole sequence.
| phase | phase | |
| initial_phase | phase of the first element of associated sequence |
References count_p_occurencies().
| void PrimaryCount::count_occurencies | ( | unsigned long | beg, | |
| unsigned long | end | |||
| ) | const [inline] |
Extern count the number of occurencies of all the nbvalue codes (in the sub-sequence [beg...end])... beware: beg>=0 but not >0.
| beg | the sub-sequence [beg... | |
| end | the sub-sequence ...end] |
References count_p_occurencies().
Referenced by PMarkov::PMarkov().
| Download seq++ 4.2.0 |
| Download previous versions |
| Statistique & Genome Home |
| Contributors : M.Baudry, P.Y.Bourguignon, M.Hoebeke, V.Miele, P.Nicolas, G.Nuel, H.Richard, D.Robelin |
1.5.6