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

◆ to_soa_sparse_matrix() [3/3]

template<int Options = Eigen::ColMajor, typename Mat , typename Vec1 , typename Vec2 , require_eigen_dense_base_vt< std::is_arithmetic, Mat > * = nullptr, require_all_std_vector_vt< std::is_integral, Vec1, Vec2 > * = nullptr>
auto stan::math::to_soa_sparse_matrix ( int  m,
int  n,
Mat &&  w,
Vec1 &&  u,
Vec2 &&  v 
)
inline

Create a sparse matrix from the given matrix of floats and indexes.

Template Parameters
OptionsEigen matrix options.
MatA type inheriting from Eigen::DenseBase with an arithmetic scalar type
Vec1Container type of the column indexes.
Vec2Container type of the row indexes.
Parameters
mNumber of rows in matrix.
nNumber of columns in matrix.
wVector of non-zero values in matrix.
uIndex of where each row starts in w, length equal to the number of rows plus one.
vColumn index of each non-zero value, same length as w.
Returns
Sparse matrix.

Definition at line 113 of file to_soa_sparse_matrix.hpp.