diff options
Diffstat (limited to 'src/support/suffix_tree.h')
-rw-r--r-- | src/support/suffix_tree.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/support/suffix_tree.h b/src/support/suffix_tree.h index 474984dcd..4ce61767d 100644 --- a/src/support/suffix_tree.h +++ b/src/support/suffix_tree.h @@ -58,6 +58,10 @@ public: /// The start indices of each occurrence. std::vector<unsigned> StartIndices; + + bool operator==(const RepeatedSubstring& other) const { + return Length == other.Length && StartIndices == other.StartIndices; + } }; private: @@ -168,8 +172,15 @@ public: void advance(); public: + using iterator_category = std::input_iterator_tag; + using value_type = RepeatedSubstring; + using difference_type = std::ptrdiff_t; + using pointer = const RepeatedSubstring*; + using reference = const RepeatedSubstring&; + /// Return the current repeated substring. RepeatedSubstring& operator*() { return RS; } + RepeatedSubstring* operator->() { return &RS; } RepeatedSubstringIterator& operator++() { advance(); |