1#ifndef STAN_MATH_PRIM_FUN_ALL_HPP
2#define STAN_MATH_PRIM_FUN_ALL_HPP
20template <
typename T, require_t<std::is_convertible<T,
bool>>* =
nullptr>
21constexpr inline bool all(T x) {
35template <
typename ContainerT,
37inline bool all(ContainerT&& x) {
38 return make_holder([](
auto&& x_) {
return x_.all(); },
39 std::forward<ContainerT>(x));
43template <
typename... Types>
44inline bool all(
const std::tuple<Types...>& x);
57template <
typename InnerT>
58inline bool all(
const std::vector<InnerT>& x) {
59 return std::all_of(x.begin(), x.end(), [](
auto&& i) { return all(i); });
71template <
typename... Types>
72inline bool all(
const std::tuple<Types...>& x) {
75 [&all_true](
auto&& i) {
76 all_true = all_true &&
all(i);
require_t< container_type_check_base< is_eigen, scalar_type_t, TypeCheck, Check... > > require_eigen_st
Require type satisfies is_eigen.
constexpr bool all(T x)
Return true if all 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 ...