SeqAn3
The Modern C++ library for sequence analysis.
fm_index_cursor.hpp
Go to the documentation of this file.
1 // -----------------------------------------------------------------------------------------------------
2 // Copyright (c) 2006-2019, Knut Reinert & Freie Universität Berlin
3 // Copyright (c) 2016-2019, 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 <type_traits>
16 
17 #include <seqan3/core/platform.hpp>
18 
19 namespace seqan3::detail
20 {
21 
30 template <typename index_t>
31 struct fm_index_cursor_node
32 {
34  using size_type = typename index_t::size_type;
38  using sdsl_char_type = typename index_t::sdsl_char_type;
39 
41  size_type lb;
43  size_type rb;
45  size_type depth;
47  sdsl_char_type last_char;
48 
50  bool operator==(fm_index_cursor_node const & rhs) const
51  {
52  // NOTE: last_char is implementation specific for cycle_back().
53  // lb, rb and depth already determine the node in the suffix tree.
54  // Thus there is no need to compare last_char.
55  return std::tie(lb, rb, depth) == std::tie(rhs.lb, rhs.rb, rhs.depth);
56  }
57 
59  bool operator!=(fm_index_cursor_node const & rhs) const
60  {
61  return !(*this == rhs);
62  }
63 };
64 
65 // std::tuple get_suffix_array_range(fm_index_cursor<index_t> const & it)
66 // {
67 // return {node.lb, node.rb};
68 // }
69 //
70 // std::tuple get_suffix_array_range(bi_fm_index_cursor<index_t> const & it)
71 // {
72 // return {node.lb, node.rb};
73 // }
74 
76 
78 
79 }
Provides platform and dependency checks.
T tie(T... args)
T operator!=(T... args)
Definition: aligned_sequence_concept.hpp:35