1#ifndef STAN_MATH_PRIM_FUN_ANY_HPP
2#define STAN_MATH_PRIM_FUN_ANY_HPP
20template <
typename T, require_t<std::is_convertible<T,
bool>>* =
nullptr>
21constexpr inline bool any(T x) {
35template <
typename ContainerT,
37inline bool any(ContainerT&& x) {
38 return make_holder([](
auto&& x_) {
return x_.any(); },
39 std::forward<ContainerT>(x));
43template <
typename... Types>
44inline bool any(
const std::tuple<Types...>& x);
57template <
typename InnerT>
58inline bool any(
const std::vector<InnerT>& x) {
59 return std::any_of(x.begin(), x.end(), [](
auto&& i) { return any(i); });
71template <
typename... Types>
72inline bool any(
const std::tuple<Types...>& x) {
73 bool any_true =
false;
75 [&any_true](
auto&& i) {
76 any_true = any_true ||
any(i);
require_t< container_type_check_base< is_eigen, scalar_type_t, TypeCheck, Check... > > require_eigen_st
Require type satisfies is_eigen.
constexpr bool any(T x)
Return true if any values in the input are true.
constexpr void for_each(F &&f, const std::tuple<> &)
Apply a function to each element of a tuple.
auto make_holder(F &&func, Args &&... args)
Calls given function with given arguments.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...