TR-mbed 1.0
Loading...
Searching...
No Matches
Classes | Namespaces | Macros | Functions
main.h File Reference
#include <cstdlib>
#include <cerrno>
#include <ctime>
#include <iostream>
#include <fstream>
#include <string>
#include <sstream>
#include <vector>
#include <typeinfo>
#include <functional>
#include <limits>
#include <algorithm>
#include <complex>
#include <deque>
#include <queue>
#include <cassert>
#include <list>
#include "split_test_helper.h"
#include <Eigen/QR>

Go to the source code of this file.

Classes

struct  real
 
struct  imag
 
class  Eigen::EigenTest
 
struct  Eigen::eigen_assert_exception
 
struct  Eigen::eigen_static_assert_exception
 
struct  GetDifferentType< float >
 
struct  GetDifferentType< double >
 
struct  GetDifferentType< std::complex< T > >
 

Namespaces

namespace  Eigen
 Namespace containing all symbols from the Eigen library.
 

Macros

#define _OVERRIDE_COMPLEX_SPECIALIZATION_   1
 
#define EIGEN_CUDA_SDK_VER   0
 
#define min(A, B)   please_protect_your_min_with_parentheses
 
#define max(A, B)   please_protect_your_max_with_parentheses
 
#define isnan(X)   please_protect_your_isnan_with_parentheses
 
#define isinf(X)   please_protect_your_isinf_with_parentheses
 
#define isfinite(X)   please_protect_your_isfinite_with_parentheses
 
#define M_PI   please_use_EIGEN_PI_instead_of_M_PI
 
#define FORBIDDEN_IDENTIFIER   (this_identifier_is_forbidden_to_avoid_clashes) this_identifier_is_forbidden_to_avoid_clashes
 
#define B0   FORBIDDEN_IDENTIFIER
 
#define I   FORBIDDEN_IDENTIFIER
 
#define EIGEN_DEBUG_SMALL_PRODUCT_BLOCKS
 
#define TEST_SET_BUT_UNUSED_VARIABLE(X)   EIGEN_UNUSED_VARIABLE(X)
 
#define DEBUG
 
#define DEFAULT_REPEAT   10
 
#define EIGEN_DECLARE_TEST(X)
 
#define TRACK   std::cerr << __FILE__ << " " << __LINE__ << std::endl
 
#define EIGEN_DEFAULT_IO_FORMAT   IOFormat(4, 0, " ", "\n", "", "", "", "")
 
#define eigen_assert(a)
 
#define VERIFY_RAISES_ASSERT(a)    std::cout << "Can't VERIFY_RAISES_ASSERT( " #a " ) with exceptions disabled\n";
 
#define VERIFY_RAISES_STATIC_ASSERT(a)    std::cout << "Can't VERIFY_RAISES_STATIC_ASSERT( " #a " ) with exceptions disabled\n";
 
#define EIGEN_USE_CUSTOM_ASSERT
 
#define EIGEN_INTERNAL_DEBUGGING
 
#define VERIFY(a)   ::verify_impl(a, g_test_stack.back().c_str(), __FILE__, __LINE__, EIGEN_MAKESTRING(a))
 
#define VERIFY_GE(a, b)   ::verify_impl(a >= b, g_test_stack.back().c_str(), __FILE__, __LINE__, EIGEN_MAKESTRING(a >= b))
 
#define VERIFY_LE(a, b)   ::verify_impl(a <= b, g_test_stack.back().c_str(), __FILE__, __LINE__, EIGEN_MAKESTRING(a <= b))
 
#define VERIFY_IS_EQUAL(a, b)   VERIFY(test_is_equal(a, b, true))
 
#define VERIFY_IS_NOT_EQUAL(a, b)   VERIFY(test_is_equal(a, b, false))
 
#define VERIFY_IS_APPROX(a, b)   VERIFY(verifyIsApprox(a, b))
 
#define VERIFY_IS_NOT_APPROX(a, b)   VERIFY(!test_isApprox(a, b))
 
