graph_tclique.h
Go to the documentation of this file.
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2 /* */
3 /* This file is part of the program */
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-2018 Operations Research, RWTH Aachen University */
10 /* Zuse Institute Berlin (ZIB) */
11 /* */
12 /* This program is free software; you can redistribute it and/or */
13 /* modify it under the terms of the GNU Lesser General Public License */
14 /* as published by the Free Software Foundation; either version 3 */
15 /* of the License, or (at your option) any later version. */
16 /* */
17 /* This program is distributed in the hope that it will be useful, */
18 /* but WITHOUT ANY WARRANTY; without even the implied warranty of */
19 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
20 /* GNU Lesser General Public License for more details. */
21 /* */
22 /* You should have received a copy of the GNU Lesser General Public License */
23 /* along with this program; if not, write to the Free Software */
24 /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.*/
25 /* */
26 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
27 
34 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
35 
36 #ifndef GCG_GRAPH_TCLIQUE_H_
37 #define GCG_GRAPH_TCLIQUE_H_
38 
39 #include "bridge.h"
40 #include "tclique/tclique.h"
41 
42 namespace gcg {
43 
45 {
46 private:
47  TCLIQUE_GRAPH* graph;
48 
49 public:
50 
51  GraphTclique();
52 
53  virtual ~GraphTclique();
54  virtual SCIP_RETCODE addNNodes(int _n_nodes);
55  virtual SCIP_RETCODE addNNodes(int _n_nodes, std::vector<int> weights);
56  virtual int getNNodes();
57  virtual int getNEdges();
58  virtual SCIP_RETCODE getEdges(std::vector<void*>& edges);
59  virtual SCIP_Bool isEdge(int i, int j);
60  virtual int getNNeighbors(int i);
61  virtual std::vector<int> getNeighbors(int i);
62  virtual SCIP_RETCODE addNode(int i, int weight);
63  virtual SCIP_RETCODE addNode();
64  virtual SCIP_RETCODE deleteNode(int i);
65  virtual SCIP_RETCODE addEdge(int i, int j);
66  virtual SCIP_RETCODE addEdge(int i, int j, double weight);
67  virtual SCIP_RETCODE setEdge(int i, int j, double weight);
68  virtual double getEdgeWeight(int i, int j);
69  virtual std::vector<std::pair<int, double> > getNeighborWeights(int i);
70  virtual SCIP_RETCODE deleteEdge(int i, int j);
71  virtual int graphGetWeights(int i);
72 
73  virtual SCIP_RETCODE flush();
74  virtual SCIP_RETCODE normalize();
75  virtual double getEdgeWeightPercentile(double q);
76 
77 #ifdef WITH_GSL
78  void expand(int factor) {return;}
79  void inflate(double factor) {return;}
80  void colL1Norm() {return;}
81  void prune() {return;}
82  bool stopMCL(int iter) {return true;}
83  std::vector<int> getClustersMCL() {return std::vector<int>();}
84  virtual void initMCL() {return;}
85  virtual void clearMCL() {return;}
86 #endif
87 };
88 
89 } /* namespace gcg */
90 #endif /* GCG_GRAPH_TCLIQUE_H_ */
virtual int getNNeighbors(int i)
virtual SCIP_RETCODE flush()
virtual SCIP_RETCODE deleteEdge(int i, int j)
virtual SCIP_RETCODE addNNodes(int _n_nodes)
virtual SCIP_RETCODE normalize()
virtual ~GraphTclique()
virtual double getEdgeWeightPercentile(double q)
virtual SCIP_RETCODE addEdge(int i, int j)
virtual SCIP_RETCODE getEdges(std::vector< void * > &edges)
virtual int getNNodes()
virtual SCIP_RETCODE setEdge(int i, int j, double weight)
virtual SCIP_RETCODE addNode()
virtual std::vector< std::pair< int, double > > getNeighborWeights(int i)
virtual std::vector< int > getNeighbors(int i)
virtual SCIP_RETCODE deleteNode(int i)
virtual int getNEdges()
virtual SCIP_Bool isEdge(int i, int j)
bridge
virtual double getEdgeWeight(int i, int j)
virtual int graphGetWeights(int i)