Scippy

SCIP

Solving Constraint Integer Programs

portab.h File Reference

Detailed Description

Portable defintions.

Author
Thorsten Koch

Definition in file portab.h.

#include <limits.h>
#include <math.h>
#include <float.h>

Go to the source code of this file.

Macros

#define EPSILON   1e-06
 
#define TRUE   1
 
#define FALSE   0
 
#define SUCCESS   0
 
#define FAILURE   (-1)
 
#define Max(a, b)   (((a) >= (b)) ? (a) : (b))
 
#define Min(a, b)   (((a) <= (b)) ? (a) : (b))
 
#define EPS_ZERO   (DBL_EPSILON * 1e4)
 
#define Fsgn(x)   ((((x) > -EPS_ZERO) && ((x) < EPS_ZERO)) ? 0 : (((x) < 0.0) ? -1 : 1))
 
#define EQ(a, b)   (fabs((a) - (b)) <= EPS_ZERO)
 
#define NE(a, b)   (fabs((a) - (b)) > EPS_ZERO)
 
#define LT(a, b)   (((a) - (b)) < -EPS_ZERO)
 
#define LE(a, b)   (((a) - (b)) < EPS_ZERO)
 
#define GT(a, b)   (((a) - (b)) > EPS_ZERO)
 
#define GE(a, b)   (((a) - (b)) > -EPS_ZERO)
 
#define does_not_return
 
#define inline
 
#define DIRSEP   "/"
 

Macro Definition Documentation

◆ EPSILON

#define EPSILON   1e-06

Definition at line 31 of file portab.h.

◆ TRUE

#define TRUE   1

Definition at line 34 of file portab.h.

◆ FALSE

#define FALSE   0

Definition at line 37 of file portab.h.

◆ SUCCESS

#define SUCCESS   0

◆ FAILURE

#define FAILURE   (-1)

Definition at line 44 of file portab.h.

Referenced by get_arguments(), graph_load(), open_file(), and start_section().

◆ Max

#define Max (   a,
  b 
)    (((a) >= (b)) ? (a) : (b))

Definition at line 48 of file portab.h.

◆ Min

#define Min (   a,
  b 
)    (((a) <= (b)) ? (a) : (b))

Definition at line 51 of file portab.h.

Referenced by graph_mincut_exec().

◆ EPS_ZERO

#define EPS_ZERO   (DBL_EPSILON * 1e4)

Definition at line 54 of file portab.h.

◆ Fsgn

#define Fsgn (   x)    ((((x) > -EPS_ZERO) && ((x) < EPS_ZERO)) ? 0 : (((x) < 0.0) ? -1 : 1))

Definition at line 57 of file portab.h.

◆ EQ

#define EQ (   a,
  b 
)    (fabs((a) - (b)) <= EPS_ZERO)

Definition at line 62 of file portab.h.

Referenced by reduce_simple(), SCIP_DECL_SORTPTRCOMP(), and SCIPStpValidateSol().

◆ NE

#define NE (   a,
  b 
)    (fabs((a) - (b)) > EPS_ZERO)

Definition at line 63 of file portab.h.

◆ LT

#define LT (   a,
  b 
)    (((a) - (b)) < -EPS_ZERO)

Definition at line 64 of file portab.h.

Referenced by getlecloseterms(), nearest(), nearestX(), and SCIP_DECL_SORTPTRCOMP().

◆ LE

#define LE (   a,
  b 
)    (((a) - (b)) < EPS_ZERO)

Definition at line 65 of file portab.h.

Referenced by getlecloseterms().

◆ GT

#define GT (   a,
  b 
)    (((a) - (b)) > EPS_ZERO)

Definition at line 66 of file portab.h.

Referenced by getlecloseterms(), graph_voronoiExtend(), heap_add(), nearest(), and nearestX().

◆ GE

#define GE (   a,
  b 
)    (((a) - (b)) > -EPS_ZERO)

Definition at line 67 of file portab.h.

◆ does_not_return

#define does_not_return

Definition at line 72 of file portab.h.

◆ inline

#define inline

Definition at line 73 of file portab.h.

◆ DIRSEP

#define DIRSEP   "/"

Definition at line 79 of file portab.h.

Referenced by graph_load().