#define VERIFY_IS_MUCH_SMALLER_THAN(a, b)   VERIFY(test_isMuchSmallerThan(a, b))
 
#define VERIFY_IS_NOT_MUCH_SMALLER_THAN(a, b)   VERIFY(!test_isMuchSmallerThan(a, b))
 
#define VERIFY_IS_APPROX_OR_LESS_THAN(a, b)   VERIFY(test_isApproxOrLessThan(a, b))
 
#define VERIFY_IS_NOT_APPROX_OR_LESS_THAN(a, b)   VERIFY(!test_isApproxOrLessThan(a, b))
 
#define VERIFY_IS_UNITARY(a)   VERIFY(test_isUnitary(a))
 
#define STATIC_CHECK(COND)   EIGEN_STATIC_ASSERT( (COND) , EIGEN_INTERNAL_ERROR_PLEASE_FILE_A_BUG_REPORT )
 
#define CALL_SUBTEST(FUNC)
 
#define EIGEN_TEST_SCALAR_TEST_OVERLOAD(TYPE)
 

Functions

void verify_impl (bool condition, const char *testname, const char *file, int line, const char *condition_as_string)
 
template<typename T1 , typename T2 >
internal::enable_if< internal::is_same< T1, T2 >::value, bool >::type Eigen::is_same_type (const T1 &, const T2 &)
 
template<typename T >
NumTraits< T >::Real Eigen::test_precision ()
 
template<>
float Eigen::test_precision< float > ()
 
template<>
double Eigen::test_precision< double > ()
 
template<>
long double Eigen::test_precision< long double > ()
 
template<>
float Eigen::test_precision< std::complex< float > > ()
 
template<>
double Eigen::test_precision< std::complex< double > > ()
 
template<>
long double Eigen::test_precision< std::complex< long double > > ()
 
bool Eigen::test_isApprox (const std::complex< float > &a, const std::complex< float > &b)
 
bool Eigen::test_isMuchSmallerThan (const std::complex< float > &a, const std::complex< float > &b)
 
bool Eigen::test_isApprox (const std::complex< double > &a, const std::complex< double > &b)
 
bool Eigen::test_isMuchSmallerThan (const std::complex< double > &a, const std::complex< double > &b)
 
bool Eigen::test_isApprox (const std::complex< long double > &a, const std::complex< long double > &b)
 
bool Eigen::test_isMuchSmallerThan (const std::complex< long double > &a, const std::complex< long double > &b)
 
bool Eigen::test_isApprox (const long double &a, const long double &b)
 
bool Eigen::test_isMuchSmallerThan (const long double &a, const long double &b)
 
bool Eigen::test_isApproxOrLessThan (const long double &a, const long double &b)
 
template<typename T1 , typename T2 >
NumTraits< typenameT1::RealScalar >::NonInteger Eigen::test_relative_error (const EigenBase< T1 > &a, const EigenBase< T2 > &b)
 
template<typename T1 , typename T2 >
T1::RealScalar Eigen::test_relative_error (const T1 &a, const T2 &b, const typename T1::Coefficients *=0)
 
template<typename T1 , typename T2 >
T1::Scalar Eigen::test_relative_error (const T1 &a, const T2 &b, const typename T1::MatrixType *=0)
 
template<typename S , int D>
Eigen::test_relative_error (const Translation< S, D > &a, const Translation< S, D > &b)
 
template<typename S , int D, int O>
Eigen::test_relative_error (const ParametrizedLine< S, D, O > &a, const ParametrizedLine< S, D, O > &b)
 
template<typename S , int D>
Eigen::test_relative_error (const AlignedBox< S, D > &a, const AlignedBox< S, D > &b)
 
template<typename T1 , typename T2 >
T1::RealScalar Eigen::test_relative_error (const MatrixBase< T1 > &a, const SparseMatrixBase< T2 > &b)
 
template<typename T1 , typename T2 >
T1::RealScalar Eigen::test_relative_error (const SparseMatrixBase< T1 > &a, const MatrixBase< T2 > &b)
 
