Re: [eigen] Re: Assignment to triangular view fails

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


Thanks guys.
Sameer



On Wed, Apr 10, 2013 at 2:19 PM, Gael Guennebaud <gael.guennebaud@xxxxxxxxx> wrote:
This is because this product is assumed not to alias. Even though it's
possible, doing A.triangularView<Upper>() = (A*B) would make little
sense. This is checked there:

https://bitbucket.org/eigen/eigen/commits/931756437e5d/
Changeset:   931756437e5d
User:        ggael
Date:        2013-04-10 23:13:04
Summary:     Add temporary check for triangularView += product

That said, we could consider adding a TriangularView::noalias() for
consistency...

gael

On Wed, Apr 10, 2013 at 7:40 PM, Sameer Agarwal
<sameeragarwal@xxxxxxxxxx> wrote:
> along the same lines.
>
> C.triangularView<Eigen::Upper>().noalias() += (A * B);
>
> fails with
>
> no member named 'noalias' in 'Eigen::TriangularView<Eigen::Matrix<double,
> -1, -1, 0, -1, -1>, 2>'
>
> Is it possible to support noalias() for triangular view?
>
> Thanks,
> Sameer
>
>
>
> On Wed, Apr 10, 2013 at 9:50 AM, Sameer Agarwal <sameeragarwal@xxxxxxxxxx>
> wrote:
>>
>> Hi Guys,
>>
>> Eigen::MatrixXd A(10,10);
>>
>> A.triangularView<Eigen::Upper>().setConstant(1.0);  // Works
>> A.triangularView<Eigen::Upper>() = 1.0;  // Fails to compile
>>
>> Is this by design or a bug?
>>
>> Thanks,
>> Sameer
>>
>>
>>
>





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