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 1996-2022 Zuse Institute Berlin */
7 /* */
8 /* Licensed under the Apache License, Version 2.0 (the "License"); */
9 /* you may not use this file except in compliance with the License. */
10 /* You may obtain a copy of the License at */
11 /* */
12 /* http://www.apache.org/licenses/LICENSE-2.0 */
13 /* */
14 /* Unless required by applicable law or agreed to in writing, software */
15 /* distributed under the License is distributed on an "AS IS" BASIS, */
16 /* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
17 /* See the License for the specific language governing permissions and */
18 /* limitations under the License. */
19 /* */
20 /* You should have received a copy of the Apache-2.0 license */
21 /* along with TCLIQUE; see the file LICENSE. */
22 /* */
23 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
24 
25 /**@file tclique_def.h
26  * @brief tclique defines
27  * @author Tobias Achterberg
28  */
29 
30 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
31 
32 #ifndef __TCLIQUE_DEF_H__
33 #define __TCLIQUE_DEF_H__
34 
35 /*
36  * include build configuration flags
37  */
38 #ifndef NO_CONFIG_HEADER
39 #include "scip/config.h"
40 #include "scip/scip_export.h"
41 #endif
42 
43 #ifdef WITH_SCIPDEF
44 #include "scip/def.h"
45 #endif
46 
47 #ifdef __cplusplus
48 extern "C" {
49 #endif
50 
51 #ifndef ALLOC_ABORT
52 #define ALLOC_ABORT(x) do \
53  { \
54  if( NULL == (x) ) \
55  { \
56  printf("[%s:%d] No memory in function call\n", __FILE__, __LINE__); \
57  abort(); \
58  } \
59  } \
60  while( FALSE )
61 #endif
62 
63 #ifndef ALLOC_FALSE
64 #define ALLOC_FALSE(x) do \
65  { \
66  if( NULL == (x) ) \
67  { \
68  printf("[%s:%d] No memory in function call\n", __FILE__, __LINE__); \
69  return FALSE; \
70  } \
71  } \
72  while( FALSE )
73 #endif
74 
75 #ifndef debug
76 #ifdef TCLIQUE_DEBUG
77 #define debug(x) x
78 #define debugMessage printf("[%s:%d] debug: ", __FILE__, __LINE__); printf
79 #define debugPrintf printf
80 #else
81 #define debug(x) /**/
82 #define debugMessage while( FALSE ) printf
83 #define debugPrintf while( FALSE ) printf
84 #endif
85 #endif
86 
87 #ifndef infoMessage
88 #define infoMessage printf
89 #endif
90 
91 #ifndef MAX
92 #define MAX(x,y) ((x) >= (y) ? (x) : (y))
93 #endif
94 
95 #ifdef __cplusplus
96 }
97 #endif
98 
99 #endif
common defines and data types used in all packages of SCIP