template<typename T1 , typename T2 >
T1::RealScalar Eigen::test_relative_error (const SparseMatrixBase< T1 > &a, const SparseMatrixBase< T2 > &b)
 
template<typename T1 , typename T2 >
NumTraits< typenameNumTraits< T1 >::Real >::NonInteger Eigen::test_relative_error (const T1 &a, const T2 &b, typename internal::enable_if< internal::is_arithmetic< typename NumTraits< T1 >::Real >::value, T1 >::type *=0)
 
template<typename T >
T Eigen::test_relative_error (const Rotation2D< T > &a, const Rotation2D< T > &b)
 
template<typename T >
T Eigen::test_relative_error (const AngleAxis< T > &a, const AngleAxis< T > &b)
 
template<typename Type1 , typename Type2 >
bool Eigen::test_isApprox (const Type1 &a, const Type2 &b, typename Type1::Scalar *=0)
 
template<typename T >
NumTraits< typenameT::Scalar >::Real Eigen::get_test_precision (const T &, const typename T::Scalar *=0)
 
template<typename T >
NumTraits< T >::Real Eigen::get_test_precision (const T &, typename internal::enable_if< internal::is_arithmetic< typename NumTraits< T >::Real >::value, T >::type *=0)
 
template<typename Type1 , typename Type2 >
bool Eigen::verifyIsApprox (const Type1 &a, const Type2 &b)
 
template<typename Scalar , typename ScalarRef >
bool Eigen::test_isApproxWithRef (const Scalar &a, const Scalar &b, const ScalarRef &ref)
 
template<typename Derived1 , typename Derived2 >
bool Eigen::test_isMuchSmallerThan (const MatrixBase< Derived1 > &m1, const MatrixBase< Derived2 > &m2)
 
template<typename Derived >
bool Eigen::test_isMuchSmallerThan (const MatrixBase< Derived > &m, const typename NumTraits< typename internal::traits< Derived >::Scalar >::Real &s)
 
template<typename Derived >
bool Eigen::test_isUnitary (const MatrixBase< Derived > &m)
 
template<typename T , typename U >
bool Eigen::test_is_equal (const T &actual, const U &expected, bool expect_equal=true)
 
template<typename MatrixType >
void Eigen::createRandomPIMatrixOfRank (Index desired_rank, Index rows, Index cols, MatrixType &m)
 
template<typename PermutationVectorType >
void Eigen::randomPermutationVector (PermutationVectorType &v, Index size)
 
template<typename T >
bool Eigen::isNotNaN (const T &x)
 
template<typename T >
bool Eigen::isPlusInf (const T &x)
 
template<typename T >
bool Eigen::isMinusInf (const T &x)
 
template<typename T >
std::string type_name ()
 
template<>
std::string type_name< float > ()
 
template<>
std::string type_name< double > ()
 
template<>
std::string type_name< long double > ()
 
template<>
std::string type_name< int > ()
 
template<>
std::string type_name< std::complex< float > > ()
 
template<>
std::string type_name< std::complex< double > > ()
 
template<>
std::string type_name< std::complex< long double > > ()
 
template<>
std::string type_name< std::complex< int > > ()
 
void set_repeat_from_string (const char *str)
 
void set_seed_from_string (const char *str)
 
int main (int argc, char *argv[])
 

Macro Definition Documentation

◆ _OVERRIDE_COMPLEX_SPECIALIZATION_

#define _OVERRIDE_COMPLEX_SPECIALIZATION_   1

◆ B0

#define B0   FORBIDDEN_IDENTIFIER

◆ CALL_SUBTEST

#define CALL_SUBTEST (   FUNC)
Value:
do { \
g_test_stack.push_back(EIGEN_MAKESTRING(FUNC)); \
FUNC; \
g_test_stack.pop_back(); \
} while (0)
#define EIGEN_MAKESTRING(a)
Definition Macros.h:908

◆ DEBUG

#define DEBUG

◆ DEFAULT_REPEAT

#define DEFAULT_REPEAT   10

◆ eigen_assert

