Classes | Namespaces | Macros | Functions | Variables
main.h File Reference
#include <cstdlib>
#include <cerrno>
#include <ctime>
#include <iostream>
#include <fstream>
#include <string>
#include <sstream>
#include <vector>
#include <typeinfo>
#include <limits>
#include <algorithm>
#include <complex>
#include <deque>
#include <queue>
#include <cassert>
#include <list>
#include "split_test_helper.h"
#include <Eigen/QR>
Include dependency graph for main.h:

Go to the source code of this file.

Classes

struct  Eigen::eigen_assert_exception
 
struct  Eigen::eigen_static_assert_exception
 
struct  GetDifferentType< T >
 
struct  GetDifferentType< double >
 
struct  GetDifferentType< float >
 
struct  GetDifferentType< std::complex< T > >
 
class  Eigen::SparseMatrixBase< Derived >
 Base class of any sparse matrices or sparse expressions. More...
 
class  Eigen::SparseMatrixBase< Derived >
 Base class of any sparse matrices or sparse expressions. More...
 
class  Eigen::SparseMatrixBase< Derived >
 Base class of any sparse matrices or sparse expressions. More...
 

Namespaces

 Eigen
 Namespace containing all symbols from the Eigen library.
 

Macros

#define B0   FORBIDDEN_IDENTIFIER
 
#define CALL_SUBTEST(FUNC)
 
#define DEBUG
 
#define DEFAULT_REPEAT   10
 
#define EI_PP_MAKE_STRING(S)   EI_PP_MAKE_STRING2(S)
 
#define EI_PP_MAKE_STRING2(S)   #S
 
#define eigen_assert(a)
 
#define EIGEN_DEBUG_SMALL_PRODUCT_BLOCKS
 
#define EIGEN_DEFAULT_IO_FORMAT   IOFormat(4, 0, " ", "\n", "", "", "", "")
 
#define EIGEN_INTERNAL_DEBUGGING
 
#define EIGEN_TEST_CUDACC_VER   0
 
#define EIGEN_USE_CUSTOM_ASSERT
 
#define FORBIDDEN_IDENTIFIER   (this_identifier_is_forbidden_to_avoid_clashes) this_identifier_is_forbidden_to_avoid_clashes
 
#define isfinite(X)   please_protect_your_isfinite_with_parentheses
 
#define isinf(X)   please_protect_your_isinf_with_parentheses
 
#define isnan(X)   please_protect_your_isnan_with_parentheses
 
#define M_PI   please_use_EIGEN_PI_instead_of_M_PI
 
#define max(A, B)   please_protect_your_max_with_parentheses
 
#define min(A, B)   please_protect_your_min_with_parentheses
 
#define TEST_SET_BUT_UNUSED_VARIABLE(X)   EIGEN_UNUSED_VARIABLE(X)
 
#define TRACK   std::cerr << __FILE__ << " " << __LINE__ << std::endl
 
#define VERIFY(a)   ::verify_impl(a, g_test_stack.back().c_str(), __FILE__, __LINE__, EI_PP_MAKE_STRING(a))
 
#define VERIFY_GE(a, b)   ::verify_impl(a >= b, g_test_stack.back().c_str(), __FILE__, __LINE__, EI_PP_MAKE_STRING(a >= b))
 
#define VERIFY_IS_APPROX(a, b)   VERIFY(verifyIsApprox(a, b))
 
#define VERIFY_IS_APPROX_OR_LESS_THAN(a, b)   VERIFY(test_isApproxOrLessThan(a, b))
 
#define VERIFY_IS_EQUAL(a, b)   VERIFY(test_is_equal(a, b, true))
 
#define VERIFY_IS_MUCH_SMALLER_THAN(a, b)   VERIFY(test_isMuchSmallerThan(a, b))
 
#define VERIFY_IS_NOT_APPROX(a, b)   VERIFY(!test_isApprox(a, b))
 
#define VERIFY_IS_NOT_APPROX_OR_LESS_THAN(a, b)   VERIFY(!test_isApproxOrLessThan(a, b))
 
#define VERIFY_IS_NOT_EQUAL(a, b)   VERIFY(test_is_equal(a, b, false))
 
#define VERIFY_IS_NOT_MUCH_SMALLER_THAN(a, b)   VERIFY(!test_isMuchSmallerThan(a, b))
 
#define VERIFY_IS_UNITARY(a)   VERIFY(test_isUnitary(a))
 
#define VERIFY_LE(a, b)   ::verify_impl(a <= b, g_test_stack.back().c_str(), __FILE__, __LINE__, EI_PP_MAKE_STRING(a <= b))
 
