1 #ifndef STAN_MATH_PRIM_MAT_FUN_CSR_TO_DENSE_MATRIX_HPP
2 #define STAN_MATH_PRIM_MAT_FUN_CSR_TO_DENSE_MATRIX_HPP
34 inline Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>
37 const Eigen::Matrix<T, Eigen::Dynamic, 1>& w,
38 const std::vector<int>& v,
39 const std::vector<int>& u) {
50 for (
size_t i = 0; i < v.size(); ++i)
53 Matrix<T, Dynamic, Dynamic> result(m, n);
58 check_range(
"csr_to_dense_matrix",
"w", w.size(), row_end_in_w);
60 nze < row_end_in_w; ++nze) {
bool check_range(const char *function, const char *name, const int max, const int index, const int nested_level, const char *error_msg)
Return true if specified index is within range.
Eigen::Matrix< T, 1, Eigen::Dynamic > row(const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m, size_t i)
Return the specified row of the specified matrix, using start-at-1 indexing.
bool check_positive(const char *function, const char *name, const T_y &y)
Return true if y is positive.
bool check_size_match(const char *function, const char *name_i, T_size1 i, const char *name_j, T_size2 j)
Return true if the provided sizes match.