Scippy

SCIP

Solving Constraint Integer Programs

tclique_def.h
Go to the documentation of this file.
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2 /* */
3 /* This file is part of the program */
4 /* TCLIQUE --- Algorithm for Maximum Cliques */
5 /* */
6 /* Copyright (C) 1996-2014 Konrad-Zuse-Zentrum */
7 /* fuer Informationstechnik Berlin */
8 /* */
9 /* TCLIQUE is distributed under the terms of the ZIB Academic License. */
10 /* */
11 /* You should have received a copy of the ZIB Academic License */
12 /* along with TCLIQUE; see the file COPYING. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file tclique_def.h
17  * @brief tclique defines
18  * @author Tobias Achterberg
19  */
20 
21 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
22 
23 #ifndef __TCLIQUE_DEF_H__
24 #define __TCLIQUE_DEF_H__
25 
26 #ifdef WITH_SCIPDEF
27 #include "scip/def.h"
28 #endif
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
34 #ifndef ALLOC_ABORT
35 #define ALLOC_ABORT(x) do \
36  { \
37  if( NULL == (x) ) \
38  { \
39  printf("[%s:%d] No memory in function call\n", __FILE__, __LINE__); \
40  abort(); \
41  } \
42  } \
43  while( FALSE )
44 #endif
45 
46 #ifndef ALLOC_FALSE
47 #define ALLOC_FALSE(x) do \
48  { \
49  if( NULL == (x) ) \
50  { \
51  printf("[%s:%d] No memory in function call\n", __FILE__, __LINE__); \
52  return FALSE; \
53  } \
54  } \
55  while( FALSE )
56 #endif
57 
58 #ifndef debug
59 #ifdef TCLIQUE_DEBUG
60 #define debug(x) x
61 #define debugMessage printf("[%s:%d] debug: ", __FILE__, __LINE__); printf
62 #define debugPrintf printf
63 #else
64 #define debug(x) /**/
65 #define debugMessage while( FALSE ) printf
66 #define debugPrintf while( FALSE ) printf
67 #endif
68 #endif
69 
70 #ifndef infoMessage
71 #define infoMessage printf
72 #endif
73 
74 #ifndef MAX
75 #define MAX(x,y) ((x) >= (y) ? (x) : (y))
76 #endif
77 
78 #ifdef __cplusplus
79 }
80 #endif
81 
82 #endif
common defines and data types used in all packages of SCIP