Scippy

SoPlex

Sequential object-oriented simPlex

spxdefines.cpp
Go to the documentation of this file.
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2 /* */
3 /* This file is part of the class library */
4 /* SoPlex --- the Sequential object-oriented simPlex. */
5 /* */
6 /* Copyright (C) 1996-2020 Konrad-Zuse-Zentrum */
7 /* fuer Informationstechnik Berlin */
8 /* */
9 /* SoPlex is distributed under the terms of the ZIB Academic Licence. */
10 /* */
11 /* You should have received a copy of the ZIB Academic License */
12 /* along with SoPlex; see the file COPYING. If not email to soplex@zib.de. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file spxdefines.cpp
17  * @brief Debugging, floating point type and parameter definitions.
18  */
19 #include "assert.h"
20 #include "soplex/spxdefines.h"
21 #include "soplex/spxout.h"
22 #include "soplex/rational.h"
23 
24 namespace soplex
25 {
26 // Overloaded EQ function
27 bool EQ(int a, int b)
28 {
29  return (a == b);
30 }
31 
33 
35 
37 
39 
41 
42 bool msginconsistent(const char* name, const char* file, int line)
43 {
44  assert(name != 0);
45  assert(file != 0);
46  assert(line >= 0);
47 
48  MSG_ERROR(std::cerr << file << "(" << line << ") "
49  << "Inconsistency detected in " << name << std::endl;)
50 
51  return 0;
52 }
53 
54 
56 {
57  return (s_epsilon);
58 }
59 
61 {
62  s_epsilon = eps;
63 }
64 
65 
67 {
69 }
70 
72 {
74 }
75 
76 
78 {
79  return s_epsilon_update;
80 }
81 
83 {
84  s_epsilon_update = eps;
85 }
86 
88 {
89  return s_epsilon_pivot;
90 }
91 
93 {
94  s_epsilon_pivot = eps;
95 }
96 
97 
98 template <>
99 Real spxFrexp(Real y, int* exp)
100 {
101  return frexp(y, exp);
102 }
103 
104 } // namespace soplex
#define DEFAULT_EPS_FACTOR
Definition: spxdefines.h:242
static void setEpsilon(Real eps)
Definition: spxdefines.cpp:60
bool EQ(int a, int b)
Definition: spxdefines.cpp:27
THREADLOCAL const Real infinity
Definition: spxdefines.cpp:32
bool msginconsistent(const char *name, const char *file, int line)
Definition: spxdefines.cpp:42
#define DEFAULT_INFINITY
Definition: spxdefines.h:250
#define DEFAULT_EPS_UPDATE
Definition: spxdefines.h:245
Wrapper for different output streams and verbosity levels.
double Real
Definition: spxdefines.h:227
static void setEpsilonPivot(Real eps)
Definition: spxdefines.cpp:92
#define MSG_ERROR(x)
Prints out message x if the verbosity level is at least SPxOut::ERROR.
Definition: spxdefines.h:123
Wrapper for GMP types.
static THREADLOCAL Real s_epsilon_pivot
epsilon for pivot zero tolerance in factorization
Definition: spxdefines.h:276
#define DEFAULT_EPS_ZERO
default allowed additive zero: 1.0 + EPS_ZERO == 1.0
Definition: spxdefines.h:239
#define DEFAULT_EPS_PIVOT
Definition: spxdefines.h:248
static Real epsilonUpdate()
Definition: spxdefines.cpp:77
Debugging, floating point type and parameter definitions.
static Real epsilon()
Definition: spxdefines.cpp:55
static THREADLOCAL Real s_epsilon
default allowed additive zero: 1.0 + EPS_ZERO == 1.0
Definition: spxdefines.h:270
Rational spxFrexp(Rational r, int *d)
Definition: rational.h:1118
Everything should be within this namespace.
static void setEpsilonUpdate(Real eps)
Definition: spxdefines.cpp:82
static THREADLOCAL Real s_epsilon_update
epsilon for factorization update
Definition: spxdefines.h:274
static Real epsilonPivot()
Definition: spxdefines.cpp:87
static void setEpsilonFactorization(Real eps)
Definition: spxdefines.cpp:71
static Real epsilonFactorization()
Definition: spxdefines.cpp:66
static THREADLOCAL Real s_epsilon_factorization
epsilon for factorization
Definition: spxdefines.h:272
#define THREADLOCAL
SOPLEX_DEBUG.
Definition: spxdefines.h:154