[eigen] Complete orthogonal decomposition rank computation corner case |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen <eigen@xxxxxxxxxxxxxxxxxxx>
- Subject: [eigen] Complete orthogonal decomposition rank computation corner case
- From: Simon Rutishauser <simon.rutishauser@xxxxxxxxx>
- Date: Thu, 16 Jun 2016 08:41:31 +0200
- Cc: rmlarsen@xxxxxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pix4d.com; s=google; h=from:to:cc:subject:date:message-id:user-agent:mime-version :content-transfer-encoding; bh=dLhRqXQ4ol9hHWg6h9VV3Zn+crhKqpqMseG6Vsb4SxY=; b=AeleHaUgQ871R7sHEhTAfbKePot0ZJ7DxE1DYY6liTQI0F73zSxFytTl06M2CR2Ctl gNctNcCoGlxNU2D5L7ZZYm24cklOT2RgiRzBJd47+PvqgKtiggZ1dsrtr+E4lHtB7sJB XCGdLaSZ1PH0XD603ns+aA8nscr/C0F7fdQ0M=
This is a multi-part message in MIME format.
Hi list and Rasmus,
I have been playing around with the complete orthogonal decomposition that was recently added to Eigen,
and I think I have ran into a corner case:
I have a matrix of size 70 where the rank() in the CompleteOrthogonalDecomposition::compute() method is 69,
it thus performs the additional Householder reflections. After those reflections, the rank() method returns 70.
Next I run the pseudoInverse() method, which in consequence skips the applyZAdjointOnTheLeftInPlace() step.
The resulting matrix is completely wrong.
The solution, as far as I can see it, would be to the rank() obtained directly after the QR decomposition
and then stick with it.
What do you think? I have attached a proposed patch.
Simon
P.S. I'd love to provide an example matrix that triggers this behaviour, but unfortunately I only observe
this corner-case on Eigen 3.2.6 with a backported CompleteOrthogonalDecomposition. So the issues I am
observing may also have other origins.