diff --git a/include/seqan3/index/fm_index_iterator.hpp b/include/seqan3/index/fm_index_iterator.hpp index b415b620eff..c488b06ee62 100644 --- a/include/seqan3/index/fm_index_iterator.hpp +++ b/include/seqan3/index/fm_index_iterator.hpp @@ -121,7 +121,7 @@ class fm_index_iterator { ++c; } - + if (c != index->m_index.sigma) { parent_lb = node.lb; @@ -193,7 +193,25 @@ class fm_index_iterator return true; } - bool right() + auto children() noexcept + { + // TODO: this will not work since value_size is not defined for char + std::array children; + + // TODO: this will be implemented much more efficiently + uint8_t i = 0; + if (down()) + { + do + { + children[i++] = *this; + } while (right()); + } + + return children; + } + + bool right() noexcept { assert(depth() > 0); typename index_type::comp_char_type c = node.last_char + 1;