Scippy

SCIP

Solving Constraint Integer Programs

pub_implics.h
Go to the documentation of this file.
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2 /* */
3 /* This file is part of the program and library */
4 /* SCIP --- Solving Constraint Integer Programs */
5 /* */
6 /* Copyright (C) 2002-2014 Konrad-Zuse-Zentrum */
7 /* fuer Informationstechnik Berlin */
8 /* */
9 /* SCIP 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 SCIP; see the file COPYING. If not email to scip@zib.de. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file pub_implics.h
17  * @ingroup PUBLICMETHODS
18  * @brief public methods for implications, variable bounds, and cliques
19  * @author Tobias Achterberg
20  */
21 
22 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
23 
24 #ifndef __SCIP_PUB_IMPLICS_H__
25 #define __SCIP_PUB_IMPLICS_H__
26 
27 
28 #include "scip/def.h"
29 #include "scip/type_var.h"
30 #include "scip/type_implics.h"
31 
32 #ifdef NDEBUG
33 #include "scip/struct_implics.h"
34 #endif
35 
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39 
40 /*
41  * methods for cliques
42  */
43 
44 /** returns the position of the given variable/value pair in the clique; returns -1 if variable/value pair is not member
45  * of the clique
46  */
47 extern
49  SCIP_CLIQUE* clique, /**< clique data structure */
50  SCIP_VAR* var, /**< variable to search for */
51  SCIP_Bool value /**< value of the variable in the clique */
52  );
53 
54 /** returns whether the given variable/value pair is member of the given clique */
55 extern
57  SCIP_CLIQUE* clique, /**< clique data structure */
58  SCIP_VAR* var, /**< variable to remove from the clique */
59  SCIP_Bool value /**< value of the variable in the clique */
60  );
61 
62 /** gets number of variables in the cliques */
63 extern
65  SCIP_CLIQUE* clique /**< clique data structure */
66  );
67 
68 /** gets array of active problem variables in the cliques */
69 extern
71  SCIP_CLIQUE* clique /**< clique data structure */
72  );
73 
74 /** gets array of values of active problem variables in the cliques, i.e. whether the variable is fixed to FALSE or
75  * to TRUE in the clique
76  */
77 extern
79  SCIP_CLIQUE* clique /**< clique data structure */
80  );
81 
82 /** gets unique identifier of the clique */
83 extern
84 int SCIPcliqueGetId(
85  SCIP_CLIQUE* clique /**< clique data structure */
86  );
87 
88 #ifdef NDEBUG
89 
90 /* In optimized mode, the function calls are overwritten by defines to reduce the number of function calls and
91  * speed up the algorithms.
92  */
93 
94 #define SCIPcliqueGetNVars(clique) ((clique)->nvars)
95 #define SCIPcliqueGetVars(clique) ((clique)->vars)
96 #define SCIPcliqueGetValues(clique) ((clique)->values)
97 #define SCIPcliqueGetId(clique) ((clique)->id)
98 
99 #endif
100 
101 #ifdef __cplusplus
102 }
103 #endif
104 
105 #endif
type definitions for implications, variable bounds, and cliques
int SCIPcliqueGetId(SCIP_CLIQUE *clique)
SCIP_VAR ** SCIPcliqueGetVars(SCIP_CLIQUE *clique)
struct SCIP_Clique SCIP_CLIQUE
Definition: type_implics.h:32
int SCIPcliqueGetNVars(SCIP_CLIQUE *clique)
SCIP_Bool SCIPcliqueHasVar(SCIP_CLIQUE *clique, SCIP_VAR *var, SCIP_Bool value)
type definitions for problem variables
#define SCIP_Bool
Definition: def.h:49
struct SCIP_Var SCIP_VAR
Definition: type_var.h:95
int SCIPcliqueSearchVar(SCIP_CLIQUE *clique, SCIP_VAR *var, SCIP_Bool value)
common defines and data types used in all packages of SCIP
SCIP_Bool * SCIPcliqueGetValues(SCIP_CLIQUE *clique)