mems::DenseAbstractMatch< MAX_SEQS > Class Template Reference

The DenseAbstractMatch implements the AbstractMatch interface in a way that is most efficient when Multiplicity and SeqCount are identical or nearly so. More...

#include <DenseAbstractMatch.h>

Inheritance diagram for mems::DenseAbstractMatch< MAX_SEQS >:

Inheritance graph
[legend]
Collaboration diagram for mems::DenseAbstractMatch< MAX_SEQS >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual AbstractMatchClone () const=0
 DenseAbstractMatch (const uint seq_count)
 Creates a new AbstractMatch.

 DenseAbstractMatch ()
virtual uint FirstStart () const
 Returns the index of the first sequence this match occurs in.

virtual void Invert ()
 Inverts the coordinates of this match.

virtual gnSeqI LeftEnd (uint seqI) const
 Returns the left end coordinate of this match at the seqI'th matching position/sequence.

void MoveEnd (int64 move_amount)
 Shift the left-end coordinates in reverse oriented positions by a given amount.

void MoveStart (int64 move_amount)
 Shift the left-end coordinates in forward oriented positions by a given amount.

uint Multiplicity () const
 Returns the multiplicity of the match.

virtual boolean operator== (const DenseAbstractMatch &dam) const
virtual orientation Orientation (uint seqI) const
 Returns the orientation of this match at the startI'th matching position/sequence, either AbstractMatch::forward or AbstractMatch::reverse.

uint SeqCount () const
 Returns the number of sequences in the alignment which contains this match.

virtual void SetLeftEnd (uint seqI, gnSeqI position)
 sets the left end coordinate of this match in the seqI'th matching position/sequence

virtual void SetOrientation (uint seqI, orientation o)
 sets the relative orientation of this match in the seqI'th matching position/sequence

void SetStart (uint seqI, int64 startI)
 Deprecated: use SetLeftEnd() and SetOrientation instead Sets the start in sequence.

int64 Start (uint seqI) const
 Deprecated: use LeftEnd() and Orientation() instead.

virtual uint UsedSeq (uint seqI) const
 Returns the id of the i-th defined sequence in this match.


Protected Attributes

gnSeqI leftend [MAX_SEQS]
uint m_multiplicity
uint m_seq_count
bool orient [MAX_SEQS]

Detailed Description

template<unsigned int MAX_SEQS>
class mems::DenseAbstractMatch< MAX_SEQS >

The DenseAbstractMatch implements the AbstractMatch interface in a way that is most efficient when Multiplicity and SeqCount are identical or nearly so.

It stores all data inline in a fixed size arrays, affording it storage in a contiguous chunk of memory.

Definition at line 29 of file DenseAbstractMatch.h.


Constructor & Destructor Documentation

template<unsigned int MAX_SEQS>
mems::DenseAbstractMatch< MAX_SEQS >::DenseAbstractMatch  ) 
 

Definition at line 89 of file DenseAbstractMatch.h.

References mems::DenseAbstractMatch< MAX_SEQS >::leftend, and mems::DenseAbstractMatch< MAX_SEQS >::orient.

template<unsigned int MAX_SEQS>
mems::DenseAbstractMatch< MAX_SEQS >::DenseAbstractMatch const uint  seq_count  ) 
 

Creates a new AbstractMatch.

Parameters:
seq_count The total number of sequences in the alignment

Definition at line 98 of file DenseAbstractMatch.h.

References mems::DenseAbstractMatch< MAX_SEQS >::leftend, mems::DenseAbstractMatch< MAX_SEQS >::orient, and uint.


Member Function Documentation

template<unsigned int MAX_SEQS>
virtual AbstractMatch* mems::DenseAbstractMatch< MAX_SEQS >::Clone  )  const [pure virtual]
 

template<unsigned int MAX_SEQS>
uint mems::DenseAbstractMatch< MAX_SEQS >::FirstStart  )  const [virtual]
 

Returns the index of the first sequence this match occurs in.

Implements mems::AbstractMatch.

Definition at line 134 of file DenseAbstractMatch.h.

References mems::DenseAbstractMatch< MAX_SEQS >::leftend, mems::DenseAbstractMatch< MAX_SEQS >::SeqCount(), and uint.

template<unsigned int MAX_SEQS>
void mems::DenseAbstractMatch< MAX_SEQS >::Invert  )  [virtual]
 

Inverts the coordinates of this match.

Implements mems::AbstractMatch.

Definition at line 127 of file DenseAbstractMatch.h.

References mems::DenseAbstractMatch< MAX_SEQS >::orient, and uint.

