Re: [eigen] Feature request: TriangularView::conjugate() |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] Feature request: TriangularView::conjugate()
- From: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>
- Date: Mon, 23 Aug 2010 23:40:23 +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=YFks1D/WUF6A9XVxuh0MmvD12oKgB6qx4p87PsvrqcQ=; b=i1YD8Fgua6gvbMhU+AC/AT2XSFMFIRTAWIXhSGOKW7SpbiIqRR1kOcDgNkQrQpO7Vc nCJqjq1qrsuuiGOl+NrOVKcHeneH1wRO7tb8jxNAPphugnIS8dECrDG3zxRCgr04m2bE 4yygyP2uYOfL5nfjvszIEvA8ErTB7Fg0BAJFo=
- 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=FO+8jTC3yTc/z1Cio5y2yBvkDSMP9K3VaPYsaJVMb6pV49mgVgcv8tWVVmZc6+7WEq nvCiQwsg4cnHGl9RjV7+AoJ2sf21OdvGvX+xo+uQW6644T49EG8UUZkre0Y+O/InM7OL 1XjzhlL6HnpaFP0QnzhvhNWVpdWRyEgkKKr5I=
Hi,
sorry for the delay,
actually not that the following
A.triangularView<Mode>() = B.conjugate().triangularView<Mode>();
already does the job.
On the other hand since we support both transpose and adjoint I agree
it makes sense to support conjugate as well. I've just committed such
a change. The trick is to clean the MatrixType::ConjugateReturnType to
remove the const qualifier.
gael
On Fri, Jul 30, 2010 at 12:13 AM, Manoj Rajagopalan <rmanoj@xxxxxxxxx> wrote:
> Hi eigen developers,
>
> It would be nice to be able to do this and related things:
>
> Matrix A, B;
> A.triangularView<Mode>() = B.triangularView<Mode>().conjugate();
>
> Implementing this is trickier than I thought. I tried to include the
> following into TriangularBase and I ran into a whole host of compilation
> issues related to incomplete type 'struct ei_traits<const Matrix<...> > ....'
>
> /** \sa MatrixBase::conjugate() */
> inline TriangularView<typename MatrixType::ConjugateReturnType,Mode>
> conjugate()
> { return m_matrix.conjugate(); }
> /** \sa MatrixBase::conjugate() const */
> inline const TriangularView<typename MatrixType::ConjugateReturnType,Mode>
> conjugate() const
> { return m_matrix.conjugate(); }
>
>
>
> Any tips?
>
> thanks,
> Manoj
>
>
>