| Stan Math Library 2.12.0 reverse mode automatic differentiation

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

rep_row_vector.hpp
Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_REP_ROW_VECTOR_HPP
2 #define STAN_MATH_PRIM_MAT_FUN_REP_ROW_VECTOR_HPP
3
4 #include <boost/math/tools/promotion.hpp>
5 #include <stan/math/prim/scal/err/check_nonnegative.hpp>
6 #include <stan/math/prim/mat/fun/Eigen.hpp>
7
8 namespace stan {
9 namespace math {
10
11 template <typename T>
12 inline Eigen::Matrix<typename boost::math::tools::promote_args<T>::type,
13 1, Eigen::Dynamic>
14 rep_row_vector(const T& x, int m) {
15 check_nonnegative("rep_row_vector", "m", m);
16 return Eigen::Matrix<typename boost::math::tools::promote_args<T>::type,
17 1, Eigen::Dynamic>::Constant(m, x);
18 }
19
20 }
21 }
22
23 #endif
stan
Definition: log_sum_exp.hpp:8
stan::math::rep_row_vector
Eigen::Matrix< typename boost::math::tools::promote_args< T >::type, 1, Eigen::Dynamic > rep_row_vector(const T &x, int m)
Definition: rep_row_vector.hpp:14
check_nonnegative.hpp
Eigen.hpp
stan::math::check_nonnegative
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
Definition: check_nonnegative.hpp:64

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