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 | createPartialdecFromPartition (PARTIALDECOMP *oldpartialdec, PARTIALDECOMP **firstpartialdec, PARTIALDECOMP **secondpartialdec, DETPROBDATA *detprobdata) |
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 (DETPROBDATA *detprobdata, PARTIALDECOMP *partialdec) |
virtual int | getNNonzeroes () const |
Data Fields | |
std::string | name |
Protected Attributes | |
SCIP * | scip_ |
int | nconss |
int | nvars |
int | dummynodes |
Weights | weights |
GraphInterface * | graphiface |
int | nnonzeroes |
Constructor & Destructor Documentation
◆ MatrixGraph()
gcg::MatrixGraph< T >::MatrixGraph | ( | SCIP * | scip, |
Weights | w | ||
) |
Constructor
- Parameters
-
scip SCIP data structure w weights for the given graph
Definition at line 44 of file matrixgraph_def.h.
◆ ~MatrixGraph()
|
virtual |
Destructor
Definition at line 53 of file matrixgraph_def.h.
Member Function Documentation
◆ writeToFile()
|
inlinevirtual |
writes the graph to the given file. The format is graph dependent
- Parameters
-
fd file descriptor where the graph should be written to writeweights whether 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::MatrixGraph< T >::graphiface, and gcg::GraphInterface::writeToFile().
Referenced by createMetisFile().
◆ createDecompFromPartition()
|
inlinevirtual |
- Parameters
-
decomp decomposition structure to generate
Reimplemented in gcg::HypercolGraph< T >, gcg::HyperrowGraph< T >, gcg::HyperrowcolGraph< T >, gcg::RowGraph< T >, and gcg::ColumnGraph< T >.
Definition at line 89 of file matrixgraph.h.
◆ createPartialdecFromPartition()
|
inlinevirtual |
amplifies a partialdec by dint of a graph created with open constraints and open variables of the partialdec
- Parameters
-
oldpartialdec partialdec which should be amplifies firstpartialdec pointer to buffer the new partialdec amplified by dint of the graph secondpartialdec pinter to buffer the new partialdec whose border is amplified by dint of the graph detprobdata detection process information and data
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().
◆ readPartition()
|
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
-
filename filename 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::MatrixGraph< T >::graphiface, and gcg::GraphInterface::readPartition().
Referenced by callMetis().
◆ setDummynodes()
|
inline |
set the number of dummy nodes
Definition at line 122 of file matrixgraph.h.
References gcg::MatrixGraph< T >::dummynodes.
Referenced by createMetisFile().
◆ getDummynodes()
|
inline |
Definition at line 127 of file matrixgraph.h.
References gcg::MatrixGraph< T >::dummynodes.
◆ getPartition()
|
inlinevirtual |
return a partition of the nodes
Reimplemented in gcg::HyperrowGraph< T >.
Definition at line 133 of file matrixgraph.h.
References gcg::GraphInterface::getPartition(), and gcg::MatrixGraph< T >::graphiface.
◆ createFromMatrix()
|
inlinevirtual |
- Parameters
-
conss constraints for which graph should be created vars variables 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::BipartiteGraph< T >, and gcg::HyperrowcolGraph< T >.
Definition at line 138 of file matrixgraph.h.
◆ createFromPartialMatrix()
|
inlinevirtual |
creates a graph with open constraints and open variables of the partialdec
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().
◆ getNNonzeroes()
|
inlinevirtual |
Definition at line 152 of file matrixgraph.h.
References gcg::MatrixGraph< T >::nnonzeroes.
Referenced by createMetisFile(), and detection().
Field Documentation
◆ name
std::string gcg::MatrixGraph< T >::name |
Definition at line 56 of file matrixgraph.h.
Referenced by gcg::BipartiteGraph< T >::BipartiteGraph(), gcg::ColumnGraph< T >::ColumnGraph(), gcg::HypercolGraph< T >::HypercolGraph(), gcg::HyperrowcolGraph< T >::HyperrowcolGraph(), gcg::HyperrowGraph< T >::HyperrowGraph(), gcg::RowGraph< T >::RowGraph(), and gcg::RowGraphWeighted< T >::RowGraphWeighted().
◆ scip_
|
protected |
Definition at line 58 of file matrixgraph.h.
◆ nconss
|
protected |
Definition at line 59 of file matrixgraph.h.
◆ nvars
|
protected |
Definition at line 60 of file matrixgraph.h.
◆ dummynodes
|
protected |
Definition at line 61 of file matrixgraph.h.
Referenced by gcg::MatrixGraph< T >::getDummynodes(), and gcg::MatrixGraph< T >::setDummynodes().
◆ weights
|
protected |
Definition at line 62 of file matrixgraph.h.
◆ graphiface
|
protected |
Definition at line 63 of file matrixgraph.h.
Referenced by gcg::BipartiteGraph< T >::BipartiteGraph(), gcg::ColumnGraph< T >::ColumnGraph(), gcg::MatrixGraph< T >::getPartition(), gcg::HypercolGraph< T >::HypercolGraph(), gcg::HyperrowcolGraph< T >::HyperrowcolGraph(), gcg::HyperrowGraph< T >::HyperrowGraph(), gcg::MatrixGraph< T >::readPartition(), gcg::RowGraph< T >::RowGraph(), and gcg::MatrixGraph< T >::writeToFile().
◆ nnonzeroes
|
protected |
Definition at line 64 of file matrixgraph.h.
Referenced by gcg::MatrixGraph< T >::getNNonzeroes().