template<unsigned int MAX_SEQS>
virtual gnSeqI mems::DenseAbstractMatch< MAX_SEQS >::LeftEnd uint  seqI  )  const [inline, virtual]
 

Returns the left end coordinate of this match at the seqI'th matching position/sequence.

Implements mems::AbstractMatch.

Definition at line 58 of file DenseAbstractMatch.h.

References mems::DenseAbstractMatch< MAX_SEQS >::leftend, and uint.

template<unsigned int MAX_SEQS>
void mems::DenseAbstractMatch< MAX_SEQS >::MoveEnd int64  move_amount  )  [virtual]
 

Shift the left-end coordinates in reverse oriented positions by a given amount.

Implements mems::AbstractMatch.

Definition at line 151 of file DenseAbstractMatch.h.

References mems::DenseAbstractMatch< MAX_SEQS >::leftend, mems::DenseAbstractMatch< MAX_SEQS >::m_seq_count, mems::DenseAbstractMatch< MAX_SEQS >::orient, and uint.

template<unsigned int MAX_SEQS>
void mems::DenseAbstractMatch< MAX_SEQS >::MoveStart int64  move_amount  )  [virtual]
 

Shift the left-end coordinates in forward oriented positions by a given amount.

Implements mems::AbstractMatch.

Definition at line 143 of file DenseAbstractMatch.h.

References mems::DenseAbstractMatch< MAX_SEQS >::leftend, mems::DenseAbstractMatch< MAX_SEQS >::m_seq_count, mems::DenseAbstractMatch< MAX_SEQS >::orient, and uint.

template<unsigned int MAX_SEQS>
uint mems::DenseAbstractMatch< MAX_SEQS >::Multiplicity  )  const [inline, virtual]
 

Returns the multiplicity of the match.

e.g. the number of sequences this match occurs in

Implements mems::AbstractMatch.

Definition at line 53 of file DenseAbstractMatch.h.

References mems::DenseAbstractMatch< MAX_SEQS >::m_multiplicity, and uint.

template<unsigned int MAX_SEQS>
boolean mems::DenseAbstractMatch< MAX_SEQS >::operator== const DenseAbstractMatch< MAX_SEQS > &  dam  )  const [virtual]
 

Definition at line 107 of file DenseAbstractMatch.h.

References mems::DenseAbstractMatch< MAX_SEQS >::leftend, mems::DenseAbstractMatch< MAX_SEQS >::m_seq_count, mems::DenseAbstractMatch< MAX_SEQS >::orient, and uint.

template<unsigned int MAX_SEQS>
AbstractMatch::orientation mems::DenseAbstractMatch< MAX_SEQS >::Orientation uint  seqI  )  const [virtual]
 

Returns the orientation of this match at the startI'th matching position/sequence, either AbstractMatch::forward or AbstractMatch::reverse.

Implements mems::AbstractMatch.

Definition at line 119 of file DenseAbstractMatch.h.

References mems::DenseAbstractMatch< MAX_SEQS >::leftend, mems::DenseAbstractMatch< MAX_SEQS >::m_seq_count, mems::DenseAbstractMatch< MAX_SEQS >::orient, and uint.

template<unsigned int MAX_SEQS>
uint mems::DenseAbstractMatch< MAX_SEQS >::SeqCount  )  const [inline, virtual]
 

Returns the number of sequences in the alignment which contains this match.

Implements mems::AbstractMatch.

Definition at line 54 of file DenseAbstractMatch.h.

References mems::DenseAbstractMatch< MAX_SEQS >::m_seq_count, and uint.

Referenced by mems::DenseAbstractMatch< MAX_SEQS >::FirstStart().

template<unsigned int MAX_SEQS>
virtual void mems::DenseAbstractMatch< MAX_SEQS >::SetLeftEnd uint  seqI,
gnSeqI  position
[inline, virtual]
 

sets the left end coordinate of this match in the seqI'th matching position/sequence

Implements mems::AbstractMatch.

Definition at line 60 of file DenseAbstractMatch.h.

References mems::DenseAbstractMatch< MAX_SEQS >::leftend, mems::DenseAbstractMatch< MAX_SEQS >::m_multiplicity, and uint.

Referenced by mems::DenseAbstractMatch< MAX_SEQS >::SetStart().

template<unsigned int MAX_SEQS>
virtual void mems::DenseAbstractMatch< MAX_SEQS >::SetOrientation uint  seqI,
orientation  o
[inline, virtual]
 

sets the relative orientation of this match in the seqI'th matching position/sequence

Implements mems::AbstractMatch.

Definition at line 68 of file DenseAbstractMatch.h.

