Re: [eigen] discrepancy in (triangular view + transpose) and self-adjointness

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


indeed, this was not supported yet.

pb solved.

gael

On Thu, Jul 15, 2010 at 2:17 AM, Christoph Hertzberg
<chtz@xxxxxxxxxxxxxxxxxxxxxxxx> wrote:
> Christoph Hertzberg wrote:
>>
>> Manoj Rajagopalan wrote:
>>>
>>> But, the following code produces a discrepancy:
>>>
>>>    MatrixXi B(N,N);
>>>    B.setRandom();
>>>    C1 = A.selfadjointView<Lower>() * B;
>>>    C2 = (A_l * B)   +   (A_zl.transpose() * B);
>>>    assert(C1 == C2); // <--------  FALSE!
>>
>> seems like A_zl.transpose() * B ignores the ZeroDiag flag.
>> replacing (A_zl.transpose() * B) by
>> (A_zl.transpose().toDenseMatrix() * B)
>> makes it working ...
>> I can't tell where exactly the error happens
>
> damn, thats hard to debug.
> It seems that the Problem is that in
> /Eigen/src/Core/products/TriangularMatrixMatrix.h:90
>
>> // implements col-major += alpha * op(triangular) * op(general)
>> template <typename Scalar, typename Index, int Mode,
>>          int LhsStorageOrder, bool ConjugateLhs,
>>          int RhsStorageOrder, bool ConjugateRhs>
>> struct ei_product_triangular_matrix_matrix<Scalar,Index,Mode,true,
>>                                           LhsStorageOrder,ConjugateLhs,
>>
>> RhsStorageOrder,ConjugateRhs,ColMajor>;
>
> does check for UnitDiag, but never checks for ZeroDiag.
>
> Can't help with fixing, though ...
>
>
> --
> ----------------------------------------------
> Dipl.-Inf. Christoph Hertzberg
> Cartesium 0.051
> Universität Bremen
> Enrique-Schmidt-Straße 5
> 28359 Bremen
>
> Tel: (+49) 421-218-64252
> ----------------------------------------------
>
>
>



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