1 #ifndef STAN_MATH_PRIM_FUN_AS_VALUE_COLUMN_VECTOR_OR_SCALAR
2 #define STAN_MATH_PRIM_FUN_AS_VALUE_COLUMN_VECTOR_OR_SCALAR
3 
4 #include <stan/math/prim/fun/Eigen.hpp>
5 #include <stan/math/prim/meta.hpp>
6 #include <stan/math/prim/fun/as_column_vector_or_scalar.hpp>
7 #include <stan/math/prim/fun/value_of.hpp>
8 #include <vector>
9 
10 namespace stan {
11 namespace math {
12 
13 /**
14  * Extract values from input argument and transform to a column vector. For
15  * scalar this returns a scalar. For arithmetic types this is an identity
16  * function.
17  *
18  * @tparam T Type of scalar element.
19  * @param a Specified scalar.
20  * @return the scalar.
21  */
22 template <typename T>
as_value_column_vector_or_scalar(T && a)23 inline auto as_value_column_vector_or_scalar(T&& a) {
24   return value_of(as_column_vector_or_scalar(std::forward<T>(a)));
25 }
26 
27 }  // namespace math
28 }  // namespace stan
29 
30 #endif
31