Sunday 15 September 2013

C++ armadillo sparse matrix batch insertion -



C++ armadillo sparse matrix batch insertion -

i looking @ batch insertion sparse matrices in armadillo in docs "http://arma.sourceforge.net/docs.html#batch_constructors_sp_mat".

it defines form1 as:

form 1: sp_mat(rowind, colptr, values, n_rows, n_cols)

what colptr hold? if understand correctly, should have actual address whatever columns want insert @ ?

seems unusual me rowind not pointers colptr pointers. reason this?

armadillo uses standard compressed sparse column (csc) format storing sparse matrix data. format known compressed column storage (ccs) , harwell-boeing. row indices , column pointers explained on several sites:

wikipedia: http://en.wikipedia.org/wiki/sparse_matrix#compressed_sparse_column_.28csc_or_ccs.29 netlib: http://netlib.org/linalg/html_templates/node92.html http://www.cs.colostate.edu/~mroberts/toolbox/c++/sparsematrix/sparse_matrix_compression.html

the csc format used compatibility existing sparse solvers, etc.

c++ matrix sparse-matrix armadillo

No comments:

Post a Comment