#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";
 

Functions

template<typename MatrixType >
void Eigen::createRandomPIMatrixOfRank (Index desired_rank, Index rows, Index cols, MatrixType &m)
 
void EIGEN_CAT (test_, EIGEN_TEST_FUNC)()
 
template<typename T >
NumTraits< typename T::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 T >
bool Eigen::isMinusInf (const T &x)
 
template<typename T >
bool Eigen::isNotNaN (const T &x)
 
template<typename T >
bool Eigen::isPlusInf (const T &x)
 
int main (int argc, char *argv[])
 
template<typename PermutationVectorType >
void Eigen::randomPermutationVector (PermutationVectorType &v, Index size)
 
void set_repeat_from_string (const char *str)
 
void set_seed_from_string (const char *str)
 
template<typename T , typename U >
bool Eigen::test_is_equal (const T &actual, const U &expected, bool expect_equal=true)
 
bool Eigen::test_isApprox (const short &a, const short &b)
 
bool Eigen::test_isApprox (const unsigned short &a, const unsigned short &b)
 
bool Eigen::test_isApprox (const unsigned int &a, const unsigned int &b)
 
bool Eigen::test_isApprox (const long &a, const long &b)
 
bool Eigen::test_isApprox (const unsigned long &a, const unsigned long &b)
 
bool Eigen::test_isApprox (const int &a, const int &b)
 
bool Eigen::test_isApprox (const float &a, const float &b)
 
bool Eigen::test_isApprox (const double &a, const double &b)
 
bool Eigen::test_isApprox (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_isApprox (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_isApprox (const half &a, const half &b)
 
template<typename Type1 , typename Type2 >
bool Eigen::test_isApprox (const Type1 &a, const Type2 &b, typename Type1::Scalar *=0)
 
bool Eigen::test_isApproxOrLessThan (const int &a, const int &b)
 
bool Eigen::test_isApproxOrLessThan (const float &a, const float &b)
 
bool Eigen::test_isApproxOrLessThan (const double &a, const double &b)
 
bool Eigen::test_isApproxOrLessThan (const long double &a, const long double &b)
 
bool Eigen::test_isApproxOrLessThan (const half &a, const half &b)
 
template<typename Scalar , typename ScalarRef >
bool Eigen::test_isApproxWithRef (const Scalar &a, const Scalar &b, const ScalarRef &ref)
 
bool Eigen::test_isMuchSmallerThan (const int &a, const int &b)
 
bool Eigen::test_isMuchSmallerThan (const float &a, const float &b)
 
bool Eigen::test_isMuchSmallerThan (const double &a, const double &b)
 
bool Eigen::test_isMuchSmallerThan (const std::complex< float > &a, const std::complex< float > &b)
 
bool Eigen::test_isMuchSmallerThan (const std::complex< double > &a, const std::complex< double > &b)
 
bool Eigen::test_isMuchSmallerThan (const std::complex< long double > &a, const std::complex< long double > &b)
 
bool Eigen::test_isMuchSmallerThan (const long double &a, const long double &b)
 
bool Eigen::test_isMuchSmallerThan (const half &a, const half &b)
 
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 >
NumTraits< T >::Real Eigen::test_precision ()
 
template<>
double Eigen::test_precision< double > ()
 
template<>
float Eigen::test_precision< float > ()
 
template<>
long double Eigen::test_precision< long double > ()
 
template<>
double Eigen::test_precision< std::complex< double > > ()
 
template<>
float Eigen::test_precision< std::complex< float > > ()
 
template<>
long double Eigen::test_precision< std::complex< long double > > ()
 
template<typename T1 , typename T2 >
NumTraits< typename T1::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< typename NumTraits< 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 T >
std::string type_name ()
 
template<>
std::string type_name< double > ()
 
template<>
std::string type_name< float > ()
 
template<>
std::string type_name< int > ()
 
template<>
std::string type_name< long double > ()
 
template<>
std::string type_name< std::complex< double > > ()
 
template<>
std::string type_name< std::complex< float > > ()
 
template<>
std::string type_name< std::complex< int > > ()
 
template<>
std::string type_name< std::complex< long double > > ()
 
void verify_impl (bool condition, const char *testname, const char *file, int line, const char *condition_as_string)
 
template<typename Type1 , typename Type2 >
bool Eigen::verifyIsApprox (const Type1 &a, const Type2 &b)
 

Variables

static bool Eigen::g_has_set_repeat
 
static bool Eigen::g_has_set_seed
 
static int Eigen::g_repeat
 
static unsigned int Eigen::g_seed
 
static int Eigen::g_test_level = 0
 
static std::vector< std::string > Eigen::g_test_stack
 
static bool Eigen::no_more_assert = false
 
static bool Eigen::report_on_cerr_on_assert_failure = true
 
static const bool Eigen::should_raise_an_assert = false
 

Macro Definition Documentation

#define B0   FORBIDDEN_IDENTIFIER

Definition at line 82 of file main.h.

#define CALL_SUBTEST (   FUNC)
Value:
do { \
g_test_stack.push_back(EI_PP_MAKE_STRING(FUNC)); \
FUNC; \
g_test_stack.pop_back(); \
} while (0)
#define EI_PP_MAKE_STRING(S)
Definition: main.h:153
static std::vector< std::string > g_test_stack
Definition: main.h:140

Definition at line 342 of file main.h.

#define DEBUG

Definition at line 124 of file main.h.

#define DEFAULT_REPEAT   10

Definition at line 136 of file main.h.

#define EI_PP_MAKE_STRING (   S)    EI_PP_MAKE_STRING2(S)

Definition at line 153 of file main.h.

#define EI_PP_MAKE_STRING2 (   S)    #S

Definition at line 152 of file main.h.

#define eigen_assert (   a)
Value:
{ \
}
static bool report_on_cerr_on_assert_failure
Definition: main.h:171
if((m *x).isApprox(y))
Array33i a
#define eigen_plain_assert(x)
Definition: Macros.h:549
static bool no_more_assert
Definition: main.h:170
bool copy_bool(bool b)
Definition: Macros.h:546
#define EIGEN_THROW_X(X)
Definition: Macros.h:974

Definition at line 238 of file main.h.

#define EIGEN_DEBUG_SMALL_PRODUCT_BLOCKS

Definition at line 87 of file main.h.

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

Definition at line 155 of file main.h.

#define EIGEN_INTERNAL_DEBUGGING

Definition at line 304 of file main.h.

#define EIGEN_TEST_CUDACC_VER   0

Definition at line 59 of file main.h.

#define EIGEN_USE_CUSTOM_ASSERT

Definition at line 294 of file main.h.

#define FORBIDDEN_IDENTIFIER   (this_identifier_is_forbidden_to_avoid_clashes) this_identifier_is_forbidden_to_avoid_clashes

Definition at line 80 of file main.h.

#define isfinite (   X)    please_protect_your_isfinite_with_parentheses

Definition at line 74 of file main.h.

#define isinf (   X)    please_protect_your_isinf_with_parentheses

Definition at line 73 of file main.h.

#define isnan (   X)    please_protect_your_isnan_with_parentheses

Definition at line 72 of file main.h.

#define M_PI   please_use_EIGEN_PI_instead_of_M_PI

Definition at line 78 of file main.h.

#define max (   A,
  B 
)    please_protect_your_max_with_parentheses

Definition at line 71 of file main.h.

#define min (   A,
  B 
)    please_protect_your_min_with_parentheses

