Fix some sonar issues in the code

This commit is contained in:
2024-07-04 12:34:54 +02:00
parent 8c536cfc65
commit 32b956a361
5 changed files with 20 additions and 21 deletions

View File

@@ -66,9 +66,9 @@ namespace mdlp {
}
}
// Insert first & last X value to the cutpoints as them shall be ignored in transform
auto minmax = std::minmax_element(X.begin(), X.end());
cutPoints.push_back(*minmax.second);
cutPoints.insert(cutPoints.begin(), *minmax.first);
auto [vmin, vmax] = std::minmax_element(X.begin(), X.end());
cutPoints.push_back(*vmax);
cutPoints.insert(cutPoints.begin(), *vmin);
}
pair<precision_t, size_t> CPPFImdlp::valueCutPoint(size_t start, size_t cut, size_t end)