Loading...
Searching...
No Matches
detail/fm_index_cursor.hpp
Go to the documentation of this file.
// SPDX-FileCopyrightText: 2006-2025 Knut Reinert & Freie Universität Berlin
// SPDX-FileCopyrightText: 2016-2025 Knut Reinert & MPI für molekulare Genetik
// SPDX-License-Identifier: BSD-3-Clause
#pragma once
#include <tuple>
#include <type_traits>
#include <seqan3/core/concept/cereal.hpp>
namespace seqan3::detail
{
template <typename index_t>
struct fm_index_cursor_node
{
using size_type = typename index_t::size_type;
using sdsl_char_type = typename index_t::sdsl_char_type;
size_type lb;
size_type rb;
size_type depth;
sdsl_char_type last_char;
bool operator==(fm_index_cursor_node const & rhs) const
{
// NOTE: last_char is implementation specific for cycle_back().
// lb, rb and depth already determine the node in the suffix tree.
// Thus there is no need to compare last_char.
return std::tie(lb, rb, depth) == std::tie(rhs.lb, rhs.rb, rhs.depth);
}
bool operator!=(fm_index_cursor_node const & rhs) const
{
return !(*this == rhs);
}
template <cereal_archive archive_t>
void CEREAL_SERIALIZE_FUNCTION_NAME(archive_t & archive)
{
archive(lb);
archive(rb);
archive(depth);
archive(last_char);
}
};
} // namespace seqan3::detail
cereal.hpp
Adaptions of concepts from the Cereal library.
std::tie
T tie(T... args)
tuple
type_traits
Hide me