2 #include <Eigen/MPRealSupport> 4 #include <Eigen/Eigenvalues> 24 int s = Eigen::internal::random<int>(1,100);
25 MatrixXmp
A = MatrixXmp::Random(s,s);
26 MatrixXmp
B = MatrixXmp::Random(s,s);
27 MatrixXmp
S = A.adjoint() * A;
29 MatrixXcmp Ac = MatrixXcmp::Random(s,s);
30 MatrixXcmp Bc = MatrixXcmp::Random(s,s);
31 MatrixXcmp Sc = Ac.adjoint() * Ac;
43 X = S.selfadjointView<
Lower>().llt().solve(B);
46 Xc = Sc.selfadjointView<
Lower>().llt().solve(Bc);
60 MatrixXmp
A(8,3); A.setRandom();
const mpreal exp(const mpreal &x, mp_rnd_t r=mpreal::get_default_rnd())
Computes eigenvalues and eigenvectors of selfadjoint matrices.
Namespace containing all symbols from the Eigen library.
Holds information about the various numeric (i.e. scalar) types allowed by Eigen. ...
const mpreal cos(const mpreal &x, mp_rnd_t r=mpreal::get_default_rnd())
Matrix< SCALARB, Dynamic, Dynamic > B
#define VERIFY_IS_APPROX(a, b)
#define VERIFY_IS_EQUAL(a, b)
EIGEN_DEVICE_FUNC ComputationInfo info() const
Reports whether previous computation was successful.
SelfAdjointEigenSolver< PlainMatrixType > eig(mat, computeVectors?ComputeEigenvectors:EigenvaluesOnly)
static void set_default_prec(mp_prec_t prec)
const mpreal sin(const mpreal &x, mp_rnd_t r=mpreal::get_default_rnd())
EIGEN_DEVICE_FUNC const RealVectorType & eigenvalues() const
Returns the eigenvalues of given matrix.
void test_mpreal_support()
EIGEN_DEVICE_FUNC const EigenvectorsType & eigenvectors() const
Returns the eigenvectors of given matrix.
internal::nested_eval< T, 1 >::type eval(const T &xpr)
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())