Optimist  0.0.0
A C++ library for optimization
Loading...
Searching...
No Matches
Optimist.hh File Reference
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <ios>
#include <iostream>
#include <limits>
#include <map>
#include <memory>
#include <numeric>
#include <string>
#include <type_traits>
#include <vector>
#include <Eigen/Dense>
#include <Eigen/Sparse>
#include <Eigen/SparseLU>
Include dependency graph for Optimist.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Optimist::TypeTrait< ScalarType, std::enable_if_t< std::is_floating_point< ScalarType >::value > >
struct  Optimist::TypeTrait< Eigen::Matrix< ScalarType, N, M >, std::enable_if_t<(N > 0 &&M > 0)> >
struct  Optimist::TypeTrait< Eigen::Matrix< ScalarType, Eigen::Dynamic, 1 > >
struct  Optimist::TypeTrait< Eigen::Matrix< ScalarType, Eigen::Dynamic, Eigen::Dynamic > >
struct  Optimist::TypeTrait< Eigen::SparseVector< ScalarType > >
struct  Optimist::TypeTrait< Eigen::SparseMatrix< ScalarType, Options, StorageIndex > >
struct  Optimist::RetrieveType< BaseType< FirstType, Rest... > >

Namespaces

namespace  Optimist
 Namespace for the Optimist library.

Macros

#define INCLUDE_OPTIMIST_HH
#define OPTIMIST_ERROR(MSG)
#define OPTIMIST_ASSERT(COND, MSG)
#define OPTIMIST_WARNING(MSG)
#define OPTIMIST_ASSERT_WARNING(COND, MSG)
#define OPTIMIST_BASIC_CONSTANTS(Scalar)
#define OPTIMIST_DEFAULT_INTEGER_TYPE   int

Typedefs

using Optimist::Integer = OPTIMIST_DEFAULT_INTEGER_TYPE
 The Integer type as used for the API.

Functions

static constexpr std::string Optimist::table_top_left_corner ()
 Retrieve the Unicode character for the top-left corner of a table.
static constexpr std::string Optimist::table_top_right_corner ()
 Retrieve the Unicode character for the top-right corner of a table.
static constexpr std::string Optimist::table_bottom_left_corner ()
 Retrieve the Unicode character for the bottom-left corner of a table.
static constexpr std::string Optimist::table_bottom_right_corner ()
 Retrieve the Unicode character for the bottom-right corner of a table.
static constexpr std::string Optimist::table_left_junction ()
 Retrieve the Unicode character for the left junction of a table.
static constexpr std::string Optimist::table_right_junction ()
 Retrieve the Unicode character for the right junction of a table.
static constexpr std::string Optimist::table_top_junction ()
 Retrieve the Unicode character for the top junction of a table.
static constexpr std::string Optimist::table_bottom_junction ()
 Retrieve the Unicode character for the bottom junction of a table.
static constexpr std::string Optimist::table_center_cross ()
 Retrieve the Unicode character for the center cross of a table.
static constexpr std::string Optimist::table_horizontal_line ()
 Retrieve the Unicode character for the horizontal line of a table.
template<Integer N>
static constexpr std::string Optimist::table_horizontal_line ()
 Retrieve the Unicode character for a number of horizontal lines of a table.
static constexpr std::string Optimist::table_vertical_line ()
 Retrieve the Unicode character for the vertical line of a table.

Macro Definition Documentation

◆ INCLUDE_OPTIMIST_HH

#define INCLUDE_OPTIMIST_HH

◆ OPTIMIST_ASSERT

#define OPTIMIST_ASSERT ( COND,
MSG )
Value:
if (!(COND)) { \
OPTIMIST_ERROR(MSG); \
}

◆ OPTIMIST_ASSERT_WARNING

#define OPTIMIST_ASSERT_WARNING ( COND,
MSG )
Value:
if (!(COND)) { \
OPTIMIST_WARNING(MSG); \
}

◆ OPTIMIST_BASIC_CONSTANTS

#define OPTIMIST_BASIC_CONSTANTS ( Scalar)
Value:
static constexpr Scalar EPSILON{ \
std::numeric_limits<Scalar>::epsilon()}; \
static constexpr Scalar INFTY{ \
std::numeric_limits<Scalar>::infinity()}; \
static constexpr Scalar QUIET_NAN{ \
std::numeric_limits<Scalar>::quiet_NaN()}; \
inline static const Scalar SQRT_EPSILON{ \
std::sqrt(EPSILON)}; \
inline static const Scalar CBRT_EPSILON{ \
std::cbrt(EPSILON)};

Cube root of epsilon static constant value.

◆ OPTIMIST_DEFAULT_INTEGER_TYPE

#define OPTIMIST_DEFAULT_INTEGER_TYPE   int

◆ OPTIMIST_ERROR

#define OPTIMIST_ERROR ( MSG)
Value:
{ \
std::ostringstream os; \
os << MSG; \
throw std::runtime_error(os.str()); \
}

◆ OPTIMIST_WARNING

#define OPTIMIST_WARNING ( MSG)
Value:
{ std::cout << MSG << std::endl; }