1 #ifndef STAN_MATH_PRIM_ARR_FUN_REP_ARRAY_HPP 2 #define STAN_MATH_PRIM_ARR_FUN_REP_ARRAY_HPP 12 inline std::vector<T>
rep_array(
const T& x,
int n) {
14 return std::vector<T>(n, x);
18 inline std::vector<std::vector<T> >
rep_array(
const T& x,
int m,
int n) {
22 return vector<vector<T> >(m, vector<T>(n, x));
26 inline std::vector<std::vector<std::vector<T> > >
rep_array(
const T& x,
int k,
32 return vector<vector<vector<T> > >(k, vector<vector<T> >(m, vector<T>(n, x)));
void check_nonnegative(const char *function, const char *name, const T_y &y)
Check if y is non-negative.
std::vector< T > rep_array(const T &x, int n)