[go: up one dir, main page]

error: no type named 'Scalar' in 'Eigen::Inverse<Eigen::PermutationMatrix<-1, -1, int> >'

Submitted by Allan Leal

Assigned to Nobody

Link to original bugzilla bug (#1361)
Version: 3.3 (current stable)
Operating system: Linux

Description

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.

Edited by Eigen Bugzilla