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

◆ to_soa_sparse_matrix() [1/3]

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

Create a sparse matrix from the given SoA matrix and indexes.

Template Parameters
OptionsEigen matrix options.
VarMatrixA var_value with a dense vector inner 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 32 of file to_soa_sparse_matrix.hpp.