1#ifndef STAN_MATH_PRIM_FUN_STAN_PRINT_HPP
2#define STAN_MATH_PRIM_FUN_STAN_PRINT_HPP
13template <
typename T, require_not_container_t<T>* =
nullptr,
14 require_not_tuple_t<T>* =
nullptr>
19template <
typename EigVec, require_eigen_vector_t<EigVec>* =
nullptr>
21 const auto& x_ref =
to_ref(x);
24 for (
int i = 0; i < x_ref.size(); ++i) {
33template <
typename EigMat, require_eigen_t<EigMat>* =
nullptr,
34 require_not_eigen_vector_t<EigMat>* =
nullptr>
36 const auto& x_ref =
to_ref(x);
39 for (
int i = 0; i < x_ref.rows(); ++i) {
44 for (
int j = 0; j < x_ref.cols(); ++j) {
56template <
typename T, require_tuple_t<T>* =
nullptr>
59template <
typename T, require_std_vector_t<T>* =
nullptr>
62 for (
size_t i = 0; i < x.size(); ++i) {
71template <
typename T, require_tuple_t<T>*>
constexpr auto for_each(F &&f, T &&t)
Apply a function to each element of a tuple.
void stan_print(std::ostream *o, const T &x)
ref_type_t< T && > to_ref(T &&a)
This evaluates expensive Eigen expressions.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...