NCBI C++ ToolKit
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
CSeqMaskerScore Class Referenceabstract

Search Toolkit Book for CSeqMaskerScore

Abstract base class for score function objects. More...

#include <algo/winmask/seq_masker_score.hpp>

+ Inheritance diagram for CSeqMaskerScore:
+ Collaboration diagram for CSeqMaskerScore:

Public Member Functions

 CSeqMaskerScore (const CRef< CSeqMaskerIstat > &arg_ustat)
 Object constructor. More...
 
virtual ~CSeqMaskerScore ()
 Object destructor. More...
 
virtual Uint4 operator() ()=0
 Get the score of the current window. More...
 
virtual void PreAdvance (Uint4 step)=0
 Window advancement notification. More...
 
virtual void PostAdvance (Uint4 step)=0
 Window advancement notification. 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 ()=0
 Initialize the object. More...
 

Protected Attributes

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

Abstract base class for score function objects.

The specific classes should be derived to provided different methods of computing a window score. It uses CSeqMaskerWindow interface to get access to information about units of the current window.

Definition at line 54 of file seq_masker_score.hpp.

Constructor & Destructor Documentation

◆ CSeqMaskerScore()

CSeqMaskerScore::CSeqMaskerScore ( const CRef< CSeqMaskerIstat > &  arg_ustat)
inline

Object constructor.

Parameters
arg_ustatdetermines which unit score statistics should be used

Definition at line 65 of file seq_masker_score.hpp.

◆ ~CSeqMaskerScore()

virtual CSeqMaskerScore::~CSeqMaskerScore ( )
inlinevirtual

Object destructor.

Definition at line 71 of file seq_masker_score.hpp.

Member Function Documentation

◆ Init()

virtual void CSeqMaskerScore::Init ( )
protectedpure virtual

Initialize the object.

Initialization should follow the call to SetWindow() and should take care of any computations necessary to initialize the score object.

Implemented in CSeqMaskerScoreMin, CSeqMaskerScoreMeanGlob, and CSeqMaskerScoreMean.

Referenced by SetWindow().

◆ operator()()

virtual Uint4 CSeqMaskerScore::operator() ( )
pure virtual

Get the score of the current window.

Returns
the score of the current window

Implemented in CSeqMaskerScoreMin, CSeqMaskerScoreMeanGlob, and CSeqMaskerScoreMean.

◆ PostAdvance()

virtual void CSeqMaskerScore::PostAdvance ( Uint4  step)
pure virtual

Window advancement notification.

If the score function object has to perform some action after the window position advancement then PostAdvance() interface has to be called right after the advancement of the window with the argument indicating by how many base positions the window has been moved.

Parameters
stepvalue of window advancement in bases

Implemented in CSeqMaskerScoreMin, CSeqMaskerScoreMeanGlob, and CSeqMaskerScoreMean.

Referenced by CSeqMasker::DoMask(), and CSeqMasker::mitem::mitem().

◆ PreAdvance()

virtual void CSeqMaskerScore::PreAdvance ( Uint4  step)
pure virtual

Window advancement notification.

If the score function object has to perform some action in anticipation of window position advancement then PreAdvance() interface has to be called just prior to advancing the window with the argument indicating by how many base positions the window is going to be moved.

Parameters
stepvalue of window advancement in bases

Implemented in CSeqMaskerScoreMin, CSeqMaskerScoreMeanGlob, and CSeqMaskerScoreMean.

Referenced by CSeqMasker::mitem::mitem().

◆ SetWindow()

void CSeqMaskerScore::SetWindow ( const CSeqMaskerWindow new_window)
inline

Set the window object that should be used for score computation.

Parameters
new_windowthe object implementing CSeqMaskerWindow window access interface

Definition at line 119 of file seq_masker_score.hpp.

References Init(), and window.

Referenced by CSeqMasker::DoMask(), and CSeqMasker::mitem::mitem().

Member Data Documentation

◆ ustat

const CRef< CSeqMaskerIstat >& CSeqMaskerScore::ustat
protected

Unit score statistics that should be used by the score function object.

Definition at line 143 of file seq_masker_score.hpp.

Referenced by CSeqMaskerScoreMeanGlob::Init().

◆ window

const CSeqMaskerWindow* CSeqMaskerScore::window
protected

The documentation for this class was generated from the following file:
Modified on Sat Jun 15 11:52:58 2024 by modify_doxy.py rev. 669887