Stan  2.5.0
probability, sampling & optimization
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
rep_vector.hpp
Go to the documentation of this file.
1 #ifndef STAN__MATH__REP_VECTOR_HPP
2 #define STAN__MATH__REP_VECTOR_HPP
3 
4 #include <boost/math/tools/promotion.hpp>
7 
8 namespace stan {
9 
10  namespace math {
11 
12  template <typename T>
13  inline
14  Eigen::Matrix<typename boost::math::tools::promote_args<T>::type,
15  Eigen::Dynamic,1>
16  rep_vector(const T& x, int n) {
17  check_nonnegative("rep_vector(%1%)", n,"n", (double*)0);
18  return Eigen::Matrix<typename boost::math::tools::promote_args<T>::type,
19  Eigen::Dynamic,1>::Constant(n,x);
20  }
21 
22 
23  }
24 }
25 
26 #endif
Eigen::Matrix< typename boost::math::tools::promote_args< T >::type, Eigen::Dynamic, 1 > rep_vector(const T &x, int n)
Definition: rep_vector.hpp:16
bool check_nonnegative(const char *function, const T_y &y, const char *name, T_result *result)

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