13#ifndef INCLUDE_OPTIMIST_HH
14#define INCLUDE_OPTIMIST_HH
33#define OPTIMIST_ERROR(MSG) \
35 std::ostringstream os; \
37 throw std::runtime_error(os.str()); \
42#ifndef OPTIMIST_ASSERT
43#define OPTIMIST_ASSERT(COND, MSG) \
46 OPTIMIST_ERROR(MSG); \
51#ifndef OPTIMIST_WARNING
52#define OPTIMIST_WARNING(MSG) \
54 std::cout << MSG << std::endl; \
59#ifndef OPTIMIST_ASSERT_WARNING
60#define OPTIMIST_ASSERT_WARNING(COND, MSG) \
63 OPTIMIST_WARNING(MSG); \
69#ifndef OPTIMIST_BASIC_CONSTANTS
70#define OPTIMIST_BASIC_CONSTANTS(Real) \
71 static constexpr Real EPSILON{std::numeric_limits<Real>::epsilon()}; \
72 static constexpr Real EPSILON_HIGH{1.0e-12}; \
73 static constexpr Real EPSILON_MEDIUM{1.0e-10}; \
74 static constexpr Real EPSILON_LOW{1.0e-08}; \
75 static constexpr Real INFTY{std::numeric_limits<Real>::infinity()}; \
76 static constexpr Real QUIET_NAN{std::numeric_limits<Real>::quiet_NaN()};
79#ifndef OPTIMIST_DEFAULT_INTEGER_TYPE
80#define OPTIMIST_DEFAULT_INTEGER_TYPE int
#define OPTIMIST_DEFAULT_INTEGER_TYPE
Definition Optimist.hh:80
Namespace for the Optimist library.
Definition Optimist.hh:87
static std::string table_vertical_line()
Retrieve the Unicode character for the vertical line of a table.
Definition Optimist.hh:173
static std::string table_bottom_right_corner()
Retrieve the Unicode character for the bottom-right corner of a table.
Definition Optimist.hh:119
static std::string table_top_left_corner()
Retrieve the Unicode character for the top-left corner of a table.
Definition Optimist.hh:101
static std::string table_bottom_left_corner()
Retrieve the Unicode character for the bottom-left corner of a table.
Definition Optimist.hh:113
OPTIMIST_DEFAULT_INTEGER_TYPE Integer
The Integer type as used for the API.
Definition Optimist.hh:95
static std::string table_center_cross()
Retrieve the Unicode character for the center cross of a table.
Definition Optimist.hh:149
static std::string table_bottom_junction()
Retrieve the Unicode character for the bottom junction of a table.
Definition Optimist.hh:143
static std::string table_top_junction()
Retrieve the Unicode character for the top junction of a table.
Definition Optimist.hh:137
static std::string table_top_right_corner()
Retrieve the Unicode character for the top-right corner of a table.
Definition Optimist.hh:107
static std::string table_horizontal_line()
Retrieve the Unicode character for the horizontal line of a table.
Definition Optimist.hh:155
static std::string table_right_junction()
Retrieve the Unicode character for the right junction of a table.
Definition Optimist.hh:131
static std::string table_left_junction()
Retrieve the Unicode character for the left junction of a table.
Definition Optimist.hh:125