Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ csr_to_dense_matrix()

template<typename T >
Eigen::Matrix< value_type_t< T >, Eigen::Dynamic, Eigen::Dynamic > stan::math::csr_to_dense_matrix ( int  m,
int  n,
const T &  w,
const std::vector< int > &  v,
const std::vector< int > &  u 
)
inline

Construct a dense Eigen matrix from the CSR format components.

Template Parameters
Ttype of the matrix
Parameters
[in]mNumber of matrix rows.
[in]nNumber of matrix columns.
[in]wValues of non-zero matrix entries.
[in]vColumn index for each value in w.
[in]uIndex of where each row starts in w.
Returns
Dense matrix defined by previous arguments.
Exceptions
std::domain_errorIf the arguments do not define a matrix.
std::invalid_argumentif m/n/w/v/u are not internally consistent, as defined by the indexing scheme. Extractors are defined in Stan which guarantee a consistent set of m/n/w/v/u for a given sparse matrix.
std::out_of_rangeif any of the indices are out of range.

Definition at line 35 of file csr_to_dense_matrix.hpp.