summaryrefslogtreecommitdiff
path: root/src/support/suffix_tree.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/support/suffix_tree.h')
-rw-r--r--src/support/suffix_tree.h11
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();