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 #include <Eigen/Dense> 66 #include <boost/multiprecision/cpp_dec_float.hpp> 67 #include <boost/multiprecision/number.hpp> 68 #include <boost/math/special_functions.hpp> 69 #include <boost/math/complex.hpp> 72 typedef mp::number<mp::cpp_dec_float<100>, mp::et_on>
Real;
79 template<
typename T1,
typename T2,
typename T3,
typename T4,
typename T5>
87 template<
typename NewType>
90 return x.template convert_to<NewType>();
96 static inline std::complex<Real>
run(
const Real&
x) {
97 return std::complex<Real>(
x);
104 namespace multiprecision {
135 return sqrt(abs2<Real>(a-b)/Eigen::numext::mini<Real>(
abs2(a),
abs2(b)));
146 typedef Matrix<Real,Dynamic,Dynamic>
Mat;
147 typedef Matrix<std::complex<Real>,
Dynamic,Dynamic> MatC;
151 std::cout <<
"NumTraits<Real>::lowest() = " << NumTraits<Real>::lowest() << std::endl;
152 std::cout <<
"NumTraits<Real>::highest() = " << NumTraits<Real>::highest() << std::endl;
153 std::cout <<
"NumTraits<Real>::digits10() = " << NumTraits<Real>::digits10() << std::endl;
159 std::stringstream
ss;
165 std::stringstream
ss;
174 CALL_SUBTEST_2( lu_non_invertible<Mat>() );
175 CALL_SUBTEST_2( lu_invertible<Mat>() );
176 CALL_SUBTEST_2( lu_non_invertible<MatC>() );
177 CALL_SUBTEST_2( lu_invertible<MatC>() );
180 CALL_SUBTEST_3( qr_invertible<Mat>() );
182 CALL_SUBTEST_4( qr<Mat>() );
183 CALL_SUBTEST_4( cod<Mat>() );
184 CALL_SUBTEST_4( qr_invertible<Mat>() );
186 CALL_SUBTEST_5( qr<Mat>() );
187 CALL_SUBTEST_5( qr_invertible<Mat>() );
void selfadjointeigensolver(const MatrixType &m)
EIGEN_DEVICE_FUNC bool isMuchSmallerThan(const Scalar &x, const OtherScalar &y, const typename NumTraits< Scalar >::Real &precision=NumTraits< Scalar >::dummy_precision())
bool test_isApprox(const short &a, const short &b)
#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 >()
EIGEN_DEVICE_FUNC const SqrtReturnType sqrt() const
void generalized_eigensolver_real(const MatrixType &m)
Namespace containing all symbols from the Eigen library.
Holds information about the various numeric (i.e. scalar) types allowed by Eigen. ...
bool test_isMuchSmallerThan(const int &a, const int &b)
HouseholderQR< MatrixXf > qr(A)
void eigensolver(const MatrixType &m)
void bdcsvd(const MatrixType &a=MatrixType(), bool pickrandom=true)
mpreal copysign(const mpreal &x, const mpreal &y, mp_rnd_t rnd_mode=mpreal::get_default_rnd())
Real fmax(const Real &a, const Real &b)
Array< double, 1, 3 > e(1./3., 0.5, 2.)
Matrix< Scalar, Dynamic, Dynamic > Mat
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Abs2ReturnType abs2() const
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)
void jacobisvd(const MatrixType &a=MatrixType(), bool pickrandom=true)
const mpreal hypot(const mpreal &x, const mpreal &y, mp_rnd_t rnd_mode=mpreal::get_default_rnd())
bool test_isApproxOrLessThan(const int &a, const int &b)
#define EIGEN_TEST_MAX_SIZE
NumTraits< typename T1::RealScalar >::NonInteger test_relative_error(const EigenBase< T1 > &a, const EigenBase< T2 > &b)
void test_boostmultiprec()
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)
static Real dummy_precision()