1#ifndef STAN_MATH_PRIM_FUN_NORM1_HPP
2#define STAN_MATH_PRIM_FUN_NORM1_HPP
19template <
typename T, require_eigen_vt<std::is_arithmetic, T>* =
nullptr>
20inline double norm1(
const T& v) {
22 return v_ref.template lpNorm<1>();
33template <
typename Container, require_std_vector_t<Container>* =
nullptr>
34inline auto norm1(
const Container& x) {
35 return apply_vector_unary<Container>::reduce(
36 x, [](
const auto& v) {
return norm1(v); });
auto norm1(const Container &x)
Compute the L1 norm of the specified vector of values.
typename ref_type_if< true, T >::type ref_type_t
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...