Definition at line 70 of file main.h.

#define TEST_SET_BUT_UNUSED_VARIABLE (   X)    EIGEN_UNUSED_VARIABLE(X)

Definition at line 91 of file main.h.

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

Definition at line 149 of file main.h.

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

Definition at line 325 of file main.h.

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

Definition at line 327 of file main.h.

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

Definition at line 333 of file main.h.

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

Definition at line 337 of file main.h.

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

Definition at line 331 of file main.h.

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

Definition at line 335 of file main.h.

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

Definition at line 334 of file main.h.

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

Definition at line 338 of file main.h.

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

Definition at line 332 of file main.h.

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

Definition at line 336 of file main.h.

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

Definition at line 340 of file main.h.

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

Definition at line 328 of file main.h.

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

Definition at line 285 of file main.h.

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

Definition at line 289 of file main.h.

Function Documentation

void EIGEN_CAT ( test_  ,
EIGEN_TEST_FUNC   
)
int main ( int  argc,
char *  argv[] 
)

Definition at line 723 of file main.h.

void set_repeat_from_string ( const char *  str)
inline

Definition at line 699 of file main.h.

void set_seed_from_string ( const char *  str)
inline

Definition at line 711 of file main.h.

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

Definition at line 684 of file main.h.

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

Definition at line 686 of file main.h.

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

Definition at line 685 of file main.h.

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

Definition at line 688 of file main.h.

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

Definition at line 687 of file main.h.

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

Definition at line 690 of file main.h.

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

Definition at line 689 of file main.h.

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

Definition at line 692 of file main.h.

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

Definition at line 691 of file main.h.

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

Definition at line 307 of file main.h.



gtsam
Author(s):
autogenerated on Sat May 8 2021 02:51:31