#define eigen_assert (   a)
Value:
if( (!Eigen::internal::copy_bool(a)) && (!no_more_assert) )\
{ \
Eigen::no_more_assert = true; \
if(report_on_cerr_on_assert_failure) \
eigen_plain_assert(a); \
else \
EIGEN_THROW_X(Eigen::eigen_assert_exception()); \
}
ArrayXXi a
Definition Array_initializer_list_23_cxx11.cpp:1
bool copy_bool(bool b)
Definition Macros.h:1004
Definition main.h:229

◆ EIGEN_CUDA_SDK_VER

#define EIGEN_CUDA_SDK_VER   0

◆ EIGEN_DEBUG_SMALL_PRODUCT_BLOCKS

#define EIGEN_DEBUG_SMALL_PRODUCT_BLOCKS

◆ EIGEN_DECLARE_TEST

#define EIGEN_DECLARE_TEST (   X)
Value:
void EIGEN_CAT(test_,X) (); \
static EigenTest EIGEN_CAT(test_handler_,X) (EIGEN_MAKESTRING(X), & EIGEN_CAT(test_,X)); \
void EIGEN_CAT(test_,X) ()
#define EIGEN_CAT(a, b)
Definition Macros.h:902
Definition main.h:174
#define X
Definition icosphere.cpp:20

◆ EIGEN_DEFAULT_IO_FORMAT

#define EIGEN_DEFAULT_IO_FORMAT   IOFormat(4, 0, " ", "\n", "", "", "", "")

◆ EIGEN_INTERNAL_DEBUGGING

#define EIGEN_INTERNAL_DEBUGGING

◆ EIGEN_TEST_SCALAR_TEST_OVERLOAD

#define EIGEN_TEST_SCALAR_TEST_OVERLOAD (   TYPE)
Value:
inline bool test_isApprox(TYPE a, TYPE b) \
{ return internal::isApprox(a, b, test_precision<TYPE>()); } \
{ return internal::isMuchSmallerThan(a, b, test_precision<TYPE>()); } \
{ return internal::isApproxOrLessThan(a, b, test_precision<TYPE>()); }
#define TYPE
Definition benchFFT.cpp:31
Scalar * b
Definition benchVecAdd.cpp:17
bool test_isApproxOrLessThan(const long double &a, const long double &b)
Definition main.h:479
bool test_isMuchSmallerThan(const std::complex< float > &a, const std::complex< float > &b)
Definition main.h:451
bool test_isApprox(const std::complex< float > &a, const std::complex< float > &b)
Definition main.h:449

◆ EIGEN_USE_CUSTOM_ASSERT

#define EIGEN_USE_CUSTOM_ASSERT

◆ FORBIDDEN_IDENTIFIER

#define FORBIDDEN_IDENTIFIER   (this_identifier_is_forbidden_to_avoid_clashes) this_identifier_is_forbidden_to_avoid_clashes

◆ I

#define I   FORBIDDEN_IDENTIFIER

◆ isfinite

#define isfinite (   X)    please_protect_your_isfinite_with_parentheses

◆ isinf

#define isinf (   X)    please_protect_your_isinf_with_parentheses

◆ isnan

#define isnan (   X)    please_protect_your_isnan_with_parentheses

◆ M_PI

#define M_PI   please_use_EIGEN_PI_instead_of_M_PI

◆ max

#define max (   A,
  B 
)    please_protect_your_max_with_parentheses

◆ min

#define min (   A,
  B 
)    please_protect_your_min_with_parentheses

◆ STATIC_CHECK

#define STATIC_CHECK (   COND)    EIGEN_STATIC_ASSERT( (COND) , EIGEN_INTERNAL_ERROR_PLEASE_FILE_A_BUG_REPORT )

◆ TEST_SET_BUT_UNUSED_VARIABLE

#define TEST_SET_BUT_UNUSED_VARIABLE (   X)    EIGEN_UNUSED_VARIABLE(X)

◆ TRACK

#define TRACK   std::cerr << __FILE__ << " " << __LINE__ << std::endl

