NCBI C++ ToolKit
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
CSeqMaskerScoreMean Class Reference

Search Toolkit Book for CSeqMaskerScoreMean

Score function object computing mean of unit in a window. More...

#include <algo/winmask/seq_masker_score_mean.hpp>

+ Inheritance diagram for CSeqMaskerScoreMean:
+ Collaboration diagram for CSeqMaskerScoreMean:

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< Uint4scores
 
Uint4scores_start
 

Additional Inherited Members

- Protected Attributes inherited from CSeqMaskerScore
const CSeqMaskerWindowwindow
 Points to the window information object. More...
 
const CRef< CSeqMaskerIstat > & ustat
 Unit score statistics that should be used by the score function object. More...
 

Detailed Description

Score function object computing mean of unit in a window.

Definition at line 47 of file seq_masker_score_mean.hpp.

Constructor & Destructor Documentation

◆ CSeqMaskerScoreMean()

CSeqMaskerScoreMean::CSeqMaskerScoreMean ( const CRef< CSeqMaskerIstat > &  ustat)

Object constructor.

Parameters
ustatunit score statistics; forwarded to the base class constructor

Definition at line 41 of file seq_masker_score_mean.cpp.

◆ ~CSeqMaskerScoreMean()

virtual CSeqMaskerScoreMean::~CSeqMaskerScoreMean ( )
inlinevirtual

Object destructor.

Definition at line 64 of file seq_masker_score_mean.hpp.

Member Function Documentation

◆ FillScores()

void CSeqMaskerScoreMean::FillScores ( )
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().

◆ Init()

void CSeqMaskerScoreMean::Init ( void  )
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.

◆ operator()()

Uint4 CSeqMaskerScoreMean::operator() ( void  )
virtual

Access the score of the current window.

The score is computed by averaging the scores of all units in the current window.

Returns
the score of the current window

Implements CSeqMaskerScore.

Definition at line 48 of file seq_masker_score_mean.cpp.

References num, and sum.

◆ PostAdvance()

void CSeqMaskerScoreMean::PostAdvance ( Uint4  step)
virtual

Postprocessing after window advancement.

Parameters
stepwindow 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.

◆ PreAdvance()

void CSeqMaskerScoreMean::PreAdvance ( Uint4  step)
virtual

Preprocessing before window advancement.

Parameters
stepwindow 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.

Member Data Documentation

◆ num

Uint4 CSeqMaskerScoreMean::num
private

Definition at line 125 of file seq_masker_score_mean.hpp.

Referenced by FillScores(), Init(), operator()(), and PostAdvance().

◆ scores

vector< Uint4 > CSeqMaskerScoreMean::scores
private

Definition at line 131 of file seq_masker_score_mean.hpp.

Referenced by FillScores(), Init(), and PostAdvance().

◆ scores_start

Uint4* CSeqMaskerScoreMean::scores_start
private

Definition at line 136 of file seq_masker_score_mean.hpp.

Referenced by FillScores(), PostAdvance(), and PreAdvance().

◆ start

Uint4 CSeqMaskerScoreMean::start
private

Definition at line 120 of file seq_masker_score_mean.hpp.

Referenced by FillScores(), Init(), PostAdvance(), and PreAdvance().

◆ sum

Uint4 CSeqMaskerScoreMean::sum
private

Definition at line 115 of file seq_masker_score_mean.hpp.

Referenced by FillScores(), operator()(), PostAdvance(), and PreAdvance().


The documentation for this class was generated from the following files:
Modified on Fri Sep 20 14:57:15 2024 by modify_doxy.py rev. 669887