[eigen] Defining a SparseMatrix with RowMajor

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


Hi,

I've been playing around with Eigens SparseMatrix and am now trying to
implement an export function to my own SparseMatrix class. As my own
class uses CSR/CRS plus some additional details, I planned on copying
the data from the Eigen SM after calling makeCompressed() through
valuePtr(), innerIndexPtr() and outerIndexPtr().

But after some tests and many printf's, it seems I am unable to define
the Eigen SM as RowMajor.
I used:
Eigen::SparseMatrix<int, 1> esm(10, 10);

But the resulting matrix is always ColMajor. What is the correct way to
define a RowMajor Eigen SparseMatrix? I could not find any hints on that.

Additionally, I would like to know how I can detect whether a given
SparseMatrix is RowMajor or ColMajor - there seems to be no function
like "isRowMajor()", etc. - but that is required for me to export the
data through valuePtr(), innerIndexPtr() and outerIndexPtr() - or is
this a misunderstanding on my side?

Thank you very much, I appreciate your help,

Philipp

Attachment: smime.p7s
Description: S/MIME Kryptografische Unterschrift



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/