1    	/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2    	/*                                                                           */
3    	/*                  This file is part of the program and library             */
4    	/*         SCIP --- Solving Constraint Integer Programs                      */
5    	/*                                                                           */
6    	/*  Copyright (c) 2002-2023 Zuse Institute Berlin (ZIB)                      */
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 SCIP; see the file LICENSE. If not visit scipopt.org.         */
22   	/*                                                                           */
23   	/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
24   	
25   	/**@file   dcmp.h
26   	 * @ingroup INTERNALAPI
27   	 * @brief  internal methods for decompositions and the decomposition store
28   	 * @author Gregor Hendel
29   	 *
30   	 * @todo get a decomposition score, and compute other stuff that may be important
31   	 */
32   	
33   	/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
34   	
35   	#ifndef SRC_SCIP_DECOMP_H_
36   	#define SRC_SCIP_DECOMP_H_
37   	
38   	#include "scip/type_dcmp.h"
39   	#include "scip/type_var.h"
40   	#include "scip/type_cons.h"
41   	#include "blockmemshell/memory.h"
42   	
43   	
44   	#ifdef __cplusplus
45   	extern "C" {
46   	#endif
47   	
48   	#define SCIP_DECOMPSTORE_CAPA 10             /**< hardcoded maximum capacity of decomposition store */
49   	
50   	/** creates a decomposition storage */
51   	SCIP_RETCODE SCIPdecompstoreCreate(
52   	   SCIP_DECOMPSTORE**    decompstore,        /**< pointer to store decomposition storage */
53   	   BMS_BLKMEM*           blkmem,             /**< block memory data structure */
54   	   int                   nslots              /**< maximum number of decomposition slots in storage */
55   	   );
56   	
57   	/** frees a decomposition storage */
58   	void SCIPdecompstoreFree(
59   	   SCIP_DECOMPSTORE**    decompstore,        /**< pointer to free decomposition storage */
60   	   BMS_BLKMEM*           blkmem              /**< block memory data structure */
61   	   );
62   	
63   	/** adds decomposition to storage */
64   	SCIP_RETCODE SCIPdecompstoreAdd(
65   	   SCIP_DECOMPSTORE*     decompstore,        /**< decomposition storage */
66   	   SCIP_DECOMP*          decomp              /**< decomposition to add */
67   	   );
68   	
69   	/** transforms all available original decompositions into transformed space */
70   	SCIP_RETCODE SCIPtransformDecompstore(
71   	   SCIP*                 scip                /**< SCIP data structure */
72   	   );
73   	
74   	/** frees all decompositions in transformed space */
75   	void SCIPexitSolveDecompstore(
76   	   SCIP*                 scip                /**< SCIP data structure */
77   	   );
78   	
79   	/** gets decompositions from storage */
80   	SCIP_DECOMP** SCIPdecompstoreGetDecomps(
81   	   SCIP_DECOMPSTORE*     decompstore         /**< decomposition storage */
82   	   );
83   	
84   	/** gets number of decompositions in storage */
85   	int SCIPdecompstoreGetNDecomps(
86   	   SCIP_DECOMPSTORE*     decompstore         /**< decomposition storage */
87   	   );
88   	
89   	/** gets decompositions in original space from storage */
90   	SCIP_DECOMP** SCIPdecompstoreGetOrigDecomps(
91   	   SCIP_DECOMPSTORE*     decompstore         /**< decomposition storage */
92   	   );
93   	
94   	/** gets number of decompositions in original space in storage */
95   	int SCIPdecompstoreGetNOrigDecomps(
96   	   SCIP_DECOMPSTORE*     decompstore         /**< decomposition storage */
97   	   );
98   	
99   	#ifdef __cplusplus
100  	}
101  	#endif
102  	
103  	#endif
104