@@ -54,6 +54,7 @@ class accelerated_linear
54
54
}
55
55
}
56
56
57
+ public:
57
58
std::pair<CorpusIter, CorpusIter> AL (CorpusIter corpus_first, CorpusIter corpus_last) const
58
59
{
59
60
using std::find;
@@ -122,21 +123,12 @@ class accelerated_linear
122
123
return make_pair (corpus_last, corpus_last);
123
124
}
124
125
125
- public:
126
126
accelerated_linear (PatIter pat_first, PatIter pat_last) : pat_first(pat_first), pat_last(pat_last), k_pattern_length(std::distance(pat_first, pat_last))
127
127
{
128
128
if (k_pattern_length > 0 )
129
129
compute_next ();
130
130
}
131
131
132
- /* *
133
- * Run the search object on a corpus with forward or bidirectional iterators.
134
- */
135
- std::pair<CorpusIter, CorpusIter>
136
- operator ()(CorpusIter corpus_first, CorpusIter corpus_last) const
137
- {
138
- return AL (corpus_first, corpus_last);
139
- }
140
132
};
141
133
142
134
@@ -150,10 +142,20 @@ typename disable_if<
150
142
boost::is_base_of<std::random_access_iterator_tag, typename std::iterator_traits<CorpusIter>::iterator_category>,
151
143
boost::mpl::bool_<Trait::suffix_size>
152
144
>::type
153
- >::type> : public accelerated_linear<PatIter, CorpusIter, Trait>
145
+ >::type> : private accelerated_linear<PatIter, CorpusIter, Trait>
154
146
{
147
+ using accelerated_linear<PatIter, CorpusIter, Trait>::AL;
155
148
public:
156
149
musser_nishanov (PatIter pat_first, PatIter pat_last) : accelerated_linear<PatIter, CorpusIter, Trait>(pat_first, pat_last) {}
150
+
151
+ /* *
152
+ * Run the search object on a corpus with forward or bidirectional iterators.
153
+ */
154
+ std::pair<CorpusIter, CorpusIter>
155
+ operator ()(CorpusIter corpus_first, CorpusIter corpus_last) const
156
+ {
157
+ return AL (corpus_first, corpus_last);
158
+ }
157
159
};
158
160
159
161
0 commit comments