Re: [eigen] Error when using tridiagonalization_inplace_selector

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


We fixed a bug recently that should address this (https://gitlab.com/libeigen/eigen/-/merge_requests/635).  The godbolt link Jens provided does seem to compile on Trunk now.  I cherry-picked the change to the 3.4 branch, so should go out with the next point release.

~Antonio

On Wed, Sep 8, 2021 at 8:39 AM Christoph Hertzberg <chtz@xxxxxxxxxxxxxxxxxxxxxxxx> wrote:
You should probably change the type of the solver to either

     Eigen::SelfAdjointEigenSolver<Eigen::Matrix<double,9,9> >
or
     Eigen::SelfAdjointEigenSolver<Eigen::MatrixXd>

Not sure, if we really want to support `Eigen::Matrix<double, -1, 9>`
here. It would of course be possible, as this implicitly implies that
the number of rows is 9 as well (otherwise, there is no Eigenvalue
decomposition).

Cheers,
Christoph

(sorry for the empty response before ...)

On 08/09/2021 16.17, Alberto Luaces wrote:
> Yes, sorry, that's exactly the error I mean.
>
> It seems that previously it was ok to build the solver from AᵀA, but not anymore.
>
> Thanks for deploying it in godbolt!
>
> On Wed, Sep 8, 2021, at 15:11, Jens Wehner wrote:
>> Hi,
>>
>> what is the build error and which system/compiler/options?
>>
>> Is the build error like this?
>> https://godbolt.org/z/KGTejxMdq
>   <https://godbolt.org/z/KGTejxMdq>
>> Compiler Explorer - C++ (x86-64 gcc (trunk)) <https://godbolt.org/z/KGTejxMdq>
>> int main(){ using MatX9 = Eigen::Matrix<double, -1, 9>; MatX9 epipolar_constraint(7, 9); epipolar_constraint.fill(0.0); // EncodeEpipolarEquation(x1, x2, &epipolar_constraint); Eigen::SelfAdjointEigenSolver<MatX9> solver (epipolar_constraint.transpose() * epipolar_constraint); return 0; }
>> godbolt.org
>>
>>
>> Escience Center Logo
>>
>> *Jens Wehner*
>>
>> Research Software Engineer
>>
>> +31 6 438 666 87
>>
>> Netherlands eScience Center
>>
>> *www.esciencecenter.nl*
>>
>>
>>
>> *From:* Alberto Luaces <eigen@xxxxxxxxxxxxxxxxxxxx>
>> *Sent:* Wednesday, September 8, 2021 14:12
>> *To:* eigen@xxxxxxxxxxxxxxxxxxx <eigen@xxxxxxxxxxxxxxxxxxx>
>> *Subject:* [eigen] Error when using tridiagonalization_inplace_selector
>>   
>> Hi, I have found a build error in openmvg when using 3.4.0, shown with this snippet.  Do you think it is a bug in Eigen?
>>
>> Thanks!
>>
>> #include <Eigen/Dense>
>>
>> int main(){
>>      using MatX9 = Eigen::Matrix<double, -1, 9>;
>>      MatX9 epipolar_constraint(7, 9);
>>      epipolar_constraint.fill(0.0);
>>      // EncodeEpipolarEquation(x1, x2, &epipolar_constraint);
>>      Eigen::SelfAdjointEigenSolver<MatX9> solver
>>          (epipolar_constraint.transpose() * epipolar_constraint);
>>      return 0;
>> }
>>
>>
>> --
>>    Alberto
>>
>>
>
> --
>    Alberto
>
>




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/