|
SoPlex
|
Debugging, floating point type and parameter definitions. More...
#include <cmath>#include <assert.h>#include <stdarg.h>#include <stdio.h>#include <iostream>#include <cstdlib>#include <memory>#include "soplex/config.h"#include "spxdefines.hpp"Go to the source code of this file.
Classes | |
| class | Tolerances |
Namespaces | |
| namespace | soplex |
| Everything should be within this namespace. | |
Macros | |
| #define | SOPLEX_VERSION 801 |
| #define | SOPLEX_VERSION_SUB 0 |
| #define | SOPLEX_SUBVERSION 0 |
| #define | SOPLEX_APIVERSION 20 |
| #define | SOPLEX_COPYRIGHT "Copyright (c) 1996-2026 Zuse Institute Berlin (ZIB)" |
| #define | SOPLEX_ASSERT_WARN(prefix, expr) |
| Macro to turn some assertions into warnings. | |
| #define | SOPLEX_DO_WITH_TMP_VERBOSITY(verbosity, spxout, do_something) |
| #define | SOPLEX_DO_WITH_ERR_VERBOSITY(do_something) |
| #define | SPX_MSG_ERROR(x) |
Prints out message x if the verbosity level is at least SPxOut::VERB_ERROR. | |
| #define | SPX_MSG_WARNING(spxout, x) |
Prints out message x if the verbosity level is at least SPxOut::VERB_WARNING. | |
| #define | SPX_MSG_INFO1(spxout, x) |
Prints out message x if the verbosity level is at least SPxOut::VERB_INFO1. | |
| #define | SPX_MSG_INFO2(spxout, x) |
Prints out message x if the verbosity level is at least SPxOut::VERB_INFO2. | |
| #define | SPX_MSG_INFO3(spxout, x) |
Prints out message x if the verbosity level is at least SPxOut::VERB_INFO3. | |
| #define | SPX_MSG_INCONSISTENT(name) |
| #define | SPX_MSG_DEBUG(x) |
| #define | SPX_DEBUG(x) |
| #define | SOPLEX_THREADLOCAL thread_local |
| SOPLEX_DEBUG. | |
| #define | SOPLEX_REAL(x) |
| #define | SOPLEX_REAL_FORMAT "lf" |
| #define | SOPLEX_DEFAULT_BND_VIOL 1e-6 |
| default allowed bound violation | |
| #define | SOPLEX_DEFAULT_EPS_ZERO 1e-16 |
| default allowed additive zero: 1.0 + EPS_ZERO == 1.0 | |
| #define | SOPLEX_DEFAULT_EPS_FACTOR 1e-20 |
| #define | SOPLEX_DEFAULT_EPS_UPDATE 1e-16 |
| #define | SOPLEX_DEFAULT_EPS_PIVOR 1e-10 |
| #define | SOPLEX_DEFAULT_INFINITY 1e100 |
| #define | SOPLEX_MAX(x, y) |
| #define | SOPLEX_MIN(x, y) |
| #define | SPX_MAXSTRLEN 1024 |
Typedefs | |
| typedef double | Real |
Functions | |
| bool | EQ (int a, int b) |
| bool | msginconsistent (const char *name, const char *file, int line) |
| template<class R> | |
| R | spxAbs (R a) |
| Real | spxNextafter (Real x, Real y) |
| template<> | |
| Real | spxAbs (Real a) |
| returns |a| | |
| Real | spxSqrt (Real a) |
| returns square root | |
| Real | maxAbs (Real a, Real b) |
| returns max(|a|,|b|) | |
| Real | relDiff (Real a, Real b) |
| returns (a-b) / max(|a|,|b|,1.0) | |
| int | spxSnprintf (char *t, size_t len, const char *s,...) |
| safe version of snprintf | |
Debugging, floating point type and parameter definitions.
In optimized code with NDEBUG defined, only VERB_INFO1, VERB_INFO2, and VERB_INFO3 are set. If NDEBUG is not defined, the code within #TRACE is used. If SOPLEX_DEBUG is defined, the code within VERB_DEBUG is also used.
If WITH_LONG_DOUBLE is defined, all Real numbers are of type long double instead of just double.
Definition in file spxdefines.h.
| #define SOPLEX_APIVERSION 20 |
Definition at line 96 of file spxdefines.h.
| #define SOPLEX_ASSERT_WARN | ( | prefix, | |
| expr ) |
Macro to turn some assertions into warnings.
If both NDEBUG and WITH_WARNINGS are defined then the failed assertion is converted to a warning. In all other cases this macro is equivalent to assert().
| prefix | Short string for grepping in source code. |
| expr | Expression that must be satisfied. |
Definition at line 126 of file spxdefines.h.
| #define SOPLEX_COPYRIGHT "Copyright (c) 1996-2026 Zuse Institute Berlin (ZIB)" |
Definition at line 97 of file spxdefines.h.
Referenced by runSoPlex().
| #define SOPLEX_DEFAULT_BND_VIOL 1e-6 |
default allowed bound violation
Definition at line 277 of file spxdefines.h.
Referenced by SPxFastRT< R >::SPxFastRT(), SPxFastRT< R >::SPxFastRT(), and Tolerances::Tolerances().
| #define SOPLEX_DEFAULT_EPS_FACTOR 1e-20 |
Definition at line 284 of file spxdefines.h.
Referenced by Tolerances::Tolerances().
| #define SOPLEX_DEFAULT_EPS_PIVOR 1e-10 |
Definition at line 290 of file spxdefines.h.
Referenced by Tolerances::Tolerances().
| #define SOPLEX_DEFAULT_EPS_UPDATE 1e-16 |
Definition at line 287 of file spxdefines.h.
Referenced by Tolerances::Tolerances().
| #define SOPLEX_DEFAULT_EPS_ZERO 1e-16 |
default allowed additive zero: 1.0 + EPS_ZERO == 1.0
Definition at line 281 of file spxdefines.h.
Referenced by Tolerances::setEpsilon(), SPxFastRT< R >::SPxFastRT(), SPxFastRT< R >::SPxFastRT(), and Tolerances::Tolerances().
| #define SOPLEX_DEFAULT_INFINITY 1e100 |
Definition at line 292 of file spxdefines.h.
| #define SOPLEX_DO_WITH_ERR_VERBOSITY | ( | do_something | ) |
Definition at line 159 of file spxdefines.h.
| #define SOPLEX_DO_WITH_TMP_VERBOSITY | ( | verbosity, | |
| spxout, | |||
| do_something ) |
Prints/Executes stream with verbosity level verbosity, resetting the old verbosity level afterwards. Usually the parameter stream prints something out. This is an internal define used by SPX_MSG_ERROR, SPX_MSG_WARNING, etc.
Definition at line 146 of file spxdefines.h.
| #define SOPLEX_MAX | ( | x, | |
| y ) |
Definition at line 297 of file spxdefines.h.
Referenced by SPxSolverBase< Real >::delta(), StableSum< double >::operator double(), Random::setSeed(), SPxSolverBase< Real >::shiftLBbound(), SPxSolverBase< Real >::shiftLCbound(), SPxSolverBase< Real >::shiftLPbound(), SPxSolverBase< Real >::shiftUBbound(), SPxSolverBase< Real >::shiftUCbound(), and SPxSolverBase< Real >::shiftUPbound().
| #define SOPLEX_MIN | ( | x, | |
| y ) |
Definition at line 298 of file spxdefines.h.
| #define SOPLEX_REAL | ( | x | ) |
Definition at line 272 of file spxdefines.h.
| #define SOPLEX_REAL_FORMAT "lf" |
Definition at line 273 of file spxdefines.h.
| #define SOPLEX_SUBVERSION 0 |
Definition at line 95 of file spxdefines.h.
Referenced by SPxSolverBase< Real >::subversion().
| #define SOPLEX_THREADLOCAL thread_local |
SOPLEX_DEBUG.
Definition at line 196 of file spxdefines.h.
| #define SOPLEX_VERSION 801 |
Definition at line 93 of file spxdefines.h.
Referenced by SPxSolverBase< Real >::version().
| #define SOPLEX_VERSION_SUB 0 |
Definition at line 94 of file spxdefines.h.
| #define SPX_DEBUG | ( | x | ) |
Definition at line 183 of file spxdefines.h.
| #define SPX_MAXSTRLEN 1024 |
maximum string length in SoPlex
Definition at line 300 of file spxdefines.h.
Referenced by NameSet::add(), and NameSet::memPack().
| #define SPX_MSG_DEBUG | ( | x | ) |
Definition at line 182 of file spxdefines.h.
| #define SPX_MSG_ERROR | ( | x | ) |
Prints out message x if the verbosity level is at least SPxOut::VERB_ERROR.
Definition at line 163 of file spxdefines.h.
Referenced by TimerFactory::createTimer(), soplex::dlcmSizeRational(), soplex::dmaxSizeRational(), MPSInput::entryIgnored(), SSVectorBase< Real >::isConsistent(), main(), soplex::msginconsistent(), Rational::rationalErrorMessage(), runSoPlex(), LPRowBase< Real >::setType(), LPRowSetBase< Real >::setType(), soplex::sizeInBase(), soplex::spxSnprintf(), and MPSInput::syntaxError().
| #define SPX_MSG_INCONSISTENT | ( | name | ) |
Definition at line 175 of file spxdefines.h.
Referenced by ClassArray< Nonzero< R > >::isConsistent(), ClassSet< T >::isConsistent(), DataArray< T >::isConsistent(), DataHashTable< HashItem, Info >::isConsistent(), DataSet< DATA >::isConsistent(), DSVectorBase< Real >::isConsistent(), IdList< T >::isConsistent(), IdxSet::isConsistent(), IsList< T >::isConsistent(), LPColSetBase< Real >::isConsistent(), LPRowSetBase< Real >::isConsistent(), NameSet::isConsistent(), SPxLPBase< Real >::isConsistent(), SSVectorBase< Real >::isConsistent(), SVectorBase< Real >::isConsistent(), SVSetBase< Real >::isConsistent(), and UnitVectorBase< Real >::isConsistent().
| #define SPX_MSG_INFO1 | ( | spxout, | |
| x ) |
Prints out message x if the verbosity level is at least SPxOut::VERB_INFO1.
Definition at line 167 of file spxdefines.h.
Referenced by checkSolution(), checkSolutionRational(), checkSolutionReal(), printDualSolution(), printPrimalSolution(), and runSoPlex().
| #define SPX_MSG_INFO2 | ( | spxout, | |
| x ) |
Prints out message x if the verbosity level is at least SPxOut::VERB_INFO2.
Definition at line 169 of file spxdefines.h.
| #define SPX_MSG_INFO3 | ( | spxout, | |
| x ) |
Prints out message x if the verbosity level is at least SPxOut::VERB_INFO3.
Definition at line 171 of file spxdefines.h.
| #define SPX_MSG_WARNING | ( | spxout, | |
| x ) |
Prints out message x if the verbosity level is at least SPxOut::VERB_WARNING.
Definition at line 165 of file spxdefines.h.
Referenced by runSoPlex().