13#ifndef INCLUDE_OPTIMIST_HH
14#define INCLUDE_OPTIMIST_HH
34#define OPTIMIST_ERROR(MSG) \
36 std::ostringstream os; \
38 throw std::runtime_error(os.str()); \
43#ifndef OPTIMIST_ASSERT
44#define OPTIMIST_ASSERT(COND, MSG) \
47 OPTIMIST_ERROR(MSG); \
52#ifndef OPTIMIST_WARNING
53#define OPTIMIST_WARNING(MSG) \
55 std::cout << MSG << std::endl; \
60#ifndef OPTIMIST_ASSERT_WARNING
61#define OPTIMIST_ASSERT_WARNING(COND, MSG) \
64 OPTIMIST_WARNING(MSG); \
70#ifndef OPTIMIST_BASIC_CONSTANTS
71#define OPTIMIST_BASIC_CONSTANTS(Real) \
72 static constexpr Real EPSILON{std::numeric_limits<Real>::epsilon()}; \
73 static constexpr Real EPSILON_HIGH{1.0e-12}; \
74 static constexpr Real EPSILON_MEDIUM{1.0e-10}; \
75 static constexpr Real EPSILON_LOW{1.0e-08}; \
76 static constexpr Real INFTY{std::numeric_limits<Real>::infinity()}; \
77 static constexpr Real QUIET_NAN{std::numeric_limits<Real>::quiet_NaN()};
80#ifndef OPTIMIST_DEFAULT_INTEGER_TYPE
81#define OPTIMIST_DEFAULT_INTEGER_TYPE int
#define OPTIMIST_DEFAULT_INTEGER_TYPE
Definition Optimist.hh:81
Namespace for the Optimist library.
Definition Optimist.hh:88
static std::string table_vertical_line()
Retrieve the Unicode character for the vertical line of a table.
Definition Optimist.hh:174
static std::string table_bottom_right_corner()
Retrieve the Unicode character for the bottom-right corner of a table.
Definition Optimist.hh:120
static std::string table_top_left_corner()
Retrieve the Unicode character for the top-left corner of a table.
Definition Optimist.hh:102
static std::string table_bottom_left_corner()
Retrieve the Unicode character for the bottom-left corner of a table.
Definition Optimist.hh:114
OPTIMIST_DEFAULT_INTEGER_TYPE Integer
The Integer type as used for the API.
Definition Optimist.hh:96
static std::string table_center_cross()
Retrieve the Unicode character for the center cross of a table.
Definition Optimist.hh:150
static std::string table_bottom_junction()
Retrieve the Unicode character for the bottom junction of a table.
Definition Optimist.hh:144
static std::string table_top_junction()
Retrieve the Unicode character for the top junction of a table.
Definition Optimist.hh:138
static std::string table_top_right_corner()
Retrieve the Unicode character for the top-right corner of a table.
Definition Optimist.hh:108
static std::string table_horizontal_line()
Retrieve the Unicode character for the horizontal line of a table.
Definition Optimist.hh:156
static std::string table_right_junction()
Retrieve the Unicode character for the right junction of a table.
Definition Optimist.hh:132
static std::string table_left_junction()
Retrieve the Unicode character for the left junction of a table.
Definition Optimist.hh:126