Detailed Description
Definition at line 57 of file graph_gcg.h.
#include <graph_gcg.h>
Public Member Functions | |
GraphGCG () | |
GraphGCG (int _n_nodes, bool _undirected) | |
virtual | ~GraphGCG () |
virtual SCIP_RETCODE | addNNodes (int _n_nodes) |
virtual SCIP_RETCODE | addNNodes (int _n_nodes, std::vector< int > weights) |
virtual int | getNNodes () |
virtual int | getNEdges () |
virtual std::vector< std::vector< double > > | getAdjMatrix () |
virtual SCIP_RETCODE | getEdges (std::vector< void * > &edges) |
virtual SCIP_Bool | isEdge (int node_i, int node_j) |
virtual int | getNNeighbors (int node) |
virtual std::vector< int > | getNeighbors (int node) |
virtual std::vector< std::pair< int, double > > | getNeighborWeights (int node) |
virtual SCIP_RETCODE | addNode (int node, int weight) |
virtual SCIP_RETCODE | addNode () |
virtual SCIP_RETCODE | deleteNode (int node) |
virtual SCIP_RETCODE | addEdge (int i, int j) |
virtual SCIP_RETCODE | addEdge (int node_i, int node_j, double weight) |
virtual SCIP_RETCODE | setEdge (int node_i, int node_j, double weight) |
virtual SCIP_RETCODE | deleteEdge (int node_i, int node_j) |
virtual int | graphGetWeights (int node) |
virtual double | getEdgeWeight (int node_i, int node_j) |
virtual int | edgeComp (const EdgeGCG *a, const EdgeGCG *b) |
virtual SCIP_RETCODE | flush () |
virtual SCIP_RETCODE | normalize () |
virtual double | getEdgeWeightPercentile (double q) |
Public Member Functions inherited from gcg::Bridge | |
Bridge () | |
virtual | ~Bridge () |
Constructor & Destructor Documentation
◆ GraphGCG() [1/2]
gcg::GraphGCG::GraphGCG | ( | ) |
Definition at line 49 of file graph_gcg.cpp.
◆ GraphGCG() [2/2]
gcg::GraphGCG::GraphGCG | ( | int | _n_nodes, |
bool | _undirected | ||
) |
Definition at line 61 of file graph_gcg.cpp.
◆ ~GraphGCG()
|
virtual |
Definition at line 76 of file graph_gcg.cpp.
Member Function Documentation
◆ addNNodes() [1/2]
|
virtual |
add n nodes in the graph at the same time. it is much faster than to call addNode() many times
Implements gcg::Bridge.
Definition at line 95 of file graph_gcg.cpp.
◆ addNNodes() [2/2]
|
virtual |
add n nodes in the graph at the same time. it is much faster than to call addNode() many times. weights represent node weights
Implements gcg::Bridge.
Definition at line 119 of file graph_gcg.cpp.
◆ getNNodes()
|
virtual |
get number of nodes in the graph
Implements gcg::Bridge.
Definition at line 127 of file graph_gcg.cpp.
◆ getNEdges()
|
virtual |
get number of edges in the graph
Implements gcg::Bridge.
Definition at line 407 of file graph_gcg.cpp.
◆ getAdjMatrix()
|
virtual |
Definition at line 399 of file graph_gcg.cpp.
◆ getEdges()
|
virtual |
get list of edges in the graph (not defined how edges are implemented)
Implements gcg::Bridge.
Definition at line 799 of file graph_gcg.cpp.
◆ isEdge()
|
virtual |
return whether a given pair of vertices is connected by an edge
Implements gcg::Bridge.
Definition at line 430 of file graph_gcg.cpp.
Referenced by gcg::PARTIALDECOMP::calcStairlinkingVars().
◆ getNNeighbors()
|
virtual |
get number of neighbors of a given node
Implements gcg::Bridge.
Definition at line 448 of file graph_gcg.cpp.
Referenced by gcg::PARTIALDECOMP::calcStairlinkingVars().
◆ getNeighbors()
|
virtual |
get a vector of all neighbors of a given node
Implements gcg::Bridge.
Definition at line 475 of file graph_gcg.cpp.
Referenced by gcg::PARTIALDECOMP::calcStairlinkingVars().
◆ getNeighborWeights()
|
virtual |
Reimplemented from gcg::Bridge.
Definition at line 506 of file graph_gcg.cpp.
◆ addNode() [1/2]
|
virtual |
int node is obsolete, it must be the next available id
Implements gcg::Bridge.
Definition at line 550 of file graph_gcg.cpp.
◆ addNode() [2/2]
|
virtual |
adds the node with 0 weight to the graph
Implements gcg::Bridge.
Definition at line 586 of file graph_gcg.cpp.
◆ deleteNode()
|
virtual |
Sets node weight to 0 and the ID to the next available.
Implements gcg::Bridge.
Definition at line 595 of file graph_gcg.cpp.
◆ addEdge() [1/2]
|
virtual |
◆ addEdge() [2/2]
|
virtual |
◆ setEdge()
|
virtual |
sets the weight of the edge in the graph
Implements gcg::Bridge.
Definition at line 657 of file graph_gcg.cpp.
Referenced by gcg::PARTIALDECOMP::calcStairlinkingVars().
◆ deleteEdge()
|
virtual |
deletes the edge from the graph
Implements gcg::Bridge.
Definition at line 694 of file graph_gcg.cpp.
◆ graphGetWeights()
|
virtual |
◆ getEdgeWeight()
|
virtual |
returns the weight of the edge in the graph
Implements gcg::Bridge.
Definition at line 704 of file graph_gcg.cpp.
Referenced by gcg::PARTIALDECOMP::calcStairlinkingVars().
◆ edgeComp()
Definition at line 816 of file graph_gcg.cpp.
References gcg::EdgeGCG::src, and gcg::EdgeGCG::weight.
◆ flush()
|
virtual |
flushes the data stuctures, if needed
Implements gcg::Bridge.
Definition at line 721 of file graph_gcg.cpp.
◆ normalize()
|
virtual |
normalizes the edge weights, so that the biggest edge egiht in the graph is 1
Implements gcg::Bridge.
Definition at line 732 of file graph_gcg.cpp.
◆ getEdgeWeightPercentile()
|
virtual |
Implements gcg::Bridge.
Definition at line 765 of file graph_gcg.cpp.