This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Can't transposeInPlace ArrayXXd

Tags: None
(comma "," separated)
solan
Registered Member
Posts
2
Karma
0

Can't transposeInPlace ArrayXXd

Sun Jun 23, 2013 8:36 pm
Hi,

Is it not possible to do call transposeInPlace() on an ArrayXXd type? For example, I have the following:
Code: Select all
Eigen::ArrayXXd m(3, 3);
m << 1,2,3,
     3,4,5,
     6,7,8;
m.transposeInPlace();

which results in the following compiler error:
Code: Select all
In file included from <snip>Eigen/Core:300:
<snip>Eigen/src/Core/Transpose.h:263:18: error: no member named
      'triangularView' in 'Eigen::Array<double, -1, -1, 0, -1, -1>'
      m.template triangularView<StrictlyUpper>().swap(m.transpose());

However, this approach works fine:
Code: Select all
m = m.transpose().eval();

I'm running 3.1.3 and compiling using Clang 3.2. Is this by design, a bug, or user/compiler error/misunderstanding?

Thanks!
Solan
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: Can't transposeInPlace ArrayXXd

Mon Jun 24, 2013 11:37 am
our mistake, that's fixed (see below). In the meantime, m.matrix().transposeInPlace() should do the job.

https://bitbucket.org/eigen/eigen/commits/ba4230d2908e/
Changeset: ba4230d2908e
User: ggael
Date: 2013-06-24 13:35:13

https://bitbucket.org/eigen/eigen/commits/7232dbc34e1a/
Changeset: 7232dbc34e1a
Branch: 3.1
User: ggael
Date: 2013-06-24 13:35:13
Summary: fix compilation of ArrayBase::transposeInPlace
(transplanted from ba4230d2908e89e9b6af6e49d796415c70de0dd5)
solan
Registered Member
Posts
2
Karma
0

Re: Can't transposeInPlace ArrayXXd

Mon Jun 24, 2013 12:10 pm
Great! Thanks!


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot]