Scippy

SCIP

Solving Constraint Integer Programs

scip_compr.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-2022 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 visit scipopt.org. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file scip_compr.h
17  * @ingroup PUBLICCOREAPI
18  * @brief public methods for compression plugins
19  * @author Tobias Achterberg
20  * @author Timo Berthold
21  * @author Thorsten Koch
22  * @author Alexander Martin
23  * @author Marc Pfetsch
24  * @author Kati Wolter
25  * @author Gregor Hendel
26  * @author Leona Gottwald
27  */
28 
29 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
30 
31 #ifndef __SCIP_SCIP_COMPR_H__
32 #define __SCIP_SCIP_COMPR_H__
33 
34 
35 #include "scip/def.h"
36 #include "scip/type_compr.h"
37 #include "scip/type_result.h"
38 #include "scip/type_retcode.h"
39 #include "scip/type_scip.h"
40 
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
44 
45 /**@addtogroup PublicCompressionMethods
46  *
47  * @{
48  */
49 /** creates a tree compression and includes it in SCIP.
50  *
51  * @note method has all compression callbacks as arguments and is thus changed every time a new
52  * callback is added in future releases; consider using SCIPincludeComprBasic() and setter functions
53  * if you seek for a method which is less likely to change in future releases
54  */
55 SCIP_EXPORT
57  SCIP* scip, /**< SCIP data structure */
58  const char* name, /**< name of tree compression */
59  const char* desc, /**< description of tree compression */
60  int priority, /**< priority of the tree compression */
61  int minnnodes, /**< minimal number of nodes to call compression */
62  SCIP_DECL_COMPRCOPY ((*comprcopy)), /**< copy method of tree compression or NULL if you don't want to copy your plugin into sub-SCIPs */
63  SCIP_DECL_COMPRFREE ((*comprfree)), /**< destructor of tree compression */
64  SCIP_DECL_COMPRINIT ((*comprinit)), /**< initialize tree compression */
65  SCIP_DECL_COMPREXIT ((*comprexit)), /**< deinitialize tree compression */
66  SCIP_DECL_COMPRINITSOL ((*comprinitsol)), /**< solving process initialization method of tree compression */
67  SCIP_DECL_COMPREXITSOL ((*comprexitsol)), /**< solving process deinitialization method of tree compression */
68  SCIP_DECL_COMPREXEC ((*comprexec)), /**< execution method of tree compression */
69  SCIP_COMPRDATA* comprdata /**< tree compression data */
70  );
71 
72 /** creates a tree compression and includes it in SCIP with its most fundamental callbacks.
73  * All non-fundamental (or optional) callbacks
74  * as, e. g., init and exit callbacks, will be set to NULL.
75  * Optional callbacks can be set via specific setter functions, see SCIPsetComprCopy(), SCIPsetComprFree(),
76  * SCIPsetComprInit(), SCIPsetComprExit(), SCIPsetComprInitsol(), and SCIPsetComprExitsol()
77  *
78  * @note if you want to set all callbacks with a single method call, consider using SCIPincludeCompr() instead
79  */
80 SCIP_EXPORT
82  SCIP* scip, /**< SCIP data structure */
83  SCIP_COMPR** compr, /**< pointer to tree compression */
84  const char* name, /**< name of tree compression */
85  const char* desc, /**< description of tree compression */
86  int priority, /**< priority of the tree compression */
87  int minnnodes, /**< minimal number of nodes to call the compression */
88  SCIP_DECL_COMPREXEC ((*comprexec)), /**< execution method of tree compression */
89  SCIP_COMPRDATA* comprdata /**< tree compression data */
90  );
91 
92 /** sets copy method of tree compression */
93 SCIP_EXPORT
95  SCIP* scip, /**< SCIP data structure */
96  SCIP_COMPR* compr, /**< tree compression */
97  SCIP_DECL_COMPRCOPY ((*comprcopy)) /**< copy method of tree compression or NULL if you don't want to copy your plugin into sub-SCIPs */
98  );
99 
100 /** sets destructor method of tree compression */
101 SCIP_EXPORT
103  SCIP* scip, /**< SCIP data structure */
104  SCIP_COMPR* compr, /**< tree compression */
105  SCIP_DECL_COMPRFREE ((*comprfree)) /**< destructor of tree compression */
106  );
107 
108 /** sets initialization method of tree compression */
109 SCIP_EXPORT
111  SCIP* scip, /**< SCIP data structure */
112  SCIP_COMPR* compr, /**< tree compression */
113  SCIP_DECL_COMPRINIT ((*comprinit)) /**< initialize tree compression */
114  );
115 
116 /** sets deinitialization method of tree compression */
117 SCIP_EXPORT
119  SCIP* scip, /**< SCIP data structure */
120  SCIP_COMPR* compr, /**< tree compression */
121  SCIP_DECL_COMPREXIT ((*comprexit)) /**< deinitialize tree compression */
122  );
123 
124 /** sets solving process initialization method of tree compression */
125 SCIP_EXPORT
127  SCIP* scip, /**< SCIP data structure */
128  SCIP_COMPR* compr, /**< tree compression */
129  SCIP_DECL_COMPRINITSOL ((*comprinitsol)) /**< solving process initialization method of tree compression */
130  );
131 
132 /** sets solving process deinitialization method of tree compression */
133 SCIP_EXPORT
135  SCIP* scip, /**< SCIP data structure */
136  SCIP_COMPR* compr, /**< tree compression */
137  SCIP_DECL_COMPREXITSOL ((*comprexitsol)) /**< solving process deinitialization method of tree compression */
138  );
139 
140 /** returns the tree compression of the given name, or NULL if not existing */
141 SCIP_EXPORT
143  SCIP* scip, /**< SCIP data structure */
144  const char* name /**< name of tree compression */
145  );
146 
147 /** returns the array of currently available tree compression */
148 SCIP_EXPORT
150  SCIP* scip /**< SCIP data structure */
151  );
152 
153 /** returns the number of currently available tree compression */
154 SCIP_EXPORT
155 int SCIPgetNCompr(
156  SCIP* scip /**< SCIP data structure */
157  );
158 
159 /** set the priority of a tree compression method */
161  SCIP* scip, /**< SCIP data structure */
162  SCIP_COMPR* compr, /**< compression */
163  int priority /**< new priority of the tree compression */
164  );
165 
166 /** @} */
167 
168 #ifdef __cplusplus
169 }
170 #endif
171 
172 #endif
SCIP_RETCODE SCIPsetComprFree(SCIP *scip, SCIP_COMPR *compr, SCIP_DECL_COMPRFREE((*comprfree)))
Definition: scip_compr.c:148
#define SCIP_DECL_COMPREXEC(x)
Definition: type_compr.h:111
SCIP_RETCODE SCIPsetComprInit(SCIP *scip, SCIP_COMPR *compr, SCIP_DECL_COMPRINIT((*comprinit)))
Definition: scip_compr.c:164
#define SCIP_DECL_COMPREXITSOL(x)
Definition: type_compr.h:95
SCIP_RETCODE SCIPincludeCompr(SCIP *scip, const char *name, const char *desc, int priority, int minnnodes, SCIP_DECL_COMPRCOPY((*comprcopy)), SCIP_DECL_COMPRFREE((*comprfree)), SCIP_DECL_COMPRINIT((*comprinit)), SCIP_DECL_COMPREXIT((*comprexit)), SCIP_DECL_COMPRINITSOL((*comprinitsol)), SCIP_DECL_COMPREXITSOL((*comprexitsol)), SCIP_DECL_COMPREXEC((*comprexec)), SCIP_COMPRDATA *comprdata)
Definition: scip_compr.c:51
SCIP_COMPR * SCIPfindCompr(SCIP *scip, const char *name)
Definition: scip_compr.c:228
SCIP_RETCODE SCIPincludeComprBasic(SCIP *scip, SCIP_COMPR **compr, const char *name, const char *desc, int priority, int minnnodes, SCIP_DECL_COMPREXEC((*comprexec)), SCIP_COMPRDATA *comprdata)
Definition: scip_compr.c:94
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:54
SCIP_RETCODE SCIPsetComprInitsol(SCIP *scip, SCIP_COMPR *compr, SCIP_DECL_COMPRINITSOL((*comprinitsol)))
Definition: scip_compr.c:196
type definitions for return codes for SCIP methods
#define SCIP_DECL_COMPRINIT(x)
Definition: type_compr.h:65
#define SCIP_DECL_COMPRFREE(x)
Definition: type_compr.h:57
SCIP_RETCODE SCIPsetComprCopy(SCIP *scip, SCIP_COMPR *compr, SCIP_DECL_COMPRCOPY((*comprcopy)))
Definition: scip_compr.c:132
#define SCIP_DECL_COMPRCOPY(x)
Definition: type_compr.h:49
type definitions for SCIP&#39;s main datastructure
struct SCIP_ComprData SCIP_COMPRDATA
Definition: type_compr.h:40
#define SCIP_DECL_COMPRINITSOL(x)
Definition: type_compr.h:84
SCIP_COMPR ** SCIPgetComprs(SCIP *scip)
Definition: scip_compr.c:241
SCIP_RETCODE SCIPsetComprExitsol(SCIP *scip, SCIP_COMPR *compr, SCIP_DECL_COMPREXITSOL((*comprexitsol)))
Definition: scip_compr.c:212
#define SCIP_DECL_COMPREXIT(x)
Definition: type_compr.h:73
SCIP_RETCODE SCIPsetComprPriority(SCIP *scip, SCIP_COMPR *compr, int priority)
Definition: scip_compr.c:265
type definitions for tree compression
SCIP_RETCODE SCIPsetComprExit(SCIP *scip, SCIP_COMPR *compr, SCIP_DECL_COMPREXIT((*comprexit)))
Definition: scip_compr.c:180
result codes for SCIP callback methods
int SCIPgetNCompr(SCIP *scip)
Definition: scip_compr.c:254
common defines and data types used in all packages of SCIP