1#ifndef STAN_MATH_PRIM_FUN_REP_MATRIX_HPP
2#define STAN_MATH_PRIM_FUN_REP_MATRIX_HPP
21template <
typename Ret,
typename T,
22 require_eigen_matrix_dynamic_vt<is_stan_scalar, Ret>* =
nullptr,
23 require_stan_scalar_t<T>* =
nullptr>
27 return Ret::Constant(m, n, x);
39template <
typename T, require_stan_scalar_t<T>* =
nullptr>
42 Eigen::Matrix<return_type_t<T>, Eigen::Dynamic, Eigen::Dynamic>>(x, m, n);
53template <
typename Vec, require_eigen_vector_t<Vec>* =
nullptr>
57 return x.replicate(n, 1);
60 return x.replicate(1, n);
auto rep_matrix(const value_type_t< T > &x, int n, int m)
Creates a matrix_cl by replicating the given value of arithmetic type.
void check_nonnegative(const char *function, const char *name, const T_y &y)
Check if y is non-negative.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
If the input type T is an eigen matrix with 1 column at compile time this has a static member with a ...