How to set SparseMatrix.valuePtr(), SparseMatrix.outerIndexPtr() and SparseMatrix.innerIndexPtr() for CSR Format?
问题 I already have my sparse matrix data in CSR format, ie: I already have data for non zero values ( in the form of double[] ), the row and the column index ( both in the form of int[] ) of the non zero values. My problem is, how can I assign them directly to Sparse Matrix in eigen library? I know that the relevant fields in Sparse Matrix are valuePtr , outerIndexPtr and innerIndexPtr , but I can't set the pointer directly as per below: //the relevant SpMat fields (valuePtr,outerIndexPtr