Fixed typo in MLPPVector::min_element() and MLPPVector::min_element_index().

This commit is contained in:
Relintai 2023-12-28 20:32:56 +01:00
parent f409265513
commit edb6cd4dbf

View File

@ -1208,7 +1208,7 @@ real_t MLPPVector::min_element() const {
for (int i = 0; i < _size; i++) { for (int i = 0; i < _size; i++) {
real_t current_element = aa[i]; real_t current_element = aa[i];
if (current_element > min_element) { if (current_element < min_element) {
min_element = current_element; min_element = current_element;
} }
} }
@ -1224,7 +1224,7 @@ int MLPPVector::min_element_index() const {
for (int i = 0; i < _size; i++) { for (int i = 0; i < _size; i++) {
real_t current_element = aa[i]; real_t current_element = aa[i];
if (current_element > min_element) { if (current_element < min_element) {
min_element = current_element; min_element = current_element;
index = i; index = i;
} }