aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Eigenvalues/ComplexEigenSolver.h
diff options
context:
space:
mode:
authorGravatar Adolfo Rodriguez Tsouroukdissian <adolfo.rodriguez@pal-robotics.com>2010-03-08 19:31:27 +0100
committerGravatar Adolfo Rodriguez Tsouroukdissian <adolfo.rodriguez@pal-robotics.com>2010-03-08 19:31:27 +0100
commit5a36f4a8d1c84e0837ec53bbf9c1881b938ef157 (patch)
tree08fc45912447e38d7fc94d5d6242c9ba9b67f860 /Eigen/src/Eigenvalues/ComplexEigenSolver.h
parent898762529e6dec15143dcaa555a5781127c8b6c6 (diff)
Propagate all five matrix template parameters to members and temporaries of decomposition classes. One particular advantage of this is that decomposing matrices with max sizes known at compile time will not allocate.
NOTE: The ComplexEigenSolver class currently _does_ allocate (line 135 of Eigenvalues/ComplexEigenSolver.h), but the reason appears to be in the implementation of matrix-matrix products, and not in the decomposition itself. The nomalloc unit test has been extended to verify that decompositions do not allocate when max sizes are specified. There are currently two workarounds to prevent the test from failing (see comments in test/nomalloc.cpp), both of which are related to matrix products that allocate on the stack.
Diffstat (limited to 'Eigen/src/Eigenvalues/ComplexEigenSolver.h')
-rw-r--r--Eigen/src/Eigenvalues/ComplexEigenSolver.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/Eigen/src/Eigenvalues/ComplexEigenSolver.h b/Eigen/src/Eigenvalues/ComplexEigenSolver.h
index 27c52b4dc..dae6091fe 100644
--- a/Eigen/src/Eigenvalues/ComplexEigenSolver.h
+++ b/Eigen/src/Eigenvalues/ComplexEigenSolver.h
@@ -41,11 +41,18 @@ template<typename _MatrixType> class ComplexEigenSolver
{
public:
typedef _MatrixType MatrixType;
+ enum {
+ RowsAtCompileTime = MatrixType::RowsAtCompileTime,
+ ColsAtCompileTime = MatrixType::ColsAtCompileTime,
+ Options = MatrixType::Options,
+ MaxRowsAtCompileTime = MatrixType::MaxRowsAtCompileTime,
+ MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime
+ };
typedef typename MatrixType::Scalar Scalar;
typedef typename NumTraits<Scalar>::Real RealScalar;
typedef std::complex<RealScalar> Complex;
- typedef Matrix<Complex, MatrixType::ColsAtCompileTime,1> EigenvalueType;
- typedef Matrix<Complex, MatrixType::RowsAtCompileTime,MatrixType::ColsAtCompileTime> EigenvectorType;
+ typedef Matrix<Complex, ColsAtCompileTime, 1, Options, MaxColsAtCompileTime, 1> EigenvalueType;
+ typedef Matrix<Complex, RowsAtCompileTime, ColsAtCompileTime, Options, MaxRowsAtCompileTime, ColsAtCompileTime> EigenvectorType;
/**
* \brief Default Constructor.