Skip to content

num::kernel::argmax_abs

Defined in header <kernel/vector.hpp>

template <std::floating_point T>
idx argmax_abs(const T *x, idx n) noexcept;

Find the entry of largest magnitude (IAMAX): \(\arg\max_i |x_i|\). Returns 0 when n is 0.