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

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

*To*: eigen@xxxxxxxxxxxxxxxxxxx*Subject*: Re: [eigen] discrepancy in (triangular view + transpose) and self-adjointness*From*: Christoph Hertzberg <chtz@xxxxxxxxxxxxxxxxxxxxxxxx>*Date*: Thu, 15 Jul 2010 02:17:26 +0200

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.

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

**Follow-Ups**:**Re: [eigen] discrepancy in (triangular view + transpose) and self-adjointness***From:*Gael Guennebaud

**References**:**[eigen] discrepancy in (triangular view + transpose) and self-adjointness***From:*Manoj Rajagopalan

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

**Messages sorted by:**[ date | thread ]- Prev by Date:
**Re: [eigen] Implementing a custom-matrix product** - Next by Date:
**Re: [eigen] Arbitrary precision arithmetic support in Eigen** - Previous by thread:
**Re: [eigen] discrepancy in (triangular view + transpose) and self-adjointness** - Next by thread:
**Re: [eigen] discrepancy in (triangular view + transpose) and self-adjointness**

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