SoPlex Doxygen Documentation
spxdefines.h File Reference

Debugging, floating point type and parameter definitions. More...

#include <math.h>

Go to the source code of this file.

Classes

class  Param
 

Namespaces

namespace  soplex
 Everything should be within this namespace.
 

Macros

#define SOPLEX_VERSION   171
 
#define SOPLEX_SUBVERSION   0
 
#define ASSERT_WARN(prefix, expr)   ( assert( expr ) )
 Macro to turn some assertions into warnings.
 
#define DO_WITH_TMP_VERBOSITY(verbosity, do_something)
 
#define MSG_ERROR(x)   { DO_WITH_TMP_VERBOSITY( SPxOut::ERROR, x ) }
 Prints out message x if the verbosity level is at least SPxOut::ERROR.
 
#define MSG_WARNING(x)   { DO_WITH_TMP_VERBOSITY( SPxOut::WARNING, x ) }
 Prints out message x if the verbosity level is at least SPxOut::WARNING.
 
#define MSG_INFO1(x)   { DO_WITH_TMP_VERBOSITY( SPxOut::INFO1, x ) }
 Prints out message x if the verbosity level is at least SPxOut::INFO1.
 
#define MSG_INFO2(x)   { DO_WITH_TMP_VERBOSITY( SPxOut::INFO2, x ) }
 Prints out message x if the verbosity level is at least SPxOut::INFO2.
 
#define MSG_INFO3(x)   { DO_WITH_TMP_VERBOSITY( SPxOut::INFO3, x ) }
 Prints out message x if the verbosity level is at least SPxOut::INFO3.
 
#define MSGinconsistent(name)   msginconsistent(name, __FILE__, __LINE__)
 
#define TRACE(x)   { DO_WITH_TMP_VERBOSITY( SPxOut::ERROR, x ) }
 
#define MSG_DEBUG(x)
 NDEBUG.
 
#define METHOD(x)
 DEBUGGING.
 
#define REAL(x)   x
 
#define DEFAULT_BND_VIOL   1e-6
 default allowed bound violation
 
#define DEFAULT_EPS_ZERO   1e-16
 default allowed additive zero: 1.0 + EPS_ZERO == 1.0
 
#define DEFAULT_EPS_FACTOR   1e-20
 
#define DEFAULT_EPS_UPDATE   1e-16
 
#define DEFAULT_INFINITY   1e100
 

Typedefs

typedef double Real
 

Functions

bool msginconsistent (const char *name, const char *file, int line)
 
static Real maxAbs (Real a, Real b)
 returns max(|a|,|b|)
 
static Real relDiff (Real a, Real b)
 returns (a-b) / max(|a|,|b|,1.0)
 
bool EQ (Real a, Real b, Real eps=Param::epsilon())
 returns true iff |a-b| <= eps
 
bool NE (Real a, Real b, Real eps=Param::epsilon())
 returns true iff |a-b| > eps
 
bool LT (Real a, Real b, Real eps=Param::epsilon())
 returns true iff a < b + eps
 
bool LE (Real a, Real b, Real eps=Param::epsilon())
 returns true iff a <= b + eps
 
bool GT (Real a, Real b, Real eps=Param::epsilon())
 returns true iff a > b + eps
 
bool GE (Real a, Real b, Real eps=Param::epsilon())
 returns true iff a >= b + eps
 
bool isZero (Real a, Real eps=Param::epsilon())
 returns true iff |a| <= eps
 
bool isNotZero (Real a, Real eps=Param::epsilon())
 returns true iff |a| > eps
 
bool EQrel (Real a, Real b, Real eps=Param::epsilon())
 returns true iff |relDiff(a,b)| <= eps
 
bool NErel (Real a, Real b, Real eps=Param::epsilon())
 returns true iff |relDiff(a,b)| > eps
 
bool LTrel (Real a, Real b, Real eps=Param::epsilon())
 returns true iff relDiff(a,b) <= -eps
 
