NCBI C++ ToolKit
|
Search Toolkit Book for CSeqMaskerUtil
Collection of various support utilities. More...
#include <algo/winmask/seq_masker_util.hpp>
Static Public Member Functions | |
static Uint1 | BitCount (Uint4 mask, Uint1 bit_value=1) |
Count the bits with given value in a given bit pattern. More... | |
static Uint4 | reverse_complement (Uint4 seq, Uint1 size) |
Reverse complement of a unit. More... | |
static pair< Uint4, Uint1 > | hash_code (Uint4 unit, Uint1 k, Uint1 roff) |
Compute a hash code of a unit. More... | |
Collection of various support utilities.
This class is used as a namespace for different utility functions that can be used by other winmasker classes.
Definition at line 48 of file seq_masker_util.hpp.
Count the bits with given value in a given bit pattern.
mask | the bit pattern |
bit_value | if 0 then 0-bits will be counted; otherwise 1-bits will be counted |
Definition at line 39 of file seq_masker_util.cpp.
References i, mask, and result.
Referenced by CSeqMaskerWindowPattern::CSeqMaskerWindowPattern(), and CSeqMasker::DoMask().
|
inlinestatic |
Compute a hash code of a unit.
unit | the target unit |
k | length (int bits) of the hash key |
roff | offset in bits from the right end of the unit |
Definition at line 81 of file seq_masker_util.hpp.
Referenced by CSeqMaskerOstatOpt::doFinalize(), CSeqMaskerOstatOpt::findBestRoff(), and CSeqMaskerUsetHash::get_info().
Reverse complement of a unit.
seq | the unit |
size | the unit length |
Definition at line 54 of file seq_masker_util.cpp.
References i, letter(), result, and ncbi::grid::netcache::search::fields::size.
Referenced by CSeqMaskerOstatOpt::createCacheBitArray(), CSeqMaskerUsetArray::get_info(), CSeqMaskerUsetHash::get_info(), CSeqMaskerUsetSimple::get_info(), CWinMaskCountsConverter::operator()(), and reverse_complement().