For consistency, adding the plus/minus one here too.
It makes no difference to the BP analysis, because there are always some fully switched points.
This commit is contained in:
@ -17,7 +17,7 @@
|
||||
double highestPointBeforeSwitching(const vector<double> &lower_filter, const vector<double> &higher_filter) {
|
||||
|
||||
// find the highest value in lower_filter that is lower than all entries in higher_filter
|
||||
double highest_point_before_switching = *min_element(lower_filter.begin(),lower_filter.end());
|
||||
double highest_point_before_switching = *min_element(lower_filter.begin(),lower_filter.end())-1;
|
||||
|
||||
double lowest_entry_in_higher_filter = *min_element(higher_filter.begin(),higher_filter.end());
|
||||
for(vector<double>::const_iterator it = lower_filter.begin(); it != lower_filter.end(); ++it) {
|
||||
@ -35,7 +35,7 @@ double highestPointBeforeSwitching(const vector<double> &lower_filter, const vec
|
||||
double lowestPointAfterSwitching(const vector<double> &higher_filter, const vector<double> &lower_filter) {
|
||||
|
||||
// find the lowest value in higher_filter that is higher than all entries in lower_filter
|
||||
double lowest_point_after_switching = *max_element(higher_filter.begin(),higher_filter.end());
|
||||
double lowest_point_after_switching = *max_element(higher_filter.begin(),higher_filter.end())+1;
|
||||
|
||||
double highest_entry_in_lower_filter = *max_element(lower_filter.begin(),lower_filter.end());
|
||||
for(vector<double>::const_iterator it = higher_filter.begin(); it != higher_filter.end(); ++it) {
|
||||
|
Reference in New Issue
Block a user