New user self-registration is currently disabled. Please email eigen-core-team @ if you need an account.
Bug 1361 - error: no type named 'Scalar' in 'Eigen::Inverse<Eigen::PermutationMatrix<-1, -1, int> >'
error: no type named 'Scalar' in 'Eigen::Inverse<Eigen::PermutationMatrix<-1,...
Product: Eigen
Classification: Unclassified
Component: Core - expression templates
3.3 (current stable)
x86 - 64-bit Linux
: Normal Compilation Problem
Assigned To: Nobody
Depends on:
  Show dependency treegraph
Reported: 2016-12-11 15:33 UTC by Allan Leal
Modified: 2016-12-13 22:13 UTC (History)
3 users (show)


Description Allan Leal 2016-12-11 15:33:15 UTC
The following code does not compile using Eigen 3.3.1:

typedef Eigen::MatrixXd Matrix;
typedef Eigen::PermutationMatrix<Eigen::Dynamic, Eigen::Dynamic> PermutationMatrix;

PermutationMatrix Q;
Matrix A = Q.transpose();

One can fix this by adding:

typedef typename XprType::Scalar Scalar;

around line 48 in file `src/Core/Inverse.h`.
Comment 1 Gael Guennebaud 2016-12-13 22:13:57 UTC
Thank you for the report. Fixed:

Note You need to log in before you can comment on or make changes to this bug.