Re: [eigen] Bug in SelfAdjointEigenSolver<>, or am I missing something important? |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] Bug in SelfAdjointEigenSolver<>, or am I missing something important?
- From: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>
- Date: Thu, 4 Nov 2010 09:32:11 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=FSAwUrcHiLfVG3Jp3yS270FbPzaKTV5cdAxWvfUjXI0=; b=AVcovybDmpvRs3v87JMQOmmorzyhl3wIVCPVp6kVftPOqQZDspcBA6xDWU+m/+jofX eeRi+4+TnWkf8j70ohuV2eHCdL36MUDSv6gYAkY0bWbawGww7/i38neEUIZrbd0Mrsf8 IwSej7OnxXAZadqfNhpNByEy4Iv0laUKDW2tI=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=JLm9G9wPef27hisCLoaH40ab7nQz1AMOBd8VQrK9GEPtdcqztvM837wo0sGGjTkwd4 AfEL7PTr/gaT6DldwVzS4NZ4jNKm/TKI7fdnlyR02LnpHvog10hevamLxy6OsmCKCAi4 cQ2Yri0GKW0JPmjuleL3GQrqe+aKTBQcKH2aU=
thanks for the test case.
problem fixed with unit test
gael
On Thu, Nov 4, 2010 at 1:43 AM, Jose Luis Blanco
<joseluisblancoc@xxxxxxxxx> wrote:
> Ok, done here: http://eigen.tuxfamily.org/bz/show_bug.cgi?id=107
>
> Again, thanks for the support, and for the good work!
>
> JL
>
> On Thu, Nov 4, 2010 at 1:22 AM, Benoit Jacob <jacob.benoit.1@xxxxxxxxx> wrote:
>> 2010/11/3 Jose Luis Blanco <joseluisblancoc@xxxxxxxxx>:
>>> Hello all,
>>>
>>> I attach a little test program. It basically takes a square symmetric
>>> matrix and computes its eigen{vectors,values} with
>>> SelfAdjointEigenSolver<>, then reconstruct the original matrix with
>>> EVEC * diag(EVALS) * EVEC^T.
>>>
>>> The point is, that works for a ColMajor ordering, but not with a
>>> RowMajor, so, for these two tests:
>>>
>>> myTest< Eigen::Matrix<double,4,4,ColMajor> >();
>>> myTest< Eigen::Matrix<double,4,4,RowMajor> >();
>>>
>>> it fails in the latter.
>>>
>>> From what I've learned of Eigen, everything is prepared so users can
>>> use or even mix ColMajor & RowMajor matrices and everything is smart
>>> enough to handle it.. but in this case.
>>
>> Indeed, the storage order is semantically transparent as long as you
>> don't directly address the array of coeffs.
>>
>> In your test program, you actually do address it by using the Matrix
>> constructor taking a pointer, but that still shouldn't make any
>> difference in your case since your matrix is symmetric.
>>
>> So yes you found a bug. Thanks to your great test case I'm sure it'll
>> be fixed soon, the best thing you could do is file a bug and attach
>> your test case.
>>
>> Benoit
>>
>>>
>>> Please, let me know if I'm missing something. I managed to solve it by
>>> setting the template argument of SelfAdjointEigenSolver<> to a
>>> ColMajor version of the input matrix, but I guess that implies a
>>> (transparent from my viewpoint) conversion, which may be an avoidable
>>> delay for big matrices if there's a better way.
>>>
>>> Best,
>>> Jose Luis
>>>
>>> btw: Huge congrats to you all developers for this *absolutely
>>> marvelous* library!
>>>
>>
>>
>
>
>