if (slot->getHistoryLength() >= slidingWindowBufferSize - 1) { //-1 because actual value is not in the history
if (slot->getNumberOfRelativesToActualValue(thresholdToBeStable) < minNumOfRelatedValuesToBeStable) { //-1 because actual value is also on of minNumOfRelatedValuesToBeStable
flagAllVariablesAreStable = false;
}
}
else {
return false;
}
}
return flagAllVariablesAreStable;
}
//Sorting with bigger Value in Front
struct descending
{
template<class T>
bool operator()(T const &a, T const &b) const { return a > b; }