3 #include <Eigen/MPRealSupport> 5 #include <Eigen/Eigenvalues> 14 mpreal::set_default_prec(256);
25 int s = Eigen::internal::random<int>(1,100);
26 MatrixXmp
A = MatrixXmp::Random(s,s);
27 MatrixXmp
B = MatrixXmp::Random(s,s);
28 MatrixXmp
S = A.adjoint() *
A;
30 MatrixXcmp Ac = MatrixXcmp::Random(s,s);
31 MatrixXcmp Bc = MatrixXcmp::Random(s,s);
32 MatrixXcmp Sc = Ac.adjoint() * Ac;
44 X = S.selfadjointView<
Lower>().
llt().solve(B);
47 Xc = Sc.selfadjointView<
Lower>().
llt().solve(Bc);
61 MatrixXmp
A(8,3); A.setRandom();
Jet< T, N > cos(const Jet< T, N > &f)
EIGEN_DEVICE_FUNC ComputationInfo info() const
Reports whether previous computation was successful.
Computes eigenvalues and eigenvectors of selfadjoint matrices.
Jet< T, N > sin(const Jet< T, N > &f)
Namespace containing all symbols from the Eigen library.
Holds information about the various numeric (i.e. scalar) types allowed by Eigen. ...
EIGEN_DEVICE_FUNC const ExpReturnType exp() const
#define VERIFY_IS_APPROX(a, b)
EIGEN_DONT_INLINE void llt(const Mat &A, const Mat &B, Mat &C)
#define VERIFY_IS_EQUAL(a, b)
EIGEN_DECLARE_TEST(mpreal_support)
EIGEN_DEVICE_FUNC const RealVectorType & eigenvalues() const
Returns the eigenvalues of given matrix.
SelfAdjointEigenSolver< PlainMatrixType > eig(mat, computeVectors?ComputeEigenvectors:EigenvaluesOnly)
internal::nested_eval< T, 1 >::type eval(const T &xpr)
EIGEN_DEVICE_FUNC const EigenvectorsType & eigenvectors() const
Returns the eigenvectors of given matrix.
The matrix class, also used for vectors and row-vectors.
EIGEN_DEVICE_FUNC bool isApprox(const Scalar &x, const Scalar &y, const typename NumTraits< Scalar >::Real &precision=NumTraits< Scalar >::dummy_precision())