Reputation: 8747
I am using eigen library for a finding eigevalues
and eigenvectors
. From this webpage the following definition-:
const EigenvalueType & eigenvalues () const;
Hence I am using a statement like
const Eigen::EigenvalueType &value = solver.eigenvalues()
The following files have been included:
#include "Eigen/Core"
#include "unsupported/Eigen/MatrixFunctions"
#include "Eigen/Eigenvalues"
I also checked the source code of the file containing the typedef
for EigenValueType
and included it too with statement:
#include "Eigen/src/Eigenvalues/EigenSolver.h"
But still I am getting the following error at compile time.
error: ‘EigenvalueType’ in namespace ‘Eigen’ does not name a type
I do not understand why it is not able to recognize the typedef's. Any help appreciated.
Upvotes: 2
Views: 5777
Reputation: 45410
EigenvalueType is a typedef declared inside class EigenSolver
, you need to use it like
Eigen::EigenSolver<Eigen::MatrixXd>::EigenvalueType &value = solver.eigenvalues()
//^^^^^^^^^^^
Upvotes: 4