1#ifndef STAN_MATH_PRIM_FUN_ONE_HOT_ROW_VECTOR_HPP
2#define STAN_MATH_PRIM_FUN_ONE_HOT_ROW_VECTOR_HPP
21 static constexpr const char* function =
"one_hot_row_vector";
25 Eigen::RowVectorXd ret = Eigen::RowVectorXd::Zero(K);
void check_bounded(const char *function, const char *name, const T_y &y, const T_low &low, const T_high &high)
Check if the value is between the low and high values, inclusively.
void check_positive(const char *function, const char *name, const T_y &y)
Check if y is positive.
Eigen::RowVectorXd one_hot_row_vector(int K, int k)
Return a row vector with 1 in the k-th position and zero elsewhere.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...