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

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


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

tip: for debugging set N = 2, so you can calculate the expressions by hand if necessary ...



--
----------------------------------------------
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/