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

◆ to_soa_sparse_matrix() [2/3]

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

Create a sparse matrix from the given AoS matrix of vars and indexes.

Template Parameters
OptionsEigen matrix options.
MatrixVarA type inheriting from Eigen::DenseBase with a scalar type of var_value
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 66 of file to_soa_sparse_matrix.hpp.