References mems::DenseAbstractMatch< MAX_SEQS >::orient, and uint.

template<unsigned int MAX_SEQS>
void mems::DenseAbstractMatch< MAX_SEQS >::SetStart uint  seqI,
int64  startI
[inline, virtual]
 

Deprecated: use SetLeftEnd() and SetOrientation instead Sets the start in sequence.

Parameters:
seqI of this match to
start 

Implements mems::AbstractMatch.

Definition at line 48 of file DenseAbstractMatch.h.

References mems::DenseAbstractMatch< MAX_SEQS >::orient, mems::DenseAbstractMatch< MAX_SEQS >::SetLeftEnd(), and uint.

template<unsigned int MAX_SEQS>
int64 mems::DenseAbstractMatch< MAX_SEQS >::Start uint  seqI  )  const [inline, virtual]
 

Deprecated: use LeftEnd() and Orientation() instead.

Returns the start coordinate of this match in sequence

Parameters:
startI 

Implements mems::AbstractMatch.

Definition at line 44 of file DenseAbstractMatch.h.

References mems::DenseAbstractMatch< MAX_SEQS >::leftend, mems::DenseAbstractMatch< MAX_SEQS >::orient, and uint.

template<unsigned int MAX_SEQS>
virtual uint mems::DenseAbstractMatch< MAX_SEQS >::UsedSeq uint  seqI  )  const [inline, virtual]
 

Returns the id of the i-th defined sequence in this match.

Implements mems::AbstractMatch.

Definition at line 76 of file DenseAbstractMatch.h.

References uint.


Member Data Documentation

template<unsigned int MAX_SEQS>
gnSeqI mems::DenseAbstractMatch< MAX_SEQS >::leftend[ MAX_SEQS ] [protected]
 

Definition at line 83 of file DenseAbstractMatch.h.

Referenced by mems::DenseAbstractMatch< MAX_SEQS >::DenseAbstractMatch(), mems::DenseAbstractMatch< MAX_SEQS >::FirstStart(), mems::DenseAbstractMatch< MAX_SEQS >::LeftEnd(), mems::DenseAbstractMatch< MAX_SEQS >::MoveEnd(), mems::DenseAbstractMatch< MAX_SEQS >::MoveStart(), mems::DenseAbstractMatch< MAX_SEQS >::operator==(), mems::DenseAbstractMatch< MAX_SEQS >::Orientation(), mems::DenseAbstractMatch< MAX_SEQS >::SetLeftEnd(), and mems::DenseAbstractMatch< MAX_SEQS >::Start().

template<unsigned int MAX_SEQS>
uint mems::DenseAbstractMatch< MAX_SEQS >::m_multiplicity [protected]
 

Definition at line 85 of file DenseAbstractMatch.h.

Referenced by mems::DenseAbstractMatch< MAX_SEQS >::Multiplicity(), and mems::DenseAbstractMatch< MAX_SEQS >::SetLeftEnd().

template<unsigned int MAX_SEQS>
uint mems::DenseAbstractMatch< MAX_SEQS >::m_seq_count [protected]
 

Definition at line 82 of file DenseAbstractMatch.h.

Referenced by mems::DenseAbstractMatch< MAX_SEQS >::MoveEnd(), mems::DenseAbstractMatch< MAX_SEQS >::MoveStart(), mems::DenseAbstractMatch< MAX_SEQS >::operator==(), mems::DenseAbstractMatch< MAX_SEQS >::Orientation(), and mems::DenseAbstractMatch< MAX_SEQS >::SeqCount().

template<unsigned int MAX_SEQS>
bool mems::DenseAbstractMatch< MAX_SEQS >::orient[ MAX_SEQS ] [protected]
 

Definition at line 84 of file DenseAbstractMatch.h.

Referenced by mems::DenseAbstractMatch< MAX_SEQS >::DenseAbstractMatch(), mems::DenseAbstractMatch< MAX_SEQS >::Invert(), mems::DenseAbstractMatch< MAX_SEQS >::MoveEnd(), mems::DenseAbstractMatch< MAX_SEQS >::MoveStart(), mems::DenseAbstractMatch< MAX_SEQS >::operator==(), mems::DenseAbstractMatch< MAX_SEQS >::Orientation(), mems::DenseAbstractMatch< MAX_SEQS >::SetOrientation(), mems::DenseAbstractMatch< MAX_SEQS >::SetStart(), and mems::DenseAbstractMatch< MAX_SEQS >::Start().


The documentation for this class was generated from the following file:
Generated on Fri Mar 14 06:01:39 2008 for libMems by doxygen 1.3.6