mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
* Merge Extract and Part to the Part expression.
Renamed "MatrixBase::extract() const" to "MatrixBase::part() const" * Renamed static functions identity, zero, ones, random with an upper case first letter: Identity, Zero, Ones and Random.
This commit is contained in:
@@ -35,14 +35,14 @@ template<typename MatrixType> void eigensolver(const MatrixType& m)
|
||||
|
||||
typedef typename std::complex<typename NumTraits<typename MatrixType::Scalar>::Real> Complex;
|
||||
|
||||
MatrixType a = MatrixType::random(rows,cols);
|
||||
MatrixType a = MatrixType::Random(rows,cols);
|
||||
MatrixType symmA = a.adjoint() * a;
|
||||
|
||||
SelfAdjointEigenSolver<MatrixType> eiSymm(symmA);
|
||||
VERIFY_IS_APPROX(symmA * eiSymm.eigenvectors(), (eiSymm.eigenvectors() * eiSymm.eigenvalues().asDiagonal().eval()));
|
||||
|
||||
// generalized eigen problem Ax = lBx
|
||||
MatrixType b = MatrixType::random(rows,cols);
|
||||
MatrixType b = MatrixType::Random(rows,cols);
|
||||
MatrixType symmB = b.adjoint() * b;
|
||||
eiSymm.compute(symmA,symmB);
|
||||
VERIFY_IS_APPROX(symmA * eiSymm.eigenvectors(), symmB * (eiSymm.eigenvectors() * eiSymm.eigenvalues().asDiagonal().eval()));
|
||||
|
||||
Reference in New Issue
Block a user