Scippy

GCG

Branch-and-Price & Column Generation for Everyone

gcg::Bridge Class Referenceabstract

Detailed Description

Definition at line 44 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 47 of file bridge.h.

◆ ~Bridge()

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

Definition at line 48 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, and gcg::GraphTclique.

◆ 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, and gcg::GraphTclique.

◆ getNNodes()

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

get number of nodes in the graph

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

◆ getNEdges()

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

get number of edges in the graph

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

◆ 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, and gcg::GraphTclique.

◆ 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, and gcg::GraphTclique.

◆ getNNeighbors()

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

get number of neighbors of a given node

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

◆ 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, and gcg::GraphTclique.

◆ 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, and gcg::GraphTclique.

◆ addNode() [2/2]

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

adds the node with 0 weight to the graph

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

◆ 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, and gcg::GraphTclique.

◆ 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, and gcg::GraphTclique.

◆ 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, and gcg::GraphTclique.

◆ getNeighborWeights()

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

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

Definition at line 89 of file bridge.h.

◆ deleteNode()

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

deletes the given node from the graph

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

◆ 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, and gcg::GraphTclique.

◆ deleteEdge()

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

deletes the edge from the graph

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

◆ graphGetWeights()

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

return the weight of a node

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

◆ flush()

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

flushes the data stuctures, if needed

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

◆ 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, and gcg::GraphTclique.

◆ getEdgeWeightPercentile()

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

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