gcg::GraphTclique Class Reference

Detailed Description

Definition at line 44 of file graph_tclique.h.

#include <graph_tclique.h>

Public Member Functions

 GraphTclique ()
 
virtual ~GraphTclique ()
 
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 SCIP_RETCODE getEdges (std::vector< void * > &edges)
 
virtual SCIP_Bool isEdge (int i, int j)
 
virtual int getNNeighbors (int i)
 
virtual std::vector< int > getNeighbors (int i)
 
virtual SCIP_RETCODE addNode (int i, int weight)
 
virtual SCIP_RETCODE addNode ()
 
virtual SCIP_RETCODE deleteNode (int i)
 
virtual SCIP_RETCODE addEdge (int i, int j)
 
virtual SCIP_RETCODE addEdge (int i, int j, double weight)
 
virtual SCIP_RETCODE setEdge (int i, int j, double weight)
 
virtual double getEdgeWeight (int i, int j)
 
virtual std::vector< std::pair< int, double > > getNeighborWeights (int i)
 
virtual SCIP_RETCODE deleteEdge (int i, int j)
 
virtual int graphGetWeights (int i)
 
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

gcg::GraphTclique::GraphTclique ( )

Definition at line 64 of file graph_tclique.cpp.

References TCLIQUE_CALL_EXC.

gcg::GraphTclique::~GraphTclique ( )
virtual

Definition at line 80 of file graph_tclique.cpp.

Member Function Documentation

SCIP_RETCODE gcg::GraphTclique::addEdge ( int  i,
int  j 
)
virtual

adds the edge to the graph

Implements gcg::Bridge.

Definition at line 139 of file graph_tclique.cpp.

References getNNodes(), and TCLIQUE_CALL.

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

adds the weighted edge to the graph

Implements gcg::Bridge.

Definition at line 151 of file graph_tclique.cpp.

SCIP_RETCODE gcg::GraphTclique::addNNodes ( int  _n_nodes)
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 69 of file graph_tclique.cpp.

SCIP_RETCODE gcg::GraphTclique::addNNodes ( int  _n_nodes,
std::vector< int >  weights 
)
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 74 of file graph_tclique.cpp.

SCIP_RETCODE gcg::GraphTclique::addNode ( int  i,
int  weight 
)
virtual

adds the node with the given weight to the graph

Implements gcg::Bridge.

Definition at line 122 of file graph_tclique.cpp.

References getNNodes(), and TCLIQUE_CALL.

SCIP_RETCODE gcg::GraphTclique::addNode ( )
virtual

adds the node with 0 weight to the graph

Implements gcg::Bridge.

Definition at line 129 of file graph_tclique.cpp.

SCIP_RETCODE gcg::GraphTclique::deleteEdge ( int  i,
int  j 
)
virtual

deletes the edge from the graph

Implements gcg::Bridge.

Definition at line 171 of file graph_tclique.cpp.

SCIP_RETCODE gcg::GraphTclique::deleteNode ( int  i)
virtual

deletes the given node from the graph

Implements gcg::Bridge.

Definition at line 134 of file graph_tclique.cpp.

SCIP_RETCODE gcg::GraphTclique::flush ( )
virtual

flushes the data stuctures, if needed

Implements gcg::Bridge.

Definition at line 177 of file graph_tclique.cpp.

References TCLIQUE_CALL.

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

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

Implements gcg::Bridge.

Definition at line 95 of file graph_tclique.cpp.

double gcg::GraphTclique::getEdgeWeight ( int  i,
int  j 
)
virtual

returns the weight of the edge in the graph

Implements gcg::Bridge.

Definition at line 161 of file graph_tclique.cpp.

double gcg::GraphTclique::getEdgeWeightPercentile ( double  q)
virtual

Implements gcg::Bridge.

Definition at line 198 of file graph_tclique.cpp.

int gcg::GraphTclique::getNEdges ( )
virtual

get number of edges in the graph

Implements gcg::Bridge.

Definition at line 90 of file graph_tclique.cpp.

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

get a vector of all neighbors of a given node

Implements gcg::Bridge.

Definition at line 115 of file graph_tclique.cpp.

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

Reimplemented from gcg::Bridge.

Definition at line 166 of file graph_tclique.cpp.

int gcg::GraphTclique::getNNeighbors ( int  i)
virtual

get number of neighbors of a given node

Implements gcg::Bridge.

Definition at line 109 of file graph_tclique.cpp.

int gcg::GraphTclique::getNNodes ( )
virtual

get number of nodes in the graph

Implements gcg::Bridge.

Definition at line 85 of file graph_tclique.cpp.

Referenced by addEdge(), addNode(), and graphGetWeights().

int gcg::GraphTclique::graphGetWeights ( int  i)
virtual

return the weight of a node

Implements gcg::Bridge.

Definition at line 184 of file graph_tclique.cpp.

References getNNodes().

SCIP_Bool gcg::GraphTclique::isEdge ( int  i,
int  j 
)
virtual

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

Implements gcg::Bridge.

Definition at line 101 of file graph_tclique.cpp.

SCIP_RETCODE gcg::GraphTclique::normalize ( )
virtual

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

Implements gcg::Bridge.

Definition at line 193 of file graph_tclique.cpp.

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

sets the weight of the edge in the graph

Implements gcg::Bridge.

Definition at line 156 of file graph_tclique.cpp.