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

gcg::Bridge::Bridge ( )
inline

Definition at line 47 of file bridge.h.

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

Member Function Documentation

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.

Referenced by gcg::Graph< T >::addEdge(), getNeighborWeights(), and ~Bridge().

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.

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.

Referenced by gcg::Graph< T >::addNNodes(), and ~Bridge().

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.

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.

Referenced by gcg::Graph< T >::addNode().

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

adds the node with 0 weight to the graph

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

Referenced by ~Bridge().

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.

Referenced by getNeighborWeights().

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

deletes the given node from the graph

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

Referenced by getNeighborWeights().

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

flushes the data stuctures, if needed

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

Referenced by gcg::Graph< T >::flush(), and getNeighborWeights().

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.

Referenced by gcg::Graph< T >::getEdges(), and ~Bridge().

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.

Referenced by gcg::Graph< T >::getEdgeWeight(), and ~Bridge().

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

get number of edges in the graph

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

Referenced by gcg::Graph< T >::getNEdges(), and ~Bridge().

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.

Referenced by gcg::Graph< T >::getNeighbors(), and ~Bridge().

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

get number of neighbors of a given node

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

Referenced by gcg::Graph< T >::getNNeighbors(), and ~Bridge().

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

get number of nodes in the graph

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

Referenced by gcg::Graph< T >::getNNodes(), and ~Bridge().

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

return the weight of a node

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

Referenced by getNeighborWeights(), and gcg::Graph< T >::getWeight().

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.

Referenced by ~Bridge().

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.

Referenced by getNeighborWeights(), and gcg::Graph< T >::normalize().

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.

Referenced by gcg::Graph< T >::setEdge(), and ~Bridge().