Commit 5a1f69c3 authored by Mikaël Salson's avatar Mikaël Salson

CountAffectAnalyser: searchMax is an internal function, and iter should not be used for any purpose

parent aff66710
......@@ -185,6 +185,7 @@ class CountKmerAffectAnalyser: public KmerAffectAnalyser<T> {
* Search the maximum. Used by firstMax and lastMax.
* @param iter: should be either 1 or -1
int searchMax(const T&before, const T &after,
int start, int end, int iter, int min) const;
......@@ -344,8 +345,8 @@ template <class T>
int CountKmerAffectAnalyser<T>::searchMax(const T&before, const T& after,
int start, int end, int iter, int min) const {
int first_pos_max = -1;
for (int i = start; i <= end; i+=iter) {
int max_value = min;
for (int i = start; i*iter <= end; i+=iter) {
int value = countBefore(before, i) + countAfter(after, i);
if (value > max_value) {
max_value = value;
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment