Stan Math Library  2.20.0
reverse mode automatic differentiation
as_scalar.hpp
Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_ARR_FUN_AS_SCALAR_HPP
2 #define STAN_MATH_PRIM_ARR_FUN_AS_SCALAR_HPP
3 
4 #include <vector>
5 #include <stdexcept>
6 
7 namespace stan {
8 namespace math {
9 
19 template <typename T>
20 inline double as_scalar(const std::vector<T>& a) {
21  throw std::runtime_error("A vector can not be used as a scalar!");
22 }
23 
24 } // namespace math
25 } // namespace stan
26 
27 #endif
double as_scalar(const std::vector< T > &a)
Converts input to a scalar.
Definition: as_scalar.hpp:20

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