|
Go to the documentation of this file.
30 #ifndef _SPXDEFINES_H_
31 #define _SPXDEFINES_H_
39 #define SOPLEX_VERSION 220
40 #define SOPLEX_SUBVERSION 0
57 #if defined (NDEBUG) && defined (WITH_WARNINGS)
58 #define ASSERT_WARN( prefix, expr ) \
63 << " failed assertion on line " << __LINE__ \
64 << " in file " << __FILE__ << ": " \
68 #else // just a normal assert
69 #define ASSERT_WARN( prefix, expr ) ( assert( expr ) )
85 #ifdef DISABLE_VERBOSITY
86 #define DO_WITH_TMP_VERBOSITY( verbosity, spxout, do_something ) {}
87 #define DO_WITH_ERR_VERBOSITY( do_something ) {}
89 #define DO_WITH_TMP_VERBOSITY( verbosity, spxout, do_something ) \
91 if( &spxout != NULL ) \
93 if( verbosity <= spxout.getVerbosity() ) \
95 const SPxOut::Verbosity old_verbosity = spxout.getVerbosity(); \
96 spxout.setVerbosity( verbosity ); \
98 spxout.setVerbosity( old_verbosity ); \
102 #define DO_WITH_ERR_VERBOSITY( do_something ) { do_something; }
106 #define MSG_ERROR(x) { DO_WITH_ERR_VERBOSITY( x ) }
108 #define MSG_WARNING(spxout, x) { DO_WITH_TMP_VERBOSITY( SPxOut::WARNING, spxout, x ) }
110 #define MSG_INFO1(spxout, x) { DO_WITH_TMP_VERBOSITY( SPxOut::INFO1, spxout, x ) }
112 #define MSG_INFO2(spxout, x) { DO_WITH_TMP_VERBOSITY( SPxOut::INFO2, spxout, x ) }
114 #define MSG_INFO3(spxout, x) { DO_WITH_TMP_VERBOSITY( SPxOut::INFO3, spxout, x ) }
116 extern bool msginconsistent( const char* name, const char* file, int line);
118 #define MSGinconsistent(name) msginconsistent(name, __FILE__, __LINE__)
120 #if defined(SOPLEX_DEBUG)
122 #define MSG_DEBUG(x) { x; }
133 #ifdef WITH_LONG_DOUBLE
136 typedef long double Real;
140 #define REAL_FORMAT "Lf"
143 #ifndef DEFAULT_BND_VIOL
144 #define DEFAULT_BND_VIOL 1e-12
147 #ifndef DEFAULT_EPS_ZERO
148 #define DEFAULT_EPS_ZERO 1e-28
151 #ifndef DEFAULT_EPS_FACTOR
152 #define DEFAULT_EPS_FACTOR 1e-30
155 #ifndef DEFAULT_EPS_UPDATE
156 #define DEFAULT_EPS_UPDATE 1e-26
158 #ifndef DEFAULT_EPS_PIVOT
159 #define DEFAULT_EPS_PIVOT 1e-20
162 #define DEFAULT_INFINITY 1e100
173 #define REAL_FORMAT "f"
176 #ifndef DEFAULT_BND_VIOL
177 #define DEFAULT_BND_VIOL 1e-1
180 #ifndef DEFAULT_EPS_ZERO
181 #define DEFAULT_EPS_ZERO 1e-7
183 #ifndef DEFAULT_EPS_FACTOR
184 #define DEFAULT_EPS_FACTOR 1e-7
186 #ifndef DEFAULT_EPS_UPDATE
187 #define DEFAULT_EPS_UPDATE 1e-6
189 #ifndef DEFAULT_EPS_PIVOT
190 #define DEFAULT_EPS_PIVOT 1e-6
192 #define DEFAULT_INFINITY 1e100
201 #define REAL_FORMAT "lf"
204 #ifndef DEFAULT_BND_VIOL
205 #define DEFAULT_BND_VIOL 1e-6
208 #ifndef DEFAULT_EPS_ZERO
209 #define DEFAULT_EPS_ZERO 1e-16
211 #ifndef DEFAULT_EPS_FACTOR
212 #define DEFAULT_EPS_FACTOR 1e-20
214 #ifndef DEFAULT_EPS_UPDATE
215 #define DEFAULT_EPS_UPDATE 1e-16
217 #ifndef DEFAULT_EPS_PIVOT
218 #define DEFAULT_EPS_PIVOT 1e-10
220 #define DEFAULT_INFINITY 1e100
226 #endif // !WITH_FLOAT
227 #endif // !WITH_LONG_DOUBLE
284 #ifdef WITH_LONG_DOUBLE
298 #ifndef SOPLEX_LEGACY
301 return nextafterl(x,y);
308 return ldexpl(x,exp);
314 return frexpl(y, exp);
330 #ifndef SOPLEX_LEGACY
333 return nextafter(x,y);
346 return frexp(y, exp);
356 return absa > absb ? absa : absb;
362 return (a - b) / ( maxAbs(a, b) > 1.0 ? maxAbs(a, b) : 1.0);
368 return spxAbs(a - b) <= eps;
374 return spxAbs(a - b) > eps;
380 return (a - b) < -eps;
386 return (a - b) < eps;
392 return (a - b) > eps;
398 return (a - b) > -eps;
450 #endif // _SPXDEFINES_H_
|