GCG 4.1.1 (dev)

Generic Column Generation

Loading...
Searching...
No Matches
gcg::Bridge Class Referenceabstract

Detailed Description

Definition at line 45 of file bridge.h.

#include <bridge.h>

Public Member Functions

 Bridge ()
virtual ~Bridge ()
virtual SCIP_RETCODE addNNodes (int _n_nodes)=0
virtual SCIP_RETCODE addNNodes (int _n_nodes, std::vector< int > weights)=0
virtual int getNNodes ()=0
virtual int getNEdges ()=0
virtual SCIP_RETCODE getEdges (std::vector< void * > &edges)=0
virtual SCIP_Bool isEdge (int i, int j)=0
virtual int getNNeighbors (int i)=0
virtual std::vector< int > getNeighbors (int i)=0
virtual SCIP_RETCODE addNode (int i, int weight)=0
virtual SCIP_RETCODE addNode ()=0
virtual SCIP_RETCODE addEdge (int i, int j, double weight)=0
virtual SCIP_RETCODE setEdge (int i, int j, double weight)=0
virtual double getEdgeWeight (int i, int j)=0
virtual std::vector< std::pair< int, double > > getNeighborWeights (int i)
virtual SCIP_RETCODE deleteNode (int i)=0
virtual SCIP_RETCODE addEdge (int i, int j)=0
virtual SCIP_RETCODE deleteEdge (int i, int j)=0
virtual int graphGetWeights (int i)=0
virtual SCIP_RETCODE flush ()=0
virtual SCIP_RETCODE normalize ()=0
virtual double getEdgeWeightPercentile (double q)=0

Constructor & Destructor Documentation

◆ Bridge()

gcg::Bridge::Bridge ( )
inline

Definition at line 48 of file bridge.h.

◆ ~Bridge()

virtual gcg::Bridge::~Bridge ( )
inlinevirtual

Definition at line 49 of file bridge.h.

Member Function Documentation

◆ addNNodes() [1/2]

virtual SCIP_RETCODE gcg::Bridge::addNNodes ( int _n_nodes)
pure virtual

add n nodes in the graph at the same time. it is much faster than to call addNode() many times

Implemented in gcg::GraphGCG, gcg::GraphTclique, and GraphGCG.

◆ addNNodes() [2/2]

virtual SCIP_RETCODE gcg::Bridge::addNNodes ( int _n_nodes,
std::vector< int > weights )
pure 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

Implemented in gcg::GraphGCG, gcg::GraphTclique, and GraphGCG.

◆ getNNodes()

virtual int gcg::Bridge::getNNodes ( )
pure virtual

get number of nodes in the graph

Implemented in gcg::GraphGCG, gcg::GraphTclique, and GraphGCG.

◆ getNEdges()

virtual int gcg::Bridge::getNEdges ( )
pure virtual

get number of edges in the graph

Implemented in gcg::GraphGCG, gcg::GraphTclique, and GraphGCG.

◆ getEdges()

virtual SCIP_RETCODE gcg::Bridge::getEdges ( std::vector< void * > & edges)
pure virtual

get list of edges in the graph (not defined how edges are implemented)

Implemented in gcg::GraphGCG, gcg::GraphTclique, and GraphGCG.

◆ isEdge()

virtual SCIP_Bool gcg::Bridge::isEdge ( int i,
int j )
pure virtual

return whether a given pair of vertices is connected by an edge

Implemented in gcg::GraphGCG, gcg::GraphTclique, and GraphGCG.

References i, and j.

◆ getNNeighbors()

virtual int gcg::Bridge::getNNeighbors ( int i)
pure virtual

get number of neighbors of a given node

Implemented in gcg::GraphGCG, gcg::GraphTclique, and GraphGCG.

References i.

◆ getNeighbors()

virtual std::vector< int > gcg::Bridge::getNeighbors ( int i)
pure virtual

get a vector of all neighbors of a given node

Implemented in gcg::GraphGCG, gcg::GraphTclique, and GraphGCG.

References i.

◆ addNode() [1/2]

virtual SCIP_RETCODE gcg::Bridge::addNode ( int i,
int weight )
pure virtual

adds the node with the given weight to the graph

Implemented in gcg::GraphGCG, gcg::GraphTclique, and GraphGCG.

References i.

◆ addNode() [2/2]

virtual SCIP_RETCODE gcg::Bridge::addNode ( )
pure virtual

adds the node with 0 weight to the graph

Implemented in gcg::GraphGCG, gcg::GraphTclique, and GraphGCG.

◆ addEdge() [1/2]

virtual SCIP_RETCODE gcg::Bridge::addEdge ( int i,
int j,
double weight )
pure virtual

adds the weighted edge to the graph

Implemented in gcg::GraphGCG, gcg::GraphTclique, and GraphGCG.

References i, and j.

◆ setEdge()

virtual SCIP_RETCODE gcg::Bridge::setEdge ( int i,
int j,
double weight )
pure virtual

sets the weight of the edge in the graph

Implemented in gcg::GraphGCG, gcg::GraphTclique, and GraphGCG.

References i, and j.

◆ getEdgeWeight()

virtual double gcg::Bridge::getEdgeWeight ( int i,
int j )
pure virtual

returns the weight of the edge in the graph

Implemented in gcg::GraphGCG, gcg::GraphTclique, and GraphGCG.

References i, and j.

◆ getNeighborWeights()

virtual std::vector< std::pair< int, double > > gcg::Bridge::getNeighborWeights ( int i)
inlinevirtual

Reimplemented in gcg::GraphGCG, gcg::GraphTclique, and GraphGCG.

Definition at line 90 of file bridge.h.

References i.

◆ deleteNode()

virtual SCIP_RETCODE gcg::Bridge::deleteNode ( int i)
pure virtual

deletes the given node from the graph

Implemented in gcg::GraphGCG, gcg::GraphTclique, and GraphGCG.

References i.

◆ addEdge() [2/2]

virtual SCIP_RETCODE gcg::Bridge::addEdge ( int i,
int j )
pure virtual

adds the edge to the graph

Implemented in gcg::GraphGCG, gcg::GraphTclique, and GraphGCG.

References i, and j.

◆ deleteEdge()

virtual SCIP_RETCODE gcg::Bridge::deleteEdge ( int i,
int j )
pure virtual

deletes the edge from the graph

Implemented in gcg::GraphGCG, gcg::GraphTclique, and GraphGCG.

References i, and j.

◆ graphGetWeights()

virtual int gcg::Bridge::graphGetWeights ( int i)
pure virtual

return the weight of a node

Implemented in gcg::GraphGCG, gcg::GraphTclique, and GraphGCG.

References i.

◆ flush()

virtual SCIP_RETCODE gcg::Bridge::flush ( )
pure virtual

flushes the data stuctures, if needed

Implemented in gcg::GraphGCG, gcg::GraphTclique, and GraphGCG.

◆ normalize()

virtual SCIP_RETCODE gcg::Bridge::normalize ( )
pure virtual

normalizes the edge weights, so that the biggest edge egiht in the graph is 1

Implemented in gcg::GraphGCG, gcg::GraphTclique, and GraphGCG.

◆ getEdgeWeightPercentile()

virtual double gcg::Bridge::getEdgeWeightPercentile ( double q)
pure virtual

Implemented in gcg::GraphGCG, gcg::GraphTclique, and GraphGCG.