Detailed Description
class gcg::MatrixGraph< T >
Definition at line 55 of file matrixgraph.h.
#include <matrixgraph.h>
Public Member Functions | |
| MatrixGraph (GCG *gcgstruct, Weights w) | |
| virtual | ~MatrixGraph () |
| virtual SCIP_RETCODE | writeToFile (int fd, SCIP_Bool writeweights) |
| virtual SCIP_RETCODE | createDecompFromPartition (GCG_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 | |
| GCG * | gcg |
| int | nconss |
| int | nvars |
| int | dummynodes |
| Weights | weights |
| GraphInterface * | graphiface |
| int | nnonzeroes |
Constructor & Destructor Documentation
◆ MatrixGraph()
| gcg::MatrixGraph< T >::MatrixGraph | ( | GCG * | gcgstruct, |
| Weights | w ) |
Constructor
- Parameters
-
gcgstruct GCG data structure w weights for the given graph
Definition at line 45 of file matrixgraph_def.h.
References dummynodes, graphiface, name, nconss, nnonzeroes, nvars, and weights.
Referenced by gcg::BipartiteGraph< T >::BipartiteGraph(), gcg::ColumnGraph< T >::ColumnGraph(), gcg::HypercolGraph< T >::HypercolGraph(), gcg::HyperrowcolGraph< T >::HyperrowcolGraph(), gcg::HyperrowGraph< T >::HyperrowGraph(), and gcg::RowGraph< T >::RowGraph().
◆ ~MatrixGraph()
|
virtual |
Destructor
Definition at line 54 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::HypercolGraph< T >, gcg::HyperrowcolGraph< T >, gcg::HyperrowGraph< T >, HypercolGraph< T >, HyperrowcolGraph< T >, and HyperrowGraph< T >.
Definition at line 80 of file matrixgraph.h.
References graphiface, SCIP_CALL(), and gcg::GraphInterface::writeToFile().
Referenced by createMetisFile(), createMetisFile(), and createMetisFile().
◆ createDecompFromPartition()
|
inlinevirtual |
- Parameters
-
decomp decomposition structure to generate
Reimplemented in gcg::ColumnGraph< T >, gcg::HypercolGraph< T >, gcg::HyperrowcolGraph< T >, gcg::HyperrowGraph< T >, gcg::RowGraph< T >, HypercolGraph< T >, HyperrowcolGraph< T >, and HyperrowGraph< T >.
Definition at line 90 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 (can be NULL) secondpartialdec pinter to buffer the new partialdec whose border is amplified by dint of the graph (can be NULL) detprobdata detection process information and data
Reimplemented in gcg::HypercolGraph< T >, gcg::HyperrowcolGraph< T >, gcg::HyperrowGraph< T >, gcg::RowGraph< T >, HypercolGraph< T >, HyperrowcolGraph< T >, and HyperrowGraph< T >.
Definition at line 100 of file matrixgraph.h.
Referenced by detection(), detection(), and 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::HypercolGraph< T >, gcg::HyperrowcolGraph< T >, gcg::HyperrowGraph< T >, HypercolGraph< T >, HyperrowcolGraph< T >, and HyperrowGraph< T >.
Definition at line 114 of file matrixgraph.h.
References graphiface, gcg::GraphInterface::readPartition(), and SCIP_CALL().
Referenced by callMetis(), callMetis(), and callMetis().
◆ setDummynodes()
|
inline |
set the number of dummy nodes
Definition at line 123 of file matrixgraph.h.
References dummynodes.
Referenced by createMetisFile(), createMetisFile(), and createMetisFile().
◆ getDummynodes()
|
inline |
Definition at line 128 of file matrixgraph.h.
References dummynodes.
◆ getPartition()
|
inlinevirtual |
return a partition of the nodes
Reimplemented in gcg::HyperrowGraph< T >, and HyperrowGraph< T >.
Definition at line 134 of file matrixgraph.h.
References gcg::GraphInterface::getPartition(), and graphiface.
Referenced by gcg::HypercolGraph< T >::createDecompFromPartition(), gcg::HypercolGraph< T >::createPartialdecFromPartition(), and gcg::HypercolGraph< T >::createPartialdecFromPartition().
◆ 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::BipartiteGraph< T >, gcg::ColumnGraph< T >, gcg::HypercolGraph< T >, gcg::HyperrowcolGraph< T >, gcg::HyperrowGraph< T >, gcg::RowGraph< T >, HypercolGraph< T >, HyperrowcolGraph< T >, and HyperrowGraph< T >.
Definition at line 139 of file matrixgraph.h.
References vars.
◆ createFromPartialMatrix()
|
inlinevirtual |
creates a graph with open constraints and open variables of the partialdec
Reimplemented in gcg::BipartiteGraph< T >, gcg::HypercolGraph< T >, gcg::HyperrowcolGraph< T >, gcg::HyperrowGraph< T >, HypercolGraph< T >, HyperrowcolGraph< T >, and HyperrowGraph< T >.
Definition at line 147 of file matrixgraph.h.
Referenced by detection(), detection(), and detection().
◆ getNNonzeroes()
|
inlinevirtual |
Definition at line 153 of file matrixgraph.h.
References nnonzeroes.
Referenced by createMetisFile(), createMetisFile(), createMetisFile(), and detection().
Field Documentation
◆ name
| std::string gcg::MatrixGraph< T >::name |
Definition at line 57 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(), MatrixGraph(), gcg::RowGraph< T >::RowGraph(), and gcg::RowGraphWeighted< T >::RowGraphWeighted().
◆ gcg
|
protected |
Definition at line 59 of file matrixgraph.h.
◆ nconss
|
protected |
Definition at line 60 of file matrixgraph.h.
Referenced by gcg::ColumnGraph< T >::createDecompFromPartition(), gcg::HypercolGraph< T >::createDecompFromPartition(), gcg::HyperrowcolGraph< T >::createDecompFromPartition(), gcg::HyperrowGraph< T >::createDecompFromPartition(), gcg::RowGraph< T >::createDecompFromPartition(), gcg::BipartiteGraph< T >::createFromMatrix(), gcg::ColumnGraph< T >::createFromMatrix(), gcg::HypercolGraph< T >::createFromMatrix(), gcg::HyperrowcolGraph< T >::createFromMatrix(), gcg::HyperrowGraph< T >::createFromMatrix(), gcg::RowGraph< T >::createFromMatrix(), gcg::RowGraphWeighted< T >::createFromMatrix(), gcg::BipartiteGraph< T >::createFromPartialMatrix(), gcg::HypercolGraph< T >::createFromPartialMatrix(), gcg::HyperrowcolGraph< T >::createFromPartialMatrix(), gcg::HyperrowGraph< T >::createFromPartialMatrix(), gcg::RowGraphWeighted< T >::createFromPartialMatrix(), gcg::HypercolGraph< T >::createPartialdecFromPartition(), gcg::HypercolGraph< T >::createPartialdecFromPartition(), gcg::HyperrowcolGraph< T >::createPartialdecFromPartition(), gcg::HyperrowcolGraph< T >::createPartialdecFromPartition(), gcg::HyperrowGraph< T >::createPartialdecFromPartition(), gcg::HyperrowGraph< T >::createPartialdecFromPartition(), gcg::RowGraph< T >::createPartialdecFromPartition(), 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(), MatrixGraph(), and gcg::HyperrowcolGraph< T >::writeToFile().
◆ nvars
|
protected |
Definition at line 61 of file matrixgraph.h.
Referenced by gcg::BipartiteGraph< T >::createFromMatrix(), gcg::ColumnGraph< T >::createFromMatrix(), gcg::HypercolGraph< T >::createFromMatrix(), gcg::HyperrowcolGraph< T >::createFromMatrix(), gcg::HyperrowGraph< T >::createFromMatrix(), gcg::RowGraph< T >::createFromMatrix(), gcg::RowGraphWeighted< T >::createFromMatrix(), gcg::BipartiteGraph< T >::createFromPartialMatrix(), gcg::HypercolGraph< T >::createFromPartialMatrix(), gcg::HyperrowcolGraph< T >::createFromPartialMatrix(), gcg::HyperrowGraph< T >::createFromPartialMatrix(), gcg::RowGraphWeighted< T >::createFromPartialMatrix(), gcg::HyperrowcolGraph< T >::getConsNonzeroNodes(), gcg::HyperrowcolGraph< T >::getHyperedgeNodes(), gcg::HypercolGraph< T >::getNEdges(), gcg::HyperrowcolGraph< T >::getNeighbors(), gcg::HyperrowGraph< T >::getNNodes(), gcg::BipartiteGraph< T >::getNVarNodes(), gcg::HyperrowcolGraph< T >::getVarNonzeroNodes(), MatrixGraph(), gcg::HypercolGraph< T >::writeToFile(), and gcg::HyperrowcolGraph< T >::writeToFile().
◆ dummynodes
|
protected |
Definition at line 62 of file matrixgraph.h.
Referenced by getDummynodes(), MatrixGraph(), setDummynodes(), gcg::HypercolGraph< T >::writeToFile(), gcg::HyperrowcolGraph< T >::writeToFile(), and gcg::HyperrowGraph< T >::writeToFile().
◆ weights
|
protected |
Definition at line 63 of file matrixgraph.h.
Referenced by gcg::BipartiteGraph< T >::createFromMatrix(), gcg::ColumnGraph< T >::createFromMatrix(), gcg::HypercolGraph< T >::createFromMatrix(), gcg::HyperrowcolGraph< T >::createFromMatrix(), gcg::HyperrowGraph< T >::createFromMatrix(), gcg::RowGraph< T >::createFromMatrix(), gcg::BipartiteGraph< T >::createFromPartialMatrix(), gcg::HypercolGraph< T >::createFromPartialMatrix(), gcg::HyperrowcolGraph< T >::createFromPartialMatrix(), gcg::HyperrowGraph< T >::createFromPartialMatrix(), and MatrixGraph().
◆ graphiface
|
protected |
Definition at line 64 of file matrixgraph.h.
Referenced by gcg::BipartiteGraph< T >::BipartiteGraph(), gcg::ColumnGraph< T >::ColumnGraph(), getPartition(), gcg::HypercolGraph< T >::HypercolGraph(), gcg::HyperrowcolGraph< T >::HyperrowcolGraph(), gcg::HyperrowGraph< T >::HyperrowGraph(), MatrixGraph(), readPartition(), gcg::RowGraph< T >::RowGraph(), and writeToFile().
◆ nnonzeroes
|
protected |
Definition at line 65 of file matrixgraph.h.
Referenced by gcg::HyperrowcolGraph< T >::createFromMatrix(), gcg::HyperrowcolGraph< T >::createFromPartialMatrix(), gcg::HyperrowcolGraph< T >::getNeighbors(), getNNonzeroes(), MatrixGraph(), gcg::HyperrowcolGraph< T >::readPartition(), and gcg::HyperrowcolGraph< T >::writeToFile().