Hi Fabian, changesets [9609] [9610] should make findRepeats() more generic. Note that I used reserve() regardless of the type of repString since it can be implemented for both lists and strings. The code using appendValue() will then be roughly equivalent to the existing code for Strings, i.e. only one reallocation of space. For lists, reserve() does nothing, but appendValue() always works efficiently for lists. Please test whether this works and report back any problems. Bests, Manuel Am 09.05.2011 um 06:04 schrieb Fabian Buske: > Hi, > > I observed that findRepeats() from repeat_base.h relies on _operator[]_ > and _resize()_ to work for the given type TRepeatStore &repString. > > line 504: > findRepeats(TRepeatStore &repString, ..){ > ... > // copy low-complex regions to result string > resize(repString, list.size()); > typename TRepeatList::const_iterator lit = list.begin(); > typename TRepeatList::const_iterator litEnd = list.end(); > for (TSize i = 0; lit != litEnd; ++lit, ++i) > repString[i] = (*lit).second; > } > > I'm currently the adaptation of std::list rather than a StringSet, which > does not (yet) contain proper functionality for these functions. > > I like to propose the following change to this class: > > findRepeats(TRepeatStore &repString, ..){ > ... > // copy low-complex regions to result string > typename TRepeatList::const_iterator lit = list.begin(); > typename TRepeatList::const_iterator litEnd = list.end(); > for (TSize i = 0; lit != litEnd; ++lit, ++i) > appendValue(repString, (*lit).second); > } > > Alternatively, the adaptions from the STL should probably get some > additional functionality. > > Cheers, > Fabian > > -- > Fabian Buske > Institute for Molecular Bioscience > The University of Queensland > Brisbane, Qld. 4072 Australia > Phone: (61)-(7)-334-62641 > > _______________________________________________ > seqan-dev mailing list > seqan-dev@lists.fu-berlin.de > https://lists.fu-berlin.de/listinfo/seqan-dev