1#ifndef STAN_MATH_PRIM_FUN_CSR_TO_DENSE_MATRIX_HPP
2#define STAN_MATH_PRIM_FUN_CSR_TO_DENSE_MATRIX_HPP
34inline Eigen::Matrix<value_type_t<T>, Eigen::Dynamic, Eigen::Dynamic>
36 const std::vector<int>& u) {
45 u[m - 1] +
csr_u_to_z(u, m - 1) - 1,
"v", v.size());
49 const auto& w_ref =
to_ref(w);
50 Matrix<value_type_t<T>, Dynamic, Dynamic> result(m, n);
57 check_range(
"csr_to_dense_matrix",
"w", w.size(), row_end_in_w);
auto row(T_x &&x, size_t j)
Return the specified row of the specified kernel generator expression using start-at-1 indexing.
ref_type_t< T && > to_ref(T &&a)
This evaluates expensive Eigen expressions.
void check_positive(const char *function, const char *name, const T_y &y)
Check if y is positive.
void check_range(const char *function, const char *name, int max, int index, int nested_level, const char *error_msg)
Check if specified index is within range.
void check_size_match(const char *function, const char *name_i, T_size1 i, const char *name_j, T_size2 j)
Check if the provided sizes match.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...