1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2 /*                                                                           */
3 /*                  This file is part of the program and library             */
4 /*         SCIP --- Solving Constraint Integer Programs                      */
5 /*                                                                           */
6 /*    Copyright (C) 2002-2021 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   struct_compr.h
17  * @ingroup INTERNALAPI
18  * @brief  datastructures for tree compression techniques
19  * @author Jakob Witzig
20  */
21 
22 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
23 
24 #ifndef __SCIP_STRUCT_COMPR_H__
25 #define __SCIP_STRUCT_COMPR_H__
26 
27 
28 #include "scip/def.h"
29 #include "scip/type_clock.h"
30 #include "scip/type_compr.h"
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
36 /** tree compression data */
37 struct SCIP_Compr
38 {
39    SCIP_Longint          ncalls;             /**< number of times, this compression was called */
40    SCIP_Longint          nfound;              /**< number of compressions found so far by this method */
41    SCIP_Real             rate;               /**< rate of the last compression */
42    SCIP_Real             loi;                /**< loss of information of the last compression */
43    char*                 name;               /**< name of tree compression */
44    char*                 desc;               /**< description of tree compression */
45    SCIP_DECL_COMPRCOPY   ((*comprcopy));     /**< copy method of tree compression or NULL if you don't want to copy your plugin into sub-SCIPs */
46    SCIP_DECL_COMPRFREE   ((*comprfree));     /**< destructor of tree compression */
47    SCIP_DECL_COMPRINIT   ((*comprinit));     /**< initialize tree compression */
48    SCIP_DECL_COMPREXIT   ((*comprexit));     /**< deinitialize tree compression */
49    SCIP_DECL_COMPRINITSOL ((*comprinitsol)); /**< solving process initialization method of tree compression */
50    SCIP_DECL_COMPREXITSOL ((*comprexitsol)); /**< solving process deinitialization method of tree compression */
51    SCIP_DECL_COMPREXEC   ((*comprexec));     /**< execution method of tree compression */
52    SCIP_COMPRDATA*       comprdata;          /**< tree compression local data */
53    SCIP_CLOCK*           setuptime;          /**< time spend for setting up this compression for the next stages */
54    SCIP_CLOCK*           comprclock;         /**< compression execution time */
55    int                   priority;           /**< priority of the tree compression */
56    int                   minnnodes;          /**< minimal number of nodes for calling compression, -1 if no threshold exists */
57    int                   nnodes;             /**< number of nodes of the last compression */
58    SCIP_Bool             initialized;        /**< is tree compression initialized? */
59 };
60 
61 #ifdef __cplusplus
62 }
63 #endif
64 
65 #endif
66