Skip to content

Commit

Permalink
Merge pull request #28 from SGSSGene/fix/reverse_index
Browse files Browse the repository at this point in the history
Fix/reverse index
  • Loading branch information
SGSSGene authored Sep 8, 2023
2 parents a19d898 + a8c6976 commit 1b21e5e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/fmindex-collection/search/SearchPseudo.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ template <bool EditDistance, typename index_t, typename search_scheme_t, Sequenc
struct Search {
constexpr static size_t Sigma = index_t::Sigma;

using cursor_t = BiFMIndexCursor<index_t>;
using cursor_t = select_cursor_t<index_t>;

index_t const& index;

Expand Down
4 changes: 2 additions & 2 deletions src/fmindex-collection/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ auto createSequencesAndReverse(Sequences auto const& _input, int samplingRate) -
auto delimLen = samplingRate - textLen % samplingRate; // Make sure it is always a multiple of samplingRate
totalSize += textLen + delimLen;
}
for (auto const& l : _input) {
for (auto const& l : std::views::reverse(_input)) {
auto textLen = l.size();
auto delimLen = samplingRate - textLen % samplingRate; // Make sure it is always a multiple of samplingRate
totalSize += textLen + delimLen;
Expand Down Expand Up @@ -136,7 +136,7 @@ auto createSequencesAndReverse(Sequences auto const& _input, int samplingRate) -
}

// add reversed text
for (auto const& l : _input) {
for (auto const& l : std::views::reverse(_input)) {
auto ls = l.size();
auto l2 = std::views::reverse(l);
inputText.insert(inputText.end(), begin(l2), end(l2));
Expand Down

0 comments on commit 1b21e5e

Please sign in to comment.