gcg::MatrixGraph< T > Class Template Reference

Detailed Description

template<class T>
class gcg::MatrixGraph< T >

Definition at line 54 of file matrixgraph.h.

#include <matrixgraph.h>

Public Member Functions

 MatrixGraph (SCIP *scip, Weights w)
 
virtual ~MatrixGraph ()
 
virtual SCIP_RETCODE writeToFile (int fd, SCIP_Bool writeweights)
 
virtual SCIP_RETCODE createDecompFromPartition (DEC_DECOMP **decomp)
 
virtual SCIP_RETCODE createSeeedFromPartition (Seeed *oldSeeed, Seeed **firstSeeed, Seeed **secondSeeed, Seeedpool *seeedpool)
 
virtual SCIP_RETCODE readPartition (const char *filename)
 
void setDummynodes (int dummynodes_)
 
int getDummynodes () const
 
virtual std::vector< int > getPartition ()
 
virtual SCIP_RETCODE createFromMatrix (SCIP_CONS **conss, SCIP_VAR **vars, int nconss_, int nvars_)
 
virtual SCIP_RETCODE createFromPartialMatrix (Seeedpool *seeedpool, Seeed *seeed)
 
virtual int getNNonzeroes () const
 

Public Attributes

std::string name
 

Protected Attributes

SCIP * scip_
 
int nconss
 
int nvars
 
int dummynodes
 
Weights weights
 
GraphInterfacegraphiface
 
int nnonzeroes
 

Constructor & Destructor Documentation

template<class T >
gcg::MatrixGraph< T >::MatrixGraph ( SCIP *  scip,
Weights  w 
)

Constructor

Parameters
scipSCIP data structure
wweights for the given graph

Definition at line 44 of file matrixgraph_def.h.

template<class T >
gcg::MatrixGraph< T >::~MatrixGraph ( )
virtual

Destructor

Definition at line 53 of file matrixgraph_def.h.

Member Function Documentation

template<class T>
virtual SCIP_RETCODE gcg::MatrixGraph< T >::createDecompFromPartition ( DEC_DECOMP **  decomp)
inlinevirtual
Parameters
decompdecomposition structure to generate

Reimplemented in gcg::HypercolGraph< T >, gcg::HyperrowGraph< T >, gcg::HyperrowcolGraph< T >, gcg::ColumnGraph< T >, and gcg::RowGraph< T >.

Definition at line 89 of file matrixgraph.h.

Referenced by gcg::DialogReadGraphs< T, G >::DialogReadGraphs().

template<class T>
virtual SCIP_RETCODE gcg::MatrixGraph< T >::createFromMatrix ( SCIP_CONS **  conss,
SCIP_VAR **  vars,
int  nconss_,
int  nvars_ 
)
inlinevirtual
Parameters
conssconstraints for which graph should be created
varsvariables for which graph should be created
nconss_number of constraints
nvars_number of variables

Reimplemented in gcg::HyperrowGraph< T >, gcg::HypercolGraph< T >, gcg::RowGraph< T >, gcg::ColumnGraph< T >, gcg::HyperrowcolGraph< T >, and gcg::BipartiteGraph< T >.

Definition at line 138 of file matrixgraph.h.

Referenced by gcg::DialogReadGraphs< T, G >::DialogReadGraphs(), and gcg::DialogWriteGraphs< T, G >::DialogWriteGraphs().

template<class T>
virtual SCIP_RETCODE gcg::MatrixGraph< T >::createFromPartialMatrix ( Seeedpool seeedpool,
Seeed seeed 
)
inlinevirtual

creates a graph with open constraints and open variables of the seeed

Reimplemented in gcg::HyperrowGraph< T >, gcg::HypercolGraph< T >, gcg::HyperrowcolGraph< T >, and gcg::BipartiteGraph< T >.

Definition at line 146 of file matrixgraph.h.

Referenced by detection(), and fromToolbox().

template<class T>
virtual SCIP_RETCODE gcg::MatrixGraph< T >::createSeeedFromPartition ( Seeed oldSeeed,
Seeed **  firstSeeed,
Seeed **  secondSeeed,
Seeedpool seeedpool 
)
inlinevirtual

amplifies a seeed by dint of a graph created with open constraints and open variables of the seeed

Parameters
oldSeeedseeed which should be amplifies
firstSeeedpointer to buffer the new seeed amplified by dint of the graph
secondSeeedpinter to buffer the new seeed whose border is amplified by dint of the graph

