Stan Math Library  2.20.0
reverse mode automatic differentiation
as_array_or_scalar.hpp
Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_AS_ARRAY_OR_SCALAR_HPP
2 #define STAN_MATH_PRIM_SCAL_FUN_AS_ARRAY_OR_SCALAR_HPP
3 
4 namespace stan {
5 namespace math {
6 
14 template <typename T>
15 inline const T& as_array_or_scalar(const T& v) {
16  return v;
17 }
18 
19 } // namespace math
20 } // namespace stan
21 
22 #endif
Eigen::ArrayWrapper< const Eigen::Matrix< T, R, C > > as_array_or_scalar(const Eigen::Matrix< T, R, C > &v)
Converts a matrix type to an array.

     [ Stan Home Page ] © 2011–2018, Stan Development Team.