All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros
rep_row_vector.hpp
Go to the documentation of this file.
#ifndef STAN_MATH_PRIM_MAT_FUN_REP_ROW_VECTOR_HPP
#define STAN_MATH_PRIM_MAT_FUN_REP_ROW_VECTOR_HPP
#include <boost/math/tools/promotion.hpp>
#include <stan/math/prim/scal/err/check_nonnegative.hpp>
#include <stan/math/prim/mat/fun/Eigen.hpp>
namespace stan {
namespace math {
template <typename T>
inline Eigen::Matrix<typename boost::math::tools::promote_args<T>::type,
1, Eigen::Dynamic>
rep_row_vector(const T& x, int m) {
using stan::math::check_nonnegative;
check_nonnegative("rep_row_vector", "m", m);
return Eigen::Matrix<typename boost::math::tools::promote_args<T>::type,
1, Eigen::Dynamic>::Constant(m, x);
}
}
}
#endif
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:15
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:66

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