1#ifndef STAN_MATH_PRIM_FUN_LINSPACED_ARRAY_HPP
2#define STAN_MATH_PRIM_FUN_LINSPACED_ARRAY_HPP
27 static constexpr const char* function =
"linspaced_array";
37 Eigen::VectorXd v = Eigen::VectorXd::LinSpaced(K, low, high);
38 return {&v[0], &v[0] + K};
void check_nonnegative(const char *function, const char *name, const T_y &y)
Check if y is non-negative.
void check_greater_or_equal(const char *function, const char *name, const T_y &y, const T_low &low, Idxs... idxs)
Throw an exception if y is not greater or equal than low.
std::vector< double > linspaced_array(int K, double low, double high)
Return an array of linearly spaced elements.
void check_finite(const char *function, const char *name, const T_y &y)
Return true if all values in y are finite.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...