Reimplemented in gcg::HypercolGraph< T >, gcg::HyperrowGraph< T >, gcg::HyperrowcolGraph< T >, and gcg::RowGraph< T >.

Definition at line 99 of file matrixgraph.h.

Referenced by detection(), and fromToolbox().

template<class T>
int gcg::MatrixGraph< T >::getDummynodes ( ) const
inline

Definition at line 127 of file matrixgraph.h.

References gcg::MatrixGraph< T >::dummynodes.

template<class T>
virtual int gcg::MatrixGraph< T >::getNNonzeroes ( ) const
inlinevirtual

Definition at line 152 of file matrixgraph.h.

References gcg::MatrixGraph< T >::nnonzeroes.

Referenced by createMetisFile().

template<class T>
virtual std::vector<int> gcg::MatrixGraph< T >::getPartition ( )
inlinevirtual
template<class T>
virtual SCIP_RETCODE gcg::MatrixGraph< T >::readPartition ( const char *  filename)
inlinevirtual

reads the partition from the given file. The format is graph dependent. The default is a file with one line for each node a

Parameters
filenamefilename where the partition is stored

Reimplemented in gcg::HyperrowcolGraph< T >, gcg::HypercolGraph< T >, and gcg::HyperrowGraph< T >.

Definition at line 113 of file matrixgraph.h.

References gcg::GraphInterface::readPartition().

Referenced by callMetis(), and gcg::DialogReadGraphs< T, G >::DialogReadGraphs().

template<class T>
void gcg::MatrixGraph< T >::setDummynodes ( int  dummynodes_)
inline

set the number of dummy nodes

Definition at line 122 of file matrixgraph.h.

Referenced by createMetisFile().

template<class T>
virtual SCIP_RETCODE gcg::MatrixGraph< T >::writeToFile ( int  fd,
SCIP_Bool  writeweights 
)
inlinevirtual

writes the graph to the given file. The format is graph dependent

Parameters
fdfile descriptor where the graph should be written to
writeweightswhether to write weights

Reimplemented in gcg::HyperrowcolGraph< T >, gcg::HypercolGraph< T >, and gcg::HyperrowGraph< T >.

Definition at line 79 of file matrixgraph.h.

References gcg::GraphInterface::writeToFile().

Referenced by createMetisFile(), and gcg::DialogWriteGraphs< T, G >::DialogWriteGraphs().

Member Data Documentation

template<class T>
int gcg::MatrixGraph< T >::nconss
protected

Definition at line 59 of file matrixgraph.h.

Referenced by gcg::RowGraphWeighted< T >::calculateSimilarity(), gcg::RowGraph< T >::createDecompFromPartition(), gcg::ColumnGraph< T >::createDecompFromPartition(), gcg::HyperrowcolGraph< T >::createDecompFromPartition(), gcg::HyperrowGraph< T >::createDecompFromPartition(), gcg::HypercolGraph< T >::createDecompFromPartition(), gcg::BipartiteGraph< T >::createFromMatrix(), gcg::HyperrowcolGraph< T >::createFromMatrix(), gcg::ColumnGraph< T >::createFromMatrix(), gcg::RowGraph< T >::createFromMatrix(), gcg::RowGraphWeighted< T >::createFromMatrix(), gcg::HypercolGraph< T >::createFromMatrix(), gcg::HyperrowGraph< T >::createFromMatrix(), gcg::BipartiteGraph< T >::createFromPartialMatrix(), gcg::HyperrowcolGraph< T >::createFromPartialMatrix(), gcg::RowGraphWeighted< T >::createFromPartialMatrix(), gcg::HypercolGraph< T >::createFromPartialMatrix(), gcg::HyperrowGraph< T >::createFromPartialMatrix(), gcg::RowGraph< T >::createSeeedFromPartition(), gcg::HyperrowcolGraph< T >::createSeeedFromPartition(), gcg::HyperrowGraph< T >::createSeeedFromPartition(), gcg::HypercolGraph< T >::createSeeedFromPartition(), gcg::HyperrowcolGraph< T >::getConsNonzeroNodes(), gcg::HyperrowcolGraph< T >::getHyperedgeNodes(), gcg::BipartiteGraph< T >::getNConsNodes(), gcg::HyperrowGraph< T >::getNEdges(), gcg::HyperrowcolGraph< T >::getNeighbors(), gcg::HypercolGraph< T >::getNNodes(), gcg::HyperrowcolGraph< T >::getVarNonzeroNodes(), and gcg::HyperrowcolGraph< T >::writeToFile().