Registered Member
|
the latest version (3.2.0) Eigen .
SparseQR<SpMat, AMDOrdering<int> > solver; solver.compute(A); A is a large Sparse Matrix . the error is "Assertion failed: aLhs.rows() == aRhs.rows() && aLhs.cols() == aRhs.cols(), file.....\core\cwisebinaryop.h" could anyone help me to get over this problem? how to use the SparseQR correctly? thanks~ |
Moderator
|
Im' not sure AMD ordering is compatible with QR. You should try first with COLAMDOrdering. If you still get an error, then your matrix must have something special. Are you sure it has been properly filled? One option is that you save it to a file and send a compressed version of it:
#include <unsupported/Eigen/SparseExtra> ... saveMarket("filename.mtx", A); |
Registered Member
|
The AMD ordering need a matrix with a symmetric pattern. For non symmetric patterns, the pattern of A^T + A is built first.
You will have that kind of error If the matrix is rectangular. As Gael suggests, it's better to use the COLAMD ordering with Sparse QR. We will update the documentation on that point. |
Registered users: Bing [Bot], Google [Bot], Sogou [Bot]