NCBI C++ ToolKit
|
Search Toolkit Book for CSeqMaskerScoreMean
Score function object computing mean of unit in a window. More...
#include <algo/winmask/seq_masker_score_mean.hpp>
Public Member Functions | |
CSeqMaskerScoreMean (const CRef< CSeqMaskerIstat > &ustat) | |
Object constructor. More... | |
virtual | ~CSeqMaskerScoreMean () |
Object destructor. More... | |
virtual Uint4 | operator() () |
Access the score of the current window. More... | |
virtual void | PreAdvance (Uint4 step) |
Preprocessing before window advancement. More... | |
virtual void | PostAdvance (Uint4 step) |
Postprocessing after window advancement. More... | |
Public Member Functions inherited from CSeqMaskerScore | |
CSeqMaskerScore (const CRef< CSeqMaskerIstat > &arg_ustat) | |
Object constructor. More... | |
virtual | ~CSeqMaskerScore () |
Object destructor. More... | |
void | SetWindow (const CSeqMaskerWindow &new_window) |
Set the window object that should be used for score computation. More... | |
Protected Member Functions | |
virtual void | Init () |
Object initialization. More... | |
Private Member Functions | |
void | FillScores () |
Private Attributes | |
Uint4 | sum |
Uint4 | start |
Uint4 | num |
vector< Uint4 > | scores |
Uint4 * | scores_start |
Additional Inherited Members | |
Protected Attributes inherited from CSeqMaskerScore | |
const CSeqMaskerWindow * | window |
Points to the window information object. More... | |
const CRef< CSeqMaskerIstat > & | ustat |
Unit score statistics that should be used by the score function object. More... | |
Score function object computing mean of unit in a window.
Definition at line 47 of file seq_masker_score_mean.hpp.
CSeqMaskerScoreMean::CSeqMaskerScoreMean | ( | const CRef< CSeqMaskerIstat > & | ustat | ) |
Object constructor.
ustat | unit score statistics; forwarded to the base class constructor |
Definition at line 41 of file seq_masker_score_mean.cpp.
|
inlinevirtual |
Object destructor.
Definition at line 64 of file seq_masker_score_mean.hpp.
|
private |
Definition at line 93 of file seq_masker_score_mean.cpp.
References i, num, scores, scores_start, start, CSeqMaskerWindow::Start(), sum, and CSeqMaskerScore::window.
Referenced by Init(), and PostAdvance().
|
protectedvirtual |
Object initialization.
After the window object is set this function is called to precompute the score value for the initial window of the sequence.
Implements CSeqMaskerScore.
Definition at line 83 of file seq_masker_score_mean.cpp.
References FillScores(), num, CSeqMaskerWindow::NumUnits(), scores, start, CSeqMaskerWindow::Start(), and CSeqMaskerScore::window.
|
virtual |
Access the score of the current window.
The score is computed by averaging the scores of all units in the current window.
Implements CSeqMaskerScore.
Definition at line 48 of file seq_masker_score_mean.cpp.
|
virtual |
Postprocessing after window advancement.
step | window has shifted by this many bases |
Implements CSeqMaskerScore.
Definition at line 62 of file seq_masker_score_mean.cpp.
References FillScores(), int, num, scores, scores_start, start, CSeqMaskerWindow::Start(), sum, CSeqMaskerWindow::UnitStep(), and CSeqMaskerScore::window.
|
virtual |
Preprocessing before window advancement.
step | window will shift by this many bases |
Implements CSeqMaskerScore.
Definition at line 52 of file seq_masker_score_mean.cpp.
References scores_start, start, CSeqMaskerWindow::Start(), sum, CSeqMaskerWindow::UnitStep(), and CSeqMaskerScore::window.
|
private |
Definition at line 125 of file seq_masker_score_mean.hpp.
Referenced by FillScores(), Init(), operator()(), and PostAdvance().
|
private |
Definition at line 131 of file seq_masker_score_mean.hpp.
Referenced by FillScores(), Init(), and PostAdvance().
|
private |
Definition at line 136 of file seq_masker_score_mean.hpp.
Referenced by FillScores(), PostAdvance(), and PreAdvance().
|
private |
Definition at line 120 of file seq_masker_score_mean.hpp.
Referenced by FillScores(), Init(), PostAdvance(), and PreAdvance().
|
private |
Definition at line 115 of file seq_masker_score_mean.hpp.
Referenced by FillScores(), operator()(), PostAdvance(), and PreAdvance().