Re: [eigen] problem with selfadjointView |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] problem with selfadjointView
- From: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>
- Date: Thu, 19 Aug 2010 12:38:28 +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=hmXDH4HJB5musE4y84J+1jLVnxhr/Yro1Brob2tlnAM=; b=vLE9DEmG9hSH3atdE44q29nJ5LiVvEYbefIo1sMgKZlt9qK+0n0xEnxd9dRzA1zaiv Et8yTgJEg/kSdESi2VQiwVDOc0TS3sp11gZHAxmSKgu7jJHvQ+Kf01/CToK10LLOSzyy RsID5E9gkV9Cw574ZJnuzwaXdgLK8Qukj51fs=
- 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=dLIkTHDq6ZVsktjnRFY6gV5FJw3xq+nizowV6bt8tW8CkUjl6yBhnDCL/0sK8Ad7/p IgHZkC/Nc/SghsA9BHw7FDLCYXAMMJ7rn3h7oauEBO8OGtOWolekHusVMDCKQzHcpP5N GAFluxKvijvryTeL5C6op6XOmPZbmN1aKksM8=
indeed this is not implemented for a vector on the lhs yet.... I'll do it asap
gael
On Thu, Aug 19, 2010 at 5:30 AM, Ben Goodrich <bgokgm@xxxxxxxxxxxxxx> wrote:
> Hi guys,
>
> I have gotten sidetracked from the stuff I promised to do to add
> non-pivoting LDL' to eigen3, but since we decided to just add a new
> class for it, is that still fine to go in this week or next?
>
> My unrelated question is that I wanted to compare the speed of
>
> double foo(const VectorXd &x, const MatrixXd &A) {
> return ((x.transpose() * A * x).eval())(0,0);
> }
>
> with
>
> double bar(const VectorXd &x, const MatrixXd &A) {
> return ((x.transpose() * A.selfadjointView<Lower>() * x).eval())(0,0);
> }
>
> but g++ does not like x.transpose() * A.selfadjointView<Lower>()
> although it likes A.selfadjointView<Lower>() * x. The compiler error
> below is not very informative to me, but maybe someone else
> understands it. I guess x.transpose() is not yet a matrix so it does
> not understand how to multiply it by a selfadjointView?
>
> Ben
>
> bgoodrich@Room320:/tmp$ g++ -O2 -DNDEBUG benchmark.cc -o benchmark.o
> benchmark.cc: In function ‘double bar(const Eigen::VectorXd&, const
> Eigen::MatrixXd&)’:
> benchmark.cc:33: error: invalid use of incomplete type ‘struct
> Eigen::SelfadjointProductMatrix<Eigen::Transpose<Eigen::Matrix<double,
> -0x00000000000000001, 1, 0, -0x00000000000000001, 1> >, 0, true,
> Eigen::Matrix<double, -0x00000000000000001, -0x00000000000000001, 0,
> -0x00000000000000001, -0x00000000000000001>, 17, false>’
> /tmp/eigen/Eigen/src/Core/SelfAdjointView.h:59: error: declaration of
> ‘struct Eigen::SelfadjointProductMatrix<Eigen::Transpose<Eigen::Matrix<double,
> -0x00000000000000001, 1, 0, -0x00000000000000001, 1> >, 0, true,
> Eigen::Matrix<double, -0x00000000000000001, -0x00000000000000001, 0,
> -0x00000000000000001, -0x00000000000000001>, 17, false>’
> In file included from /tmp/eigen/Eigen/Core:288,
> from /tmp/eigen/Eigen/Dense:1,
> from benchmark.cc:1:
> /tmp/eigen/Eigen/src/Core/SelfAdjointView.h: In function
> ‘Eigen::SelfadjointProductMatrix<OtherDerived, 0,
> OtherDerived::IsVectorAtCompileTime, MatrixType,
> Eigen::SelfAdjointView<MatrixType, Mode>::Mode, false>
> Eigen::operator*(const Eigen::MatrixBase<OtherDerived>&, const
> Eigen::SelfAdjointView<MatrixType, Mode>&) [with OtherDerived =
> Eigen::Transpose<Eigen::Matrix<double, -0x00000000000000001, 1, 0,
> -0x00000000000000001, 1> >, MatrixType = Eigen::Matrix<double,
> -0x00000000000000001, -0x00000000000000001, 0, -0x00000000000000001,
> -0x00000000000000001>, unsigned int UpLo = 1u]’:
> benchmark.cc:33: instantiated from here
> /tmp/eigen/Eigen/src/Core/SelfAdjointView.h:124: error: return type
> ‘struct Eigen::SelfadjointProductMatrix<Eigen::Transpose<Eigen::Matrix<double,
> -0x00000000000000001, 1, 0, -0x00000000000000001, 1> >, 0, true,
> Eigen::Matrix<double, -0x00000000000000001, -0x00000000000000001, 0,
> -0x00000000000000001, -0x00000000000000001>, 17, false>’ is incomplete
> /tmp/eigen/Eigen/src/Core/SelfAdjointView.h:128: error: invalid use of
> incomplete type ‘struct
> Eigen::SelfadjointProductMatrix<Eigen::Transpose<Eigen::Matrix<double,
> -0x00000000000000001, 1, 0, -0x00000000000000001, 1> >, 0, true,
> Eigen::Matrix<double, -0x00000000000000001, -0x00000000000000001, 0,
> -0x00000000000000001, -0x00000000000000001>, 17, false>’
> /tmp/eigen/Eigen/src/Core/SelfAdjointView.h:59: error: declaration of
> ‘struct Eigen::SelfadjointProductMatrix<Eigen::Transpose<Eigen::Matrix<double,
> -0x00000000000000001, 1, 0, -0x00000000000000001, 1> >, 0, true,
> Eigen::Matrix<double, -0x00000000000000001, -0x00000000000000001, 0,
> -0x00000000000000001, -0x00000000000000001>, 17, false>’
>
>
>