bool LErel (Real a, Real b, Real eps=Param::epsilon())
 returns true iff relDiff(a,b) <= eps
 
bool GTrel (Real a, Real b, Real eps=Param::epsilon())
 returns true iff relDiff(a,b) > eps
 
bool GErel (Real a, Real b, Real eps=Param::epsilon())
 returns true iff relDiff(a,b) > -eps
 

Detailed Description

Debugging, floating point type and parameter definitions.

In optimized code with NDEBUG defined, only INFO1, INFO2, and INFO3 are set. If NDEBUG is not defined, the code within TRACE is used. If DEBUGGING is defined, the code within DEBUG is also used. If TRACE_METHOD is defined, the method tracing with METHOD is activated.

If WITH_LONG_DOUBLE is defined, all Real numbers are of type long double instead of just double.

Definition in file spxdefines.h.

Macro Definition Documentation

#define ASSERT_WARN (   prefix,
  expr 
)    ( assert( 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().

Parameters
prefixShort string for grepping in source code.
exprExpression that must be satisfied.

Definition at line 76 of file spxdefines.h.

Referenced by SPxWeightPR::computeCP(), SPxWeightPR::computeRP(), SPxMainSM::duplicateCols(), SPxMainSM::duplicateRows(), SPxMainSM::ZeroObjColSingletonPS::execute(), SPxMainSM::DoubletonEquationPS::execute(), SPxMainSM::DuplicateRowsPS::execute(), SPxMainSM::DuplicateColsPS::execute(), SPxMainSM::removeEmpty(), SPxDefaultRT::selectLeave(), SPxMainSM::simplifyCols(), SPxMainSM::simplifyDual(), SPxMainSM::simplifyRows(), and CLUFactor::solveUleft().

#define DEFAULT_BND_VIOL   1e-6
#define DEFAULT_EPS_FACTOR   1e-20

Definition at line 222 of file spxdefines.h.

Referenced by main().

#define DEFAULT_EPS_UPDATE   1e-16

Definition at line 225 of file spxdefines.h.

Referenced by main().

#define DEFAULT_EPS_ZERO   1e-16

default allowed additive zero: 1.0 + EPS_ZERO == 1.0

Definition at line 219 of file spxdefines.h.

Referenced by main(), SPxRatioTester::setDelta(), and SPxFastRT::setDelta().

#define DEFAULT_INFINITY   1e100

Definition at line 227 of file spxdefines.h.

#define DO_WITH_TMP_VERBOSITY (   verbosity,
  do_something 
)
Value:
{ const SPxOut::Verbosity old_verbosity = spxout.getVerbosity(); \
spxout.setVerbosity( verbosity ); \
do_something; \
spxout.setVerbosity( old_verbosity ); }

Executes do_something with verbosity level verbosity, resetting the old verbosity level afterwards. Usually the parameter do_something prints something out. This is an internal define used by MSG_ERROR, MSG_WARNING, etc.

Definition at line 95 of file spxdefines.h.

#define METHOD (   x)

DEBUGGING.

Definition at line 142 of file spxdefines.h.

Referenced by SPxLP::addCols(), SPxLP::added2Set(), SPxBasis::addedCols(), SPxSolver::addedCols(), SPxBasis::addedRows(), SPxSolver::addedRows(), SPxLP::addRows(), SPxScaler::applyScaling(), SLUFactor::assign(), SPxSolver::basisStatusToVarStatus(), SLUFactor::change(), SPxBasis::change(), SPxLP::changeBounds(), SPxSolver::changeBounds(), SPxLP::changeCol(), SPxSolver::changeCol(), SPxBasis::changedCol(), SPxBasis::changedElement(), SPxBasis::changedRow(), SPxLP::changeElement(), SPxSolver::changeElement(), SLUFactor::changeEta(), SPxLP::changeLhs(), SPxSolver::changeLhs(), SPxLP::changeLower(), SPxSolver::changeLower(), SPxLP::changeObj(), SPxSolver::changeObj(), SPxLP::changeRange(), SPxSolver::changeRange(), SPxLP::changeRhs(), SPxSolver::changeRhs(), SPxLP::changeRow(), SPxSolver::changeRow(), SPxSolver::changeSense(), SPxLP::changeUpper(), SPxSolver::changeUpper(), SLUFactor::clear(), SPxSolver::clear(), SPxLP::clear(), SPxSolver::clearDualBounds(), SPxSolver::clearUpdateVecs(), CLUFactor::colSingletons(), SPxSolver::computeCoTest(), SPxLP::computeDualActivity(), SPxSolver::computeEnterCoPrhs(), SPxSolver::computeEnterCoPrhs4Col(), SPxSolver::computeEnterCoPrhs4Row(), SPxSolver::computeFrhs(), SPxSolver::computeFrhs1(), SPxSolver::computeFrhs2(), SPxSolver::computeFrhsXtra(), SPxSolver::computeFtest(), SPxSolver::computeLeaveCoPrhs(), SPxSolver::computeLeaveCoPrhs4Col(), SPxSolver::computeLeaveCoPrhs4Row(), SPxLP::computePrimalActivity(), SPxSolver::computePvec(), SPxGeometSC::computeScale(), SPxScaler::computeScale(), SPxEquiliSC::computeScale(), SPxScaler::computeScalingVecs(), SPxSolver::computeTest(), SPxBasis::coSolve(), SPxSolver::coTest(), SPxLP::doAddCol(), SPxLP::doAddCols(), SPxLP::doAddRow(), SPxLP::doAddRows(), SPxSolver::doPupdate(), SPxLP::doRemoveCol(), SPxSolver::doRemoveCol(), SPxLP::doRemoveCols(), SPxSolver::doRemoveCols(), SPxLP::doRemoveRow(), SPxSolver::doRemoveRow(), SPxLP::doRemoveRows(), SPxSolver::doRemoveRows(), SPxBasis::dualColStatus(), SPxBasis::dualRowStatus(), SPxBasis::dualStatus(), SLUFactor::dump(), SPxBasis::Desc::dump(), CLUFactor::dump(), SPxBasis::dump(), SPxMainSM::duplicateCols(), SPxMainSM::duplicateRows(), CLUFactor::eliminateColSingletons(), CLUFactor::eliminateNucleus(), CLUFactor::eliminatePivot(), CLUFactor::eliminateRowSingletons(), SPxSolver::enter(), CLUFactor::factor(), SPxBasis::factorize(), SPxSolver::factorize(), SPxMainSM::fixColumn(), CLUFactor::forestMinColMem(), CLUFactor::forestPackColumns(), CLUFactor::forestReMaxCol(), CLUFactor::forestUpdate(), SPxSolver::fpsolve(), SLUFactor::freeAll(), CLUFactor::freeFactorRings(), SPxSolver::getBasis(), SPxSolver::getBasisColStatus(), SPxSolver::getBasisRowStatus(), SPxLP::getCol(), SPxLP::getCols(), SoPlex::getDual(), SPxSolver::getDual(), SPxSolver::getDualfarkas(), SPxSolver::getEnterVals(), SPxSolver::getEnterVals2(), SPxSolver::getLeaveVals(), SPxSolver::getLeaveVals2(), SPxScaler::getName(), SPxLP::getObj(), SoPlex::getPrimal(), SPxSolver::getPrimal(), SPxSolver::getPrimalray(), SoPlex::getRedCost(), SPxSolver::getRedCost(), SPxSolver::getResult(), SPxLP::getRow(), SPxLP::getRows(), SoPlex::getSlacks(), SPxSolver::getSlacks(), SPxMainSM::handleExtremes(), SPxSolver::init(), CLUFactor::initFactorMatrix(), CLUFactor::initFactorRings(), CLUFactor::initPerm(), SPxSolver::initRep(), SPxBasis::invalidate(), SPxSolver::isBasisValid(), SPxScaler::isConsistent(), SLUFactor::isConsistent(), SPxBasis::Desc::isConsistent(), CLUFactor::isConsistent(), SPxLP::isConsistent(), SPxBasis::isConsistent(), SPxSolver::isConsistent(), SPxBasis::isDescValid(), SPxSolver::leave(), SLUFactor::load(), SPxBasis::load(), SPxSolver::loadBasis(), SPxBasis::loadDesc(), SPxSolver::loadLP(), SPxBasis::loadMatrixVecs(), SPxBasis::loadSolver(), CLUFactor::makeLvec(), SPxScaler::maxAbsColscale(), SPxLP::maxAbsNzo(), SPxScaler::maxAbsRowscale(), SPxScaler::maxColRatio(), SPxSolver::maxInfeas(), SPxSolver::maxRefinements(), SPxScaler::maxRowRatio(), SPxScaler::minAbsColscale(), SPxLP::minAbsNzo(), SPxScaler::minAbsRowscale(), CLUFactor::minColMem(), CLUFactor::minLMem(), CLUFactor::minRowMem(), SPxBasis::multBaseWith(), SPxBasis::multWithBase(), SPxLP::nNzos(), SPxSolver::nonbasicValue(), SoPlex::objValue(), SLUFactor::operator=(), SPxBasis::operator=(), SPxSolver::operator=(), CLUFactor::packColumns(), CLUFactor::packRows(), SPxSolver::perturbMax(), SPxSolver::perturbMaxEnter(), SPxSolver::perturbMaxLeave(), SPxSolver::perturbMin(), SPxSolver::perturbMinEnter(), SPxSolver::perturbMinLeave(), SPxBasis::printMatrix(), SPxSolver::read(), SPxBasis::readBasis(), SPxSolver::readBasisFile(), SPxLP::readFile(), SPxBasis::reDim(), SPxSolver::reDim(), SPxSolver::refine(), SPxSolver::reinitializeVecs(), SPxSolver::rejectEnter(), SPxSolver::rejectLeave(), SPxSolver::reLoad(), CLUFactor::remaxCol(), CLUFactor::remaxRow(), SPxLP::removeColRange(), SPxLP::removeCols(), SPxBasis::removedCol(), SPxBasis::removedCols(), SPxBasis::removedRow(), SPxBasis::removedRows(), SPxMainSM::removeEmpty(), SPxLP::removeRowRange(), SPxLP::removeRows(), SPxBasis::Desc::reSize(), SPxBasis::restoreInitialBasis(), CLUFactor::rowSingletons(), SPxEquiliSC::scale(), SPxGeometSC::scale(), CLUFactor::selectPivots(), SPxSolver::setBasis(), SPxScaler::setBoth(), SPxSolver::setDelta(), SPxSolver::setDual(), SPxSolver::setDualColBounds(), SPxSolver::setDualRowBounds(), SPxSolver::setEnterBound4Col(), SPxSolver::setEnterBound4Row(), SPxSolver::setEnterBounds(), SPxSolver::setFeastol(), SPxSolver::setIrthreshold(), SPxSolver::setLeaveBound4Col(), SPxSolver::setLeaveBound4Row(), SPxSolver::setLeaveBounds(), SPxSolver::setMaxRefinements(), SPxSolver::setOpttol(), SPxScaler::setOrder(), CLUFactor::setPivot(), SoPlex::setPostScaler(), SoPlex::setPreScaler(), SPxSolver::setPricer(), SPxSolver::setPricing(), SPxSolver::setPrimal(), SPxSolver::setPrimalBounds(), SPxSolver::setRedCost(), SPxSolver::setRep(), SPxBasis::setRep(), SoPlex::setSimplifier(), SPxSolver::setSlacks(), SPxSolver::setSolver(), SPxSolver::setStarter(), SPxBasis::setStatus(), SPxSolver::setTerminationIter(), SPxSolver::setTerminationTime(), SPxSolver::setTerminationValue(), SPxSolver::setTester(), SPxSolver::setType(), SPxScaler::setup(), CLUFactor::setupColVals(), SPxSolver::setupPupdate(), CLUFactor::setupRowVals(), SPxSolver::shiftFvec(), SPxSolver::shiftPvec(), SPxMainSM::simplify(), SPxMainSM::simplifyCols(), SPxMainSM::simplifyDual(), SPxMainSM::simplifyRows(), SLUFactor::SLUFactor(), SoPlex::solve(), SPxSolver::solve(), SPxBasis::solve(), SLUFactor::solve2right4update(), SLUFactor::solve3right4update(), SPxBasis::solve4update(), SLUFactor::solveLeft(), CLUFactor::solveLeft(), CLUFactor::solveLeft2(), CLUFactor::solveLeftEps(), CLUFactor::solveLleft(), CLUFactor::solveLleft2(), CLUFactor::solveLleft2forest(), CLUFactor::solveLleftEps(), CLUFactor::solveLleftForest(), CLUFactor::solveLleftForestNoNZ(), CLUFactor::solveLleftNoNZ(), CLUFactor::solveLright(), CLUFactor::solveLright2(), SLUFactor::solveRight(), CLUFactor::solveRight(), CLUFactor::solveRight2(), CLUFactor::solveRight2update(), SLUFactor::solveRight4update(), CLUFactor::solveRight4update(), CLUFactor::solveUleft(), CLUFactor::solveUleft2(), CLUFactor::solveUleftNoNZ(), CLUFactor::solveUpdateLeft(), CLUFactor::solveUpdateLeft2(), CLUFactor::solveUpdateRight(), CLUFactor::solveUpdateRight2(), CLUFactor::solveUright(), CLUFactor::solveUright2(), CLUFactor::solveUright2eps(), CLUFactor::solveUrightEps(), SPxBasis::SPxBasis(), SPxSolver::SPxSolver(), SLUFactor::stability(), SPxSolver::status(), SPxSolver::terminate(), SPxSolver::terminationIter(), SPxSolver::terminationTime(), SPxSolver::terminationValue(), SPxSolver::test(), SPxSolver::testBounds(), SPxSolver::testVecs(), SPxSolver::ungetEnterVal(), SPxBasis::unLoad(), SPxScaler::unscaleDual(), SPxScaler::unscalePrimal(), SPxScaler::unscaleRedCost(), SPxScaler::unscaleSlacks(), SPxSolver::unShift(), SPxMainSM::unsimplify(), CLUFactor::update(), SPxSolver::updateCoTest(), SPxSolver::updateFtest(), CLUFactor::updateNoClear(), CLUFactor::updateRow(), SPxSolver::updateTest(), SPxSolver::value(), SPxSolver::varStatusToBasisStatusCol(), SPxSolver::varStatusToBasisStatusRow(), CLUFactor::vSolveLeft(), CLUFactor::vSolveLeft2(), CLUFactor::vSolveLeftNoNZ(), CLUFactor::vSolveLright(), CLUFactor::vSolveLright2(), CLUFactor::vSolveLright3(), CLUFactor::vSolveRight4update(), CLUFactor::vSolveRight4update2(), CLUFactor::vSolveRight4update3(), CLUFactor::vSolveRightNoNZ(), CLUFactor::vSolveUpdateRight(), CLUFactor::vSolveUpdateRightNoNZ(), CLUFactor::vSolveUright(), CLUFactor::vSolveUright2(), CLUFactor::vSolveUrightNoNZ(), SPxBasis::writeBasis(), SPxSolver::writeBasisFile(), SPxLP::writeLPF(), SPxLP::writeMPS(), SoPlex::writeState(), SPxSolver::writeState(), SLUFactor::~SLUFactor(), and SPxBasis::~SPxBasis().

#define SOPLEX_SUBVERSION   0

Definition at line 47 of file spxdefines.h.

Referenced by print_version_info().

#define SOPLEX_VERSION   171

Definition at line 46 of file spxdefines.h.

Referenced by print_version_info().

#define TRACE (   x)    { DO_WITH_TMP_VERBOSITY( SPxOut::ERROR, x ) }

Definition at line 119 of file spxdefines.h.