◆ VERIFY

#define VERIFY (   a)    ::verify_impl(a, g_test_stack.back().c_str(), __FILE__, __LINE__, EIGEN_MAKESTRING(a))

◆ VERIFY_GE

#define VERIFY_GE (   a,
  b 
)    ::verify_impl(a >= b, g_test_stack.back().c_str(), __FILE__, __LINE__, EIGEN_MAKESTRING(a >= b))

◆ VERIFY_IS_APPROX

#define VERIFY_IS_APPROX (   a,
  b 
)    VERIFY(verifyIsApprox(a, b))

◆ VERIFY_IS_APPROX_OR_LESS_THAN

#define VERIFY_IS_APPROX_OR_LESS_THAN (   a,
  b 
)    VERIFY(test_isApproxOrLessThan(a, b))

◆ VERIFY_IS_EQUAL

#define VERIFY_IS_EQUAL (   a,
  b 
)    VERIFY(test_is_equal(a, b, true))

◆ VERIFY_IS_MUCH_SMALLER_THAN

#define VERIFY_IS_MUCH_SMALLER_THAN (   a,
  b 
)    VERIFY(test_isMuchSmallerThan(a, b))

◆ VERIFY_IS_NOT_APPROX

#define VERIFY_IS_NOT_APPROX (   a,
  b 
)    VERIFY(!test_isApprox(a, b))

◆ VERIFY_IS_NOT_APPROX_OR_LESS_THAN

#define VERIFY_IS_NOT_APPROX_OR_LESS_THAN (   a,
  b 
)    VERIFY(!test_isApproxOrLessThan(a, b))

◆ VERIFY_IS_NOT_EQUAL

#define VERIFY_IS_NOT_EQUAL (   a,
  b 
)    VERIFY(test_is_equal(a, b, false))

◆ VERIFY_IS_NOT_MUCH_SMALLER_THAN

#define VERIFY_IS_NOT_MUCH_SMALLER_THAN (   a,
  b 
)    VERIFY(!test_isMuchSmallerThan(a, b))

◆ VERIFY_IS_UNITARY

#define VERIFY_IS_UNITARY (   a)    VERIFY(test_isUnitary(a))

◆ VERIFY_LE

#define VERIFY_LE (   a,
  b 
)    ::verify_impl(a <= b, g_test_stack.back().c_str(), __FILE__, __LINE__, EIGEN_MAKESTRING(a <= b))

◆ VERIFY_RAISES_ASSERT

#define VERIFY_RAISES_ASSERT (   a)     std::cout << "Can't VERIFY_RAISES_ASSERT( " #a " ) with exceptions disabled\n";

◆ VERIFY_RAISES_STATIC_ASSERT

#define VERIFY_RAISES_STATIC_ASSERT (   a)     std::cout << "Can't VERIFY_RAISES_STATIC_ASSERT( " #a " ) with exceptions disabled\n";

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)

◆ set_repeat_from_string()

void set_repeat_from_string ( const char *  str)
inline

◆ set_seed_from_string()

void set_seed_from_string ( const char *  str)
inline

◆ type_name()

template<typename T >
std::string type_name ( )

◆ type_name< double >()

template<>
std::string type_name< double > ( )

◆ type_name< float >()

template<>
std::string type_name< float > ( )

◆ type_name< int >()

template<>
std::string type_name< int > ( )

◆ type_name< long double >()

template<>
std::string type_name< long double > ( )

◆ type_name< std::complex< double > >()

template<>
std::string type_name< std::complex< double > > ( )

◆ type_name< std::complex< float > >()

template<>
std::string type_name< std::complex< float > > ( )

◆ type_name< std::complex< int > >()

template<>
std::string type_name< std::complex< int > > ( )

◆ type_name< std::complex< long double > >()

template<>
std::string type_name< std::complex< long double > > ( )

◆ verify_impl()

void verify_impl ( bool  condition,
const char *  testname,
const char *  file,
int  line,
const char *  condition_as_string 
)
inline