ESTCodec::NormalEncoder< Shift, Mask > Struct Template Reference

A functor to generate a encoded word (serves as a hash entry). More...

#include <ESTCodec.h>

List of all members.

Public Member Functions

int operator() (const int w, const char bp, int &ignoreMask) const

Detailed Description

template<const int & Shift, const int & Mask>
struct ESTCodec::NormalEncoder< Shift, Mask >

A functor to generate a encoded word (serves as a hash entry).

This functor must be used to generate an encoded word from a "normal" (rather than reverse complement) fragment. This me thod handles 'n' entries in the EST in the following manner:

Template Parameters:
Shift The number of bits by which the encoding for the given base pair must be shifted to the left. For example, when using a word of length 6 nt, this value would be 10.
Mask The mask (with bits set to 1) that must be used to retain the signficiant values in the hash. For example, when using words of length 6, the Mask would be the binary 1111 1111 1111 or 0xfff.
Parameters:
[in] w The current hash value that has been computed thusfar.
[in] bp The base pair ('A', 'T', 'C', 'G', or 'n') to be encoded by this method.
[in,out] ignoreMask The ignore mask that is used to determine if the current hash/word has a 'n' entry in it and must be ignored.
Returns:
The hash for the current word being encoded.
Note:
The caller must use the returned value for further operation only if the ignoreMask is zero. Otherwise the encoder must be repeatedly called with subsequent bases until the ignoreMask is cleared by this method.

Definition at line 205 of file ESTCodec.h.


Member Function Documentation

template<const int & Shift, const int & Mask>
int ESTCodec::NormalEncoder< Shift, Mask >::operator() ( const int  w,
const char  bp,
int &  ignoreMask 
) const [inline]

Definition at line 206 of file ESTCodec.h.

References ESTCodec::encode().


The documentation for this struct was generated from the following file:

Generated on 19 Mar 2010 for PEACE by  doxygen 1.6.1