diff --git a/include/digest/digester.hpp b/include/digest/digester.hpp index c0a5470..9491a28 100644 --- a/include/digest/digester.hpp +++ b/include/digest/digester.hpp @@ -207,7 +207,7 @@ template class Digester { * @throws BadConstructionException thrown if the starting position is * greater than the length of the string */ - void new_seq(const char *seq, size_t len, size_t start) { + virtual void new_seq(const char *seq, size_t len, size_t start) { this->seq = seq; this->len = len; this->offset = 0; @@ -231,7 +231,7 @@ template class Digester { * @throws BadConstructionException thrown if the starting position is * greater than the length of the string */ - void new_seq(const std::string &seq, size_t pos) { + virtual void new_seq(const std::string &seq, size_t pos) { new_seq(seq.c_str(), seq.size(), pos); } diff --git a/include/digest/window_minimizer.hpp b/include/digest/window_minimizer.hpp index d3811ce..6dbeef6 100644 --- a/include/digest/window_minimizer.hpp +++ b/include/digest/window_minimizer.hpp @@ -131,6 +131,16 @@ template class WindowMin : public Digester

{ } } + void new_seq(const char *seq, size_t len, size_t start) override { + ds = T(large_window); + Digester

::new_seq(seq, len, start); + } + + void new_seq(const std::string &seq, size_t pos) override { + ds = T(large_window); + Digester

::new_seq(seq.c_str(), seq.size(), pos); + } + /** * * @return unsigned, the value of large_window