Scippy

SCIP

Solving Constraint Integer Programs

mst.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 scip.zib.de. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file mst.h
17  *
18  *
19  * @brief minimum spanning tree based algorithms for Steiner problems
20  * @author Daniel Rehfeldt
21  *
22  * This file encompasses various minimum spanning tree based algorithms.
23  * Note: This file is supposed to (partly) replace graph_path.c in the long run, as it includes the faster implementations.
24  *
25  */
26 #ifndef APPLICATIONS_STP_SRC_MST_H_
27 #define APPLICATIONS_STP_SRC_MST_H_
28 
29 #include "graph.h"
30 #include "completegraph.h"
31 
32 
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36 
37 
38 
39 /** information for (sparse) MST computations */
40 typedef
42 {
43  const CSR* csr; /**< CSR */
44  DHEAP* dheap; /**< Dijkstra heap */
45  SCIP_Real* RESTRICT nodes_dist; /**< distance array (on vertices) */
46  int* RESTRICT nodes_predEdge; /**< predecessor edge array (on vertices);
47  NOTE: with respect to original graph edge IDs
48  NOTE: might contain uninitialized values in opt mode! */
49 } MST;
50 
51 
52 extern SCIP_RETCODE mst_init(SCIP*, const GRAPH*, MST**);
53 extern void mst_free(SCIP*, MST**);
54 extern void mst_computeOnMarked(const GRAPH*, const STP_Bool*, int, MST*);
55 extern SCIP_Real mst_getObj(const GRAPH*, const MST*);
56 extern void mst_getSoledges(const GRAPH*, const MST*, int* RESTRICT);
57 
58 
59 #ifdef __cplusplus
60 }
61 #endif
62 
63 
64 
65 #endif /* APPLICATIONS_STP_SRC_MST_H_ */
includes complete graph methods, in particular for MST calculation
SCIP_Real *RESTRICT nodes_dist
Definition: mst.h:45
SCIP_RETCODE mst_init(SCIP *, const GRAPH *, MST **)
Definition: mst.c:118
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:54
includes various files containing graph methods used for Steiner tree problems
int *RESTRICT nodes_predEdge
Definition: mst.h:46
SCIP_Real mst_getObj(const GRAPH *, const MST *)
Definition: mst.c:168
void mst_free(SCIP *, MST **)
Definition: mst.c:145
struct minimum_spanning_tree MST
unsigned char STP_Bool
Definition: portab.h:34
const CSR * csr
Definition: mst.h:43
void mst_computeOnMarked(const GRAPH *, const STP_Bool *, int, MST *)
Definition: mst.c:223
void mst_getSoledges(const GRAPH *, const MST *, int *RESTRICT)
DHEAP * dheap
Definition: mst.h:44
#define SCIP_Real
Definition: def.h:177