GCG 4.1.1 (dev)

Generic Column Generation

Loading...
Searching...
No Matches
gcg::GraphTclique Class Reference

Detailed Description

Definition at line 45 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

◆ GraphTclique()

gcg::GraphTclique::GraphTclique ( )

Definition at line 65 of file graph_tclique.cpp.

References TCLIQUE_CALL_EXC.

◆ ~GraphTclique()

gcg::GraphTclique::~GraphTclique ( )
virtual

Definition at line 81 of file graph_tclique.cpp.

Member Function Documentation

◆ addNNodes() [1/2]

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 70 of file graph_tclique.cpp.

◆ addNNodes() [2/2]

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 75 of file graph_tclique.cpp.

◆ getNNodes()

int gcg::GraphTclique::getNNodes ( )
virtual

get number of nodes in the graph

Implements gcg::Bridge.

Definition at line 86 of file graph_tclique.cpp.

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

◆ getNEdges()

int gcg::GraphTclique::getNEdges ( )
virtual

get number of edges in the graph

Implements gcg::Bridge.

Definition at line 91 of file graph_tclique.cpp.

◆ getEdges()

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 96 of file graph_tclique.cpp.

◆ isEdge()

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 102 of file graph_tclique.cpp.

References assert(), i, and j.

◆ getNNeighbors()

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

get number of neighbors of a given node

Implements gcg::Bridge.

Definition at line 110 of file graph_tclique.cpp.

References assert(), and i.

◆ getNeighbors()

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 116 of file graph_tclique.cpp.

References assert(), and i.

◆ addNode() [1/2]

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 123 of file graph_tclique.cpp.

References assert(), getNNodes(), i, and TCLIQUE_CALL.

◆ addNode() [2/2]

SCIP_RETCODE gcg::GraphTclique::addNode ( )
virtual

adds the node with 0 weight to the graph

Implements gcg::Bridge.

Definition at line 130 of file graph_tclique.cpp.

◆ deleteNode()

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

deletes the given node from the graph

Implements gcg::Bridge.

Definition at line 135 of file graph_tclique.cpp.

References i.

◆ addEdge() [1/2]

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

adds the edge to the graph

Implements gcg::Bridge.

Definition at line 140 of file graph_tclique.cpp.

References assert(), getNNodes(), i, j, and TCLIQUE_CALL.

◆ addEdge() [2/2]

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 152 of file graph_tclique.cpp.

References i, and j.

◆ setEdge()

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 157 of file graph_tclique.cpp.

References i, and j.

◆ getEdgeWeight()

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

returns the weight of the edge in the graph

Implements gcg::Bridge.

Definition at line 162 of file graph_tclique.cpp.

References i, and j.

◆ getNeighborWeights()

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

Reimplemented from gcg::Bridge.

Definition at line 167 of file graph_tclique.cpp.

References i.

◆ deleteEdge()

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

deletes the edge from the graph

Implements gcg::Bridge.

Definition at line 172 of file graph_tclique.cpp.

References i, and j.

◆ graphGetWeights()

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

return the weight of a node

Implements gcg::Bridge.

Definition at line 185 of file graph_tclique.cpp.

References assert(), getNNodes(), and i.

◆ flush()

SCIP_RETCODE gcg::GraphTclique::flush ( )
virtual

flushes the data stuctures, if needed

Implements gcg::Bridge.

Definition at line 178 of file graph_tclique.cpp.

References TCLIQUE_CALL.

◆ normalize()

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 194 of file graph_tclique.cpp.

◆ getEdgeWeightPercentile()

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

Implements gcg::Bridge.

Definition at line 199 of file graph_tclique.cpp.