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   compute_symmetry.h
26   	 * @brief  interface for symmetry computations
27   	 * @author Marc Pfetsch
28   	 */
29   	
30   	/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
31   	
32   	#ifndef __SCIP_COMPUTE_SYMMETRY_H_
33   	#define __SCIP_COMPUTE_SYMMETRY_H_
34   	
35   	#include "scip/scip.h"
36   	
37   	#ifdef __cplusplus
38   	extern "C" {
39   	#endif
40   	
41   	#include "symmetry/struct_symmetry.h"
42   	#include "symmetry/type_symmetry.h"
43   	
44   	/** return whether symmetry can be computed */
45   	SCIP_EXPORT
46   	SCIP_Bool SYMcanComputeSymmetry(void);
47   	
48   	/** return name of external program used to compute generators */
49   	SCIP_EXPORT
50   	const char* SYMsymmetryGetName(void);
51   	
52   	/** return description of external program used to compute generators */
53   	SCIP_EXPORT
54   	const char* SYMsymmetryGetDesc(void);
55   	
56   	/** return name of additional external program used for computing symmetries */
57   	SCIP_EXPORT
58   	const char* SYMsymmetryGetAddName(void);
59   	
60   	/** return description of additional external program used to compute symmetries */
61   	SCIP_EXPORT
62   	const char* SYMsymmetryGetAddDesc(void);
63   	
64   	/** compute generators of symmetry group */
65   	SCIP_EXPORT
66   	SCIP_RETCODE SYMcomputeSymmetryGenerators(
67   	   SCIP*                 scip,               /**< SCIP pointer */
68   	   int                   maxgenerators,      /**< maximal number of generators constructed (= 0 if unlimited) */
69   	   SYM_GRAPH*            graph,              /**< symmetry detection graph */
70   	   int*                  nperms,             /**< pointer to store number of permutations */
71   	   int*                  nmaxperms,          /**< pointer to store maximal number of permutations (needed for freeing storage) */
72   	   int***                perms,              /**< pointer to store permutation generators as (nperms x npermvars) matrix */
73   	   SCIP_Real*            log10groupsize,     /**< pointer to store log10 of size of group */
74   	   SCIP_Real*            symcodetime         /**< pointer to store the time for symmetry code */
75   	   );
76   	
77   	/** returns whether two given graphs are identical */
78   	SCIP_EXPORT
79   	SCIP_Bool SYMcheckGraphsAreIdentical(
80   	   SCIP*                 scip,               /**< SCIP pointer */
81   	   SYM_SYMTYPE           symtype,            /**< type of symmetries to be checked */
82   	   SYM_GRAPH*            G1,                 /**< first graph */
83   	   SYM_GRAPH*            G2                  /**< second graph */
84   	   );
85   	
86   	#ifdef __cplusplus
87   	}
88   	#endif
89   	
90   	#endif
91