Registered Member
|
Is this a correct usage of the sparse QR API?
void QRSolver::solve(const Eigen::SparseMatrix<double> &J, const Eigen::VectorXd &f, Eigen::VectorXd &deltaX, double regularization) { assert(J.cols() == f.size()); Eigen::SPQR<Eigen::SparseMatrix<double> > solver(J); deltaX = solver.solve(f); } I am getting a segfault in PermutationMatrix.h line 588. My matrix J is non-square, if that makes a difference. |
Registered Member
|
For anyone else having this problem:
The bug is in the SPQR's solve() method -- for rectangular matrices the result after multiplying the rhs by Q^T must be truncated before attempting to solve the triangular system. |
Registered Member
|
Yes this is right. Thanks for reporting it.
It is now fixed in the devel branch. Thanks |
Registered users: Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]