GCG 4.1.1 (dev)

Generic Column Generation

Loading...
Searching...
No Matches
graph_tclique.h
Go to the documentation of this file.
1/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2/* */
3/* This file is part of the program and library */
4/* GCG --- Generic Column Generation */
5/* a Dantzig-Wolfe decomposition based extension */
6/* of the branch-cut-and-price framework */
7/* SCIP --- Solving Constraint Integer Programs */
8/* */
9/* Copyright (C) 2010-2026 Operations Research, RWTH Aachen University */
10/* Zuse Institute Berlin (ZIB) */
11/* */
12/* Licensed under the Apache License, Version 2.0 (the "License"); */
13/* you may not use this file except in compliance with the License. */
14/* You may obtain a copy of the License at */
15/* */
16/* http://www.apache.org/licenses/LICENSE-2.0 */
17/* */
18/* Unless required by applicable law or agreed to in writing, software */
19/* distributed under the License is distributed on an "AS IS" BASIS, */
20/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
21/* See the License for the specific language governing permissions and */
22/* limitations under the License. */
23/* */
24/* You should have received a copy of the Apache-2.0 license */
25/* along with GCG; see the file LICENSE. If not visit gcg.or.rwth-aachen.de.*/
26/* */
27/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
28
29/**@file graph_tclique.h
30 * @brief interface to the SCIP tclique graph library
31 * @author Annika Thome
32 * @author Martin Bergner
33 */
34
35/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
36
37#ifndef GCG_GRAPH_TCLIQUE_H_
38#define GCG_GRAPH_TCLIQUE_H_
39
40#include "graph/bridge.h"
41#include "tclique/tclique.h"
42
43namespace gcg {
44
46{
47private:
48 TCLIQUE_GRAPH* graph;
49
50public:
51
53
54 virtual ~GraphTclique();
55 virtual SCIP_RETCODE addNNodes(int _n_nodes);
56 virtual SCIP_RETCODE addNNodes(int _n_nodes, std::vector<int> weights);
57 virtual int getNNodes();
58 virtual int getNEdges();
59 virtual SCIP_RETCODE getEdges(std::vector<void*>& edges);
60 virtual SCIP_Bool isEdge(int i, int j);
61 virtual int getNNeighbors(int i);
62 virtual std::vector<int> getNeighbors(int i);
63 virtual SCIP_RETCODE addNode(int i, int weight);
64 virtual SCIP_RETCODE addNode();
65 virtual SCIP_RETCODE deleteNode(int i);
66 virtual SCIP_RETCODE addEdge(int i, int j);
67 virtual SCIP_RETCODE addEdge(int i, int j, double weight);
68 virtual SCIP_RETCODE setEdge(int i, int j, double weight);
69 virtual double getEdgeWeight(int i, int j);
70 virtual std::vector<std::pair<int, double> > getNeighborWeights(int i);
71 virtual SCIP_RETCODE deleteEdge(int i, int j);
72 virtual int graphGetWeights(int i);
73
74 virtual SCIP_RETCODE flush();
75 virtual SCIP_RETCODE normalize();
76 virtual double getEdgeWeightPercentile(double q);
77
78#ifdef WITH_GSL
79 void expand(int factor) {return;}
80 void inflate(double factor) {return;}
81 void colL1Norm() {return;}
82 void prune() {return;}
83 bool stopMCL(int iter) {return true;}
84 std::vector<int> getClustersMCL() {return std::vector<int>();}
85 virtual void initMCL() {return;}
86 virtual void clearMCL() {return;}
87#endif
88};
89
90} /* namespace gcg */
91#endif /* GCG_GRAPH_TCLIQUE_H_ */
bridge
virtual SCIP_RETCODE addEdge(int i, int j)
virtual SCIP_RETCODE addNNodes(int _n_nodes)
virtual std::vector< int > getNeighbors(int i)
virtual std::vector< std::pair< int, double > > getNeighborWeights(int i)
virtual SCIP_RETCODE flush()
virtual SCIP_RETCODE addNode(int i, int weight)
virtual int getNEdges()
virtual SCIP_RETCODE deleteEdge(int i, int j)
virtual int getNNeighbors(int i)
virtual int graphGetWeights(int i)
virtual SCIP_RETCODE setEdge(int i, int j, double weight)
virtual SCIP_RETCODE normalize()
virtual SCIP_RETCODE getEdges(std::vector< void * > &edges)
virtual SCIP_RETCODE deleteNode(int i)
virtual double getEdgeWeightPercentile(double q)
virtual double getEdgeWeight(int i, int j)
virtual int getNNodes()
virtual SCIP_Bool isEdge(int i, int j)
#define SCIP_Bool
int j
int i
struct TCLIQUE_Graph TCLIQUE_GRAPH
enum SCIP_Retcode SCIP_RETCODE