Files
Flux/include/numerics/vecmax.h
T
Bausager 66b3a4ee6b
Sync public mirror / sync (push) Successful in 27s
CatagoricalCrossentrophy
Fixed the loss functions for categories and is ready for accuracy calculation on page 129
2025-10-07 13:09:25 +02:00

23 lines
312 B
C++

#pragma once
#include "./utils/vector.h"
namespace numerics{
template <typename T>
T vecmax(const utils::Vector<T>& a){
T max_value(T{0});
uint64_t N = a.size();
for (uint64_t i = 0; i < N; ++i){
max_value = numerics::max(max_value, a[i]);
}
return max_value;
}
} // namespace numerics