12 #ifdef EIGEN_TEST_MAX_SIZE 13 #undef EIGEN_TEST_MAX_SIZE 16 #define EIGEN_TEST_MAX_SIZE 50 18 #ifdef EIGEN_TEST_PART_1 19 #include "cholesky.cpp" 22 #ifdef EIGEN_TEST_PART_2 26 #ifdef EIGEN_TEST_PART_3 30 #ifdef EIGEN_TEST_PART_4 34 #ifdef EIGEN_TEST_PART_5 38 #ifdef EIGEN_TEST_PART_6 42 #ifdef EIGEN_TEST_PART_7 46 #ifdef EIGEN_TEST_PART_8 50 #ifdef EIGEN_TEST_PART_9 54 #ifdef EIGEN_TEST_PART_10 58 #ifdef EIGEN_TEST_PART_11 62 #include <Eigen/Dense> 71 #include <boost/serialization/nvp.hpp> 72 #include <boost/multiprecision/cpp_dec_float.hpp> 73 #include <boost/multiprecision/number.hpp> 74 #include <boost/math/special_functions.hpp> 75 #include <boost/math/complex.hpp> 78 typedef mp::number<mp::cpp_dec_float<100>, mp::et_on>
Real;
85 template<
typename T1,
typename T2,
typename T3,
typename T4,
typename T5>
93 template<
typename NewType>
96 return x.template convert_to<NewType>();
102 static inline std::complex<Real>
run(
const Real&
x) {
103 return std::complex<Real>(
x);
110 namespace multiprecision {
115 using boost::math::copysign;
116 using boost::math::hypot;
141 return sqrt(abs2<Real>(a-b)/Eigen::numext::mini<Real>(
abs2(a),
abs2(b)));
152 typedef Matrix<Real,Dynamic,Dynamic>
Mat;
153 typedef Matrix<std::complex<Real>,
Dynamic,Dynamic> MatC;
157 std::cout <<
"NumTraits<Real>::lowest() = " << NumTraits<Real>::lowest() << std::endl;
158 std::cout <<
"NumTraits<Real>::highest() = " << NumTraits<Real>::highest() << std::endl;
159 std::cout <<
"NumTraits<Real>::digits10() = " << NumTraits<Real>::digits10() << std::endl;
165 std::stringstream
ss;
171 std::stringstream
ss;
void selfadjointeigensolver(const MatrixType &m)
#define CALL_SUBTEST_9(FUNC)
EIGEN_DEVICE_FUNC bool isMuchSmallerThan(const Scalar &x, const OtherScalar &y, const typename NumTraits< Scalar >::Real &precision=NumTraits< Scalar >::dummy_precision())
#define CALL_SUBTEST_6(FUNC)
#define CALL_SUBTEST_4(FUNC)
#define EIGEN_NOT_A_MACRO
NumTraits< typename T::Scalar >::Real get_test_precision(const T &, const typename T::Scalar *=0)
static NewType run(const Real &x)
Real test_precision< Real >()
#define CALL_SUBTEST_3(FUNC)
#define CALL_SUBTEST_7(FUNC)
#define CALL_SUBTEST_11(FUNC)
bool test_isApproxOrLessThan(const long double &a, const long double &b)
void generalized_eigensolver_real(const MatrixType &m)
Namespace containing all symbols from the Eigen library.
CleanedUpDerType< DerType >::type() max(const AutoDiffScalar< DerType > &x, const T &y)
Holds information about the various numeric (i.e. scalar) types allowed by Eigen. ...
HouseholderQR< MatrixXf > qr(A)
#define CALL_SUBTEST_10(FUNC)
void eigensolver(const MatrixType &m)
void bdcsvd(const MatrixType &a=MatrixType(), bool pickrandom=true)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Abs2ReturnType abs2() const
bool test_isApprox(const std::complex< float > &a, const std::complex< float > &b)
#define CALL_SUBTEST_1(FUNC)
Real fmax(const Real &a, const Real &b)
#define CALL_SUBTEST_8(FUNC)
Array< double, 1, 3 > e(1./3., 0.5, 2.)
bool test_isMuchSmallerThan(const std::complex< float > &a, const std::complex< float > &b)
static std::stringstream ss
static std::complex< Real > run(const Real &x)
mp::number< mp::cpp_dec_float< 100 >, mp::et_on > Real
#define TEST_SET_BUT_UNUSED_VARIABLE(X)
void cholesky(const MatrixType &m)
#define CALL_SUBTEST_5(FUNC)
void jacobisvd(const MatrixType &a=MatrixType(), bool pickrandom=true)
EIGEN_DECLARE_TEST(boostmultiprec)
#define EIGEN_TEST_MAX_SIZE
NumTraits< typename T1::RealScalar >::NonInteger test_relative_error(const EigenBase< T1 > &a, const EigenBase< T2 > &b)
Matrix< Scalar, Dynamic, Dynamic > Mat
#define CALL_SUBTEST_2(FUNC)
Jet< T, N > sqrt(const Jet< T, N > &f)
EIGEN_DEVICE_FUNC bool isApprox(const Scalar &x, const Scalar &y, const typename NumTraits< Scalar >::Real &precision=NumTraits< Scalar >::dummy_precision())
EIGEN_DEVICE_FUNC bool isApproxOrLessThan(const Scalar &x, const Scalar &y, const typename NumTraits< Scalar >::Real &precision=NumTraits< Scalar >::dummy_precision())
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy x
Derived & setRandom(Index size)
EIGEN_DEVICE_FUNC bool abs2(bool x)
static Real dummy_precision()