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: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>
- Date: Thu, 15 Jul 2010 20:43:31 +0200
- 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=I1BwJdF/upQ+F4Ax9EqHOsry5Udrn4x2mr7CfM1Pddc=; b=YhXMwHwsSLKFx65xoBakcChHZvP9mSK69zPUaTtZ9wn/gaohkX6mRZozYkix0QCJ2t AveUXgp/4ykgT6/EN2S9hlIV/xuvi90v7w7qZK4ehD32497k0Yy7pB3Q4lk8QoFYMBWT WhOPz71und3lB8Eu8nYN1qE0P+u6j9pVkuHOo=
- 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=tbTxpfeDKO5Mtqj7swCqUbd8L6Tk8gYUACwuves1lfrfsJvEzMeAKzt7wWHmQUPcgL lVdSINt1YrVHIgS2memsln5PXaosNC8xadfdhKhD/xBwtBMptKYOE8/EXQMHyytvgRH/ FbPQ2+w9oUXPcjPVs7qvtBZSyxvgaHMR0Vqig=
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
> ----------------------------------------------
>
>
>