Go to the documentation of this file.
13 #include <Eigen/Eigenvalues>
18 bool match = diffs.diagonal().sum() <=
tol;
26 std::vector<std::pair<Index,Index> > transpositions;
30 if(diffs.col(
col).segment(
col,
n-
i).minCoeff(&best_index) >
tol)
35 diffs.row(
col).swap(diffs.row(best_index));
37 diffs.row(
col).swap(diffs.row(best_index));
40 diffs.row(
n-(
i-
col)-1).swap(diffs.row(best_index));
41 transpositions.push_back(std::pair<Index,Index>(
n-(
i-
col)-1,best_index));
44 for(
Index k=transpositions.size()-1; k>=0; --k)
45 diffs.row(transpositions[k].
first).swap(diffs.row(transpositions[k].second));
54 template<
typename VectorType>
123 a(0,0) = std::numeric_limits<typename MatrixType::RealScalar>::quiet_NaN();
131 eig.compute(
a.adjoint() *
a);
151 eig.compute(
a,
false);
#define VERIFY_IS_MUCH_SMALLER_THAN(a, b)
#define VERIFY_IS_EQUAL(a, b)
ComplexEigenSolver & setMaxIterations(Index maxIters)
Sets the maximum number of iterations allowed.
EIGEN_DECLARE_TEST(eigensolver_complex)
#define VERIFY_RAISES_ASSERT(a)
void verify_is_approx_upto_permutation(const VectorType &vec1, const VectorType &vec2)
#define CALL_SUBTEST_4(FUNC)
const EigenvalueType & eigenvalues() const
Returns the eigenvalues of given matrix.
#define CALL_SUBTEST_3(FUNC)
#define CALL_SUBTEST_1(FUNC)
bool match(const T &xpr, std::string ref, std::string str_xpr="")
EIGEN_CONSTEXPR Index first(const T &x) EIGEN_NOEXCEPT
#define CALL_SUBTEST_5(FUNC)
void eigensolver_verify_assert(const MatrixType &m)
SelfAdjointEigenSolver< PlainMatrixType > eig(mat, computeVectors?ComputeEigenvectors:EigenvaluesOnly)
#define CALL_SUBTEST_2(FUNC)
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE CwiseAbs2ReturnType cwiseAbs2() const
#define VERIFY_IS_APPROX(a, b)
NumTraits< Scalar >::Real RealScalar
const EigenvectorType & eigenvectors() const
Returns the eigenvectors of given matrix.
Index getMaxIterations()
Returns the maximum number of iterations.
ComputationInfo info() const
Reports whether previous computation was successful.
Computes eigenvalues and eigenvectors of general complex matrices.
#define EIGEN_TEST_MAX_SIZE
void eigensolver(const MatrixType &m)
bool find_pivot(typename MatrixType::Scalar tol, MatrixType &diffs, Index col=0)
ComplexEigenSolver & compute(const EigenBase< InputType > &matrix, bool computeEigenvectors=true)
Computes eigendecomposition of given matrix.
The matrix class, also used for vectors and row-vectors.
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE T maxi(const T &x, const T &y)
Performs a complex Schur decomposition of a real or complex square matrix.
Holds information about the various numeric (i.e. scalar) types allowed by Eigen.
#define TEST_SET_BUT_UNUSED_VARIABLE(X)
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:02:15