Re: [eigen] Re: Assignment to triangular view fails |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen <eigen@xxxxxxxxxxxxxxxxxxx>
- Subject: Re: [eigen] Re: Assignment to triangular view fails
- From: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>
- Date: Wed, 10 Apr 2013 23:19:47 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=MPT2OW39g5jWHcf1/vDwQNc8KquJt++rbMo3enakSbQ=; b=wDsTbzgZ0Ywkzrsbo8UlB4ED0TPjkrAeseP71J2ERXFd7QbT8/BgMCxk2aVu7oL0e0 Vdi0ji7YhO8sOMfXt/MpZUVXVLXnB3w+9WT5nDZEuKi2iWy4ag9MkwDzLGcfVYVKbJAb B0WEI+cTLXNvLcga4O6FQeVzZU9leV7QI77wkvmwUFfF9Rf4VbgtTxrN2UfxzT55nKQ/ xDNnKMOy4MELr9a/gzXctQmTiTAv8b/aKSj/3SDHuTiTrAhHngnjTFxmmO6x+C0cmtoi pr4oZgF0OuqTbKEUwi3zkcG2xRXXuXyorGoqTseOpCkUyiTe/P98rCB81G9dCpfm2vtl JaFA==
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
>>
>>
>>
>