Detailed Description
class gcg::HyperrowcolGraph< T >
Definition at line 46 of file hyperrowcolgraph.h.
#include <hyperrowcolgraph.h>
Public Member Functions | |
| HyperrowcolGraph (GCG *gcg, Weights w) | |
| virtual | ~HyperrowcolGraph () |
| SCIP_RETCODE | createFromMatrix (SCIP_CONS **conss, SCIP_VAR **vars, int nconss, int nvars) |
| virtual SCIP_RETCODE | createFromPartialMatrix (DETPROBDATA *detprobdata, PARTIALDECOMP *partialdec) |
| virtual SCIP_RETCODE | writeToFile (int fd, SCIP_Bool writeweights) |
| virtual SCIP_RETCODE | createDecompFromPartition (GCG_DECOMP **decomp) |
| virtual SCIP_RETCODE | createPartialdecFromPartition (PARTIALDECOMP **firstpartialdec, PARTIALDECOMP **secondpartialdec, DETPROBDATA *detprobdata) |
| virtual SCIP_RETCODE | createPartialdecFromPartition (PARTIALDECOMP *oldpartialdec, PARTIALDECOMP **firstpartialdec, PARTIALDECOMP **secondpartialdec, DETPROBDATA *detprobdata) |
| virtual SCIP_RETCODE | readPartition (const char *filename) |
| virtual std::vector< int > | getNeighbors (int i) |
| virtual std::vector< int > | getHyperedgeNodes (int i) |
| std::vector< int > | getConsNonzeroNodes (int i) |
| std::vector< int > | getVarNonzeroNodes (int i) |
Public Member Functions inherited from gcg::MatrixGraph< T > | |
| 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 |
Additional Inherited Members | |
Data Fields inherited from gcg::MatrixGraph< T > | |
| std::string | name |
Protected Attributes inherited from gcg::MatrixGraph< T > | |
| GCG * | gcg |
| int | nconss |
| int | nvars |
| int | dummynodes |
| Weights | weights |
| GraphInterface * | graphiface |
| int | nnonzeroes |
Constructor & Destructor Documentation
◆ HyperrowcolGraph()
| gcg::HyperrowcolGraph< T >::HyperrowcolGraph | ( | GCG * | gcg, |
| Weights | w | ||
| ) |
- Parameters
-
gcg GCG data structure w weights for the given graph
Definition at line 49 of file hyperrowcolgraph_def.h.
References gcg::MatrixGraph< T >::graphiface, gcg::MatrixGraph< T >::name, and w.
◆ ~HyperrowcolGraph()
|
virtual |
Definition at line 59 of file hyperrowcolgraph_def.h.
Member Function Documentation
◆ createFromMatrix()
|
virtual |
Builds a bipartite representation of the hyperrowcol graph out of the matrix.
The function will create an node for every constraint, every variable and every nonzero entry of the matrix. One side of the bipartite graph are the nonzero entries (nodes), the constraints and variables are on the other side (hyperedges). A nonzero entry a_{ij} is incident to the constraint i and the variable j.
- 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 from gcg::MatrixGraph< T >.
Definition at line 75 of file hyperrowcolgraph_def.h.
References GCGgetOrigprob(), GCGisVarRelevant(), NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_STAGE_TRANSFORMED, SCIPallocBufferArray, SCIPconsGetName(), SCIPdebugMessage, SCIPfreeBufferArray, SCIPgetConsNVars(), SCIPgetConsVars(), SCIPgetStage(), SCIPvarGetName(), SCIPvarGetProbindex(), and SCIPvarGetProbvar().
◆ createFromPartialMatrix()
|
virtual |
creates a graph with open constraints and open variables of the partialdec
stores the conss included by the graph
stores the vars included by the graph
< true, if the var will be part of the graph
< true, if the cons will be part of the graph
add node for every var
add node for every cons
- Parameters
-
detprobdata detection process information and data partialdec partial decomposition to use for matrix
Reimplemented from gcg::MatrixGraph< T >.
Definition at line 173 of file hyperrowcolgraph_def.h.
References gcg::DETPROBDATA::getCons(), gcg::PARTIALDECOMP::getNConss(), gcg::PARTIALDECOMP::getNOpenconss(), gcg::PARTIALDECOMP::getNOpenvars(), gcg::PARTIALDECOMP::getNVars(), gcg::DETPROBDATA::getNVarsForCons(), gcg::PARTIALDECOMP::getOpenconss(), gcg::PARTIALDECOMP::getOpenvars(), gcg::DETPROBDATA::getVar(), gcg::DETPROBDATA::getVarsForCons(), SCIP_CALL, SCIP_OKAY, SCIPconsGetName(), SCIPdebugMessage, and SCIPvarGetName().
◆ writeToFile()
|
virtual |
writes the graph to the given file. The format is graph dependent
- Parameters
-
fd file descriptor where the graph should be written to edgeweights whether to write weights
Reimplemented from gcg::MatrixGraph< T >.
Definition at line 280 of file hyperrowcolgraph_def.h.
References GCGgetOrigprob(), NULL, SCIP_FILECREATEERROR, SCIP_OKAY, SCIP_WRITEERROR, and SCIPinfoMessage().
◆ createDecompFromPartition()
|
virtual |
- Parameters
-
decomp decomposition structure to generate
Reimplemented from gcg::MatrixGraph< T >.
Definition at line 388 of file hyperrowcolgraph_def.h.
References BMSclearMemoryArray, FALSE, GCGdecompCreate(), GCGfilloutDecompFromConstoblock(), GCGgetOrigprob(), NULL, partition(), SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPallocBufferArray, SCIPblkmem(), SCIPdebugMessage, SCIPfreeBufferArray, SCIPgetConss(), SCIPhashmapCreate(), SCIPhashmapFree(), SCIPhashmapInsert(), and TRUE.
◆ createPartialdecFromPartition() [1/2]
|
virtual |
creates a new partialdec by dint of a graph created with all constraints and variables
- Parameters
-
firstpartialdec pointer to buffer the new partialdec created by dint of the graph (can be NULL) secondpartialdec pointer to buffer the new partialdec whose border is amplified by dint of the graph (can be NULL) detprobdata detection process information and data
Definition at line 454 of file hyperrowcolgraph_def.h.
References BMSclearMemoryArray, FALSE, GCGgetOrigprob(), gcg::DETPROBDATA::getIndexForCons(), gcg::DETPROBDATA::isAssignedToOrigProb(), NULL, partition(), SCIP_Bool, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPallocBufferArray, SCIPblkmem(), SCIPdebugMessage, SCIPfreeBufferArray, SCIPgetConss(), SCIPhashmapCreate(), SCIPhashmapFree(), SCIPhashmapInsert(), and TRUE.
◆ createPartialdecFromPartition() [2/2]
|
virtual |
amplifies a partialdec by dint of a graph created with open constraints and open variables of the partialdec
stores the conss included by the graph
< true, if the cons will be part of the graph
- 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 from gcg::MatrixGraph< T >.
Definition at line 549 of file hyperrowcolgraph_def.h.
References BMSclearMemoryArray, FALSE, GCGgetOrigprob(), gcg::PARTIALDECOMP::getNConss(), gcg::PARTIALDECOMP::getNOpenconss(), gcg::PARTIALDECOMP::getNOpenvars(), gcg::DETPROBDATA::getNVarsForCons(), gcg::PARTIALDECOMP::getOpenconss(), gcg::PARTIALDECOMP::getOpenvars(), gcg::DETPROBDATA::getVarsForCons(), NULL, partition(), SCIP_Bool, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPallocBufferArray, SCIPblkmem(), SCIPdebugMessage, SCIPfreeBufferArray, SCIPhashmapCreate(), SCIPhashmapFree(), SCIPhashmapInsert(), and TRUE.
◆ readPartition()
|
virtual |
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 from gcg::MatrixGraph< T >.
Definition at line 674 of file hyperrowcolgraph_def.h.
References SCIP_OKAY, SCIP_READERROR, and SCIPerrorMessage.
◆ getNeighbors()
|
virtual |
Definition at line 323 of file hyperrowcolgraph_def.h.
References r.
◆ getHyperedgeNodes()
|
virtual |
Definition at line 346 of file hyperrowcolgraph_def.h.
◆ getConsNonzeroNodes()
| std::vector< int > gcg::HyperrowcolGraph< T >::getConsNonzeroNodes | ( | int | i | ) |
Definition at line 360 of file hyperrowcolgraph_def.h.
◆ getVarNonzeroNodes()
| std::vector< int > gcg::HyperrowcolGraph< T >::getVarNonzeroNodes | ( | int | i | ) |
Definition at line 374 of file hyperrowcolgraph_def.h.
Public Member Functions inherited from