SeqAn3  3.0.2
The Modern C++ library for sequence analysis.
fm_index_cursor.hpp
Go to the documentation of this file.
1 // -----------------------------------------------------------------------------------------------------
2 // Copyright (c) 2006-2020, Knut Reinert & Freie Universität Berlin
3 // Copyright (c) 2016-2020, Knut Reinert & MPI für molekulare Genetik
4 // This file may be used, modified and/or redistributed under the terms of the 3-clause BSD-License
5 // shipped with this file and also available at: https://github.com/seqan/seqan3/blob/master/LICENSE.md
6 // -----------------------------------------------------------------------------------------------------
7 
13 #pragma once
14 
15 #include <tuple>
16 #include <type_traits>
17 
18 #include <seqan3/core/platform.hpp>
19 
20 namespace seqan3::detail
21 {
22 
31 template <typename index_t>
32 struct fm_index_cursor_node
33 {
35  using size_type = typename index_t::size_type;
39  using sdsl_char_type = typename index_t::sdsl_char_type;
40 
42  size_type lb;
44  size_type rb;
46  size_type depth;
48  sdsl_char_type last_char;
49 
51  bool operator==(fm_index_cursor_node const & rhs) const
52  {
53  // NOTE: last_char is implementation specific for cycle_back().
54  // lb, rb and depth already determine the node in the suffix tree.
55  // Thus there is no need to compare last_char.
56  return std::tie(lb, rb, depth) == std::tie(rhs.lb, rhs.rb, rhs.depth);
57  }
58 
60  bool operator!=(fm_index_cursor_node const & rhs) const
61  {
62  return !(*this == rhs);
63  }
64 };
65 
66 // std::tuple get_suffix_array_range(fm_index_cursor<index_t> const & it)
67 // {
68 // return {node.lb, node.rb};
69 // }
70 //
71 // std::tuple get_suffix_array_range(bi_fm_index_cursor<index_t> const & it)
72 // {
73 // return {node.lb, node.rb};
74 // }
75 
77 
79 
80 }
std::rel_ops::operator!=
T operator!=(T... args)
tuple
std::tie
T tie(T... args)
platform.hpp
Provides platform and dependency checks.