This forum has been archived. All content is frozen. Please use KDE Discuss instead.

SPSQ segfault

Tags: None
(comma "," separated)
evouga
Registered Member
Posts
4
Karma
0

SPSQ segfault

Sat Jan 26, 2013 10:13 am
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.
evouga
Registered Member
Posts
4
Karma
0

Re: SPSQ segfault

Sat Jan 26, 2013 11:03 pm
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.
Dee33
Registered Member
Posts
54
Karma
0
OS

Re: SPSQ segfault

Tue Jan 29, 2013 4:49 pm
Yes this is right. Thanks for reporting it.
It is now fixed in the devel branch.
Thanks


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]