it appears that the string iterator version is about half as fast
as just using raw const char * pointers.
Hopefully the string pointers won't get moved around behind the scenes
while seqcomp is running. (Currently shouldn't as once a sequence is
set it's supposed to be constant.
int start_i, seq1_i, seq2_i, win_i; // loop variables
int matches; // number of matches in to a window
int i2_offset;
- Sequence::const_iterator seq1 = sseq1.begin();
- Sequence::const_iterator seq2 = sseq2.begin();
+ const char *seq1 = sseq1.c_str();
+ const char *seq2 = sseq2.c_str();
int seq1_win_num = sseq1.size() - window_size + 1;
int seq2_win_num = sseq2.size() - window_size + 1;
motif_list.clear();
}
+const char *Sequence::c_str() const
+{
+ return seq->c_str();
+}
Sequence::const_iterator Sequence::begin() const
{
const_reference at(size_type n) const;
//! clear the sequence and its annotations
void clear();
+ //! return c pointer to the sequence data
+ const char *c_str() const;
//! forward iterator
const_iterator begin() const;
//! last iterator