5#ifndef INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_LINALG_VECTOR_IDX_ABS_MAX_HPP_
6#define INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_LINALG_VECTOR_IDX_ABS_MAX_HPP_
8#include "arene/base/algorithm/detail/relative_find.hpp"
11#include "arene/base/detail/make_range_from_indexable.hpp"
12#include "arene/base/functional/detail/flip.hpp"
13#include "arene/base/linalg/detail/constraints_for.hpp"
17#include "arene/base/math/detail/less_nan_highest.hpp"
18#include "arene/base/stdlib_choice/declval.hpp"
19#include "arene/base/stdlib_choice/enable_if.hpp"
20#include "arene/base/stdlib_choice/numeric_limits.hpp"
34class algorithm_constraints<class vector_idx_abs_max_fn> {
54 template <
typename InVec,
typename Norm>
58 partially_ordered_constraints<invoke_result_t<Norm&, math_reference_t<InVec>>>>;
62class vector_idx_abs_max_fn {
92 typename Norm =
decltype(complex_l1_norm),
93 constraints_for<vector_idx_abs_max_fn, InVec, Norm> =
nullptr>
94 constexpr auto operator()(InVec vec, Norm norm = {})
const noexcept(
95 noexcept(algorithm_detail::relative_find(
98 math_detail::less_nan_highest,
103 return std::numeric_limits<math_size_t<InVec>>::max();
106 auto const values = arene::base::detail::make_range_from_indexable(vec);
112 auto const iter = algorithm_detail::relative_find(
115 functional_detail::flip(math_detail::less_nan_highest),
#define ARENE_CPP14_INLINE_VARIABLE(type, name)
Emulates C++17's inline variable declarations for function objects.
Definition cpp14_inline.hpp:69
typename math_traits< T >::size_type math_size_t
The mdspan-equivalent size type of T if T is a linalg object, or a substitution error if not.
Definition math_traits.hpp:81
Definition accumulate.hpp:37
typename constraints_impl::constraints< EnableIfs... >::type constraints
Helper used to express template constraints in a consistent way using std::enable_if_t.
Definition constraints.hpp:51
Definition accumulate.hpp:36
typename enable_if< Condition, Type >::type enable_if_t
Type alias to support constraining templates. Is an alias for the specified type if the Condition is ...
Definition enable_if.hpp:41
auto declval() noexcept -> T &&
A dummy function that is declared but not defined, with a user-specified return type,...
constexpr auto end(Element(&array)[Size]) noexcept -> Element *
Obtain a pointer to the one-past-the-end element of the array.
Definition end.hpp:28
constexpr auto begin(Element(&array)[Size]) noexcept -> Element *
Obtain a pointer to the first element of the array.
Definition begin.hpp:28