Detailed Description
template<class T>
class gcg::HypercolGraph< T >
Definition at line 46 of file hypercolgraph.h.
#include <hypercolgraph.h>
Data Structures | |
class | function |
Public Member Functions | |
HypercolGraph (SCIP *scip, Weights w) | |
virtual | ~HypercolGraph () |
SCIP_RETCODE | writeToFile (int fd, SCIP_Bool edgeweights) |
virtual int | getNNodes () |
virtual int | getNEdges () |
virtual std::vector< int > | getNeighbors (int i) |
virtual std::vector< int > | getHyperedgeNodes (int i) |
virtual SCIP_RETCODE | readPartition (const char *filename) |
virtual SCIP_RETCODE | createFromMatrix (SCIP_CONS **conss, SCIP_VAR **vars, int nconss_, int nvars_) |
virtual SCIP_RETCODE | createFromPartialMatrix (DETPROBDATA *detprobdata, PARTIALDECOMP *partialdec) |
virtual SCIP_RETCODE | createDecompFromPartition (DEC_DECOMP **decomp) |
virtual SCIP_RETCODE | createPartialdecFromPartition (PARTIALDECOMP **firstpartialdec, PARTIALDECOMP **secondpartialdec, DETPROBDATA *detprobdata) |
virtual SCIP_RETCODE | createPartialdecFromPartition (PARTIALDECOMP *oldpartialdec, PARTIALDECOMP **firstpartialdec, PARTIALDECOMP **secondpartialdec, DETPROBDATA *detprobdata) |
Public Member Functions inherited from gcg::MatrixGraph< T > | |
MatrixGraph (SCIP *scip, Weights w) | |
virtual | ~MatrixGraph () |
void | setDummynodes (int dummynodes_) |
int | getDummynodes () const |
virtual std::vector< int > | getPartition () |
virtual int | getNNonzeroes () const |
Additional Inherited Members | |
Data Fields inherited from gcg::MatrixGraph< T > | |
std::string | name |
Protected Attributes inherited from gcg::MatrixGraph< T > | |
SCIP * | scip_ |
int | nconss |
int | nvars |
int | dummynodes |
Weights | weights |
GraphInterface * | graphiface |
int | nnonzeroes |
Constructor & Destructor Documentation
◆ HypercolGraph()
gcg::HypercolGraph< T >::HypercolGraph | ( | SCIP * | scip, |
Weights | w | ||
) |
- Parameters
-
scip SCIP data structure w weights for the given graph
Definition at line 52 of file hypercolgraph_def.h.
References gcg::MatrixGraph< T >::graphiface, and gcg::MatrixGraph< T >::name.
◆ ~HypercolGraph()
|
virtual |
Definition at line 62 of file hypercolgraph_def.h.
Member Function Documentation
◆ writeToFile()
|
virtual |
writes the graph to the given file. The format is graph dependent
- Parameters
-
fd filename where the graph should be written to edgeweights whether to write edgeweights
Reimplemented from gcg::MatrixGraph< T >.
Definition at line 72 of file hypercolgraph_def.h.
◆ getNNodes()
|
virtual |
return the number of nodes
Definition at line 112 of file hypercolgraph_def.h.
◆ getNEdges()
|
virtual |
return the number of edges (or hyperedges)
Definition at line 106 of file hypercolgraph_def.h.
◆ getNeighbors()
|
inlinevirtual |
Definition at line 81 of file hypercolgraph.h.
References gcg::Hypergraph< T >::getNeighbors().
◆ getHyperedgeNodes()
|
virtual |
Definition at line 119 of file hypercolgraph_def.h.
◆ 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 from gcg::MatrixGraph< T >.
Definition at line 96 of file hypercolgraph.h.
References gcg::Hypergraph< T >::readPartition().
◆ createFromMatrix()
|
virtual |
- 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 132 of file hypercolgraph_def.h.
References GCGisVarRelevant().
◆ createFromPartialMatrix()
|
virtual |
creates a graph with open constraints and open variables of the partialdec
< true, if the var will be part of the graph
< true, if the cons will be part of the graph
stores the conss included by the graph
stores the vars included by the graph
- Parameters
-
detprobdata detection process information and data partialdec partial decomposition to use for graph
Reimplemented from gcg::MatrixGraph< T >.
Definition at line 226 of file hypercolgraph_def.h.
References gcg::DETPROBDATA::getCons(), gcg::DETPROBDATA::getConssForVar(), gcg::PARTIALDECOMP::getNConss(), gcg::DETPROBDATA::getNConssForVar(), gcg::PARTIALDECOMP::getNOpenconss(), gcg::PARTIALDECOMP::getNOpenvars(), gcg::PARTIALDECOMP::getNVars(), gcg::DETPROBDATA::getNVarsForCons(), gcg::PARTIALDECOMP::getOpenconss(), gcg::PARTIALDECOMP::getOpenvars(), gcg::DETPROBDATA::getVar(), and gcg::DETPROBDATA::getVarsForCons().
◆ createDecompFromPartition()
|
virtual |
- Parameters
-
decomp decomposition structure to generate
Reimplemented from gcg::MatrixGraph< T >.
Definition at line 316 of file hypercolgraph_def.h.
References DECdecompCreate(), DECfilloutDecompFromConstoblock(), and partition().
◆ createPartialdecFromPartition() [1/2]
|
virtual |
creates a new partialdec by dint of a graph created with all constraints and variables
add data structures to handle empty blocks
- Parameters
-
firstpartialdec pointer to buffer the new partialdec created by dint of the graph secondpartialdec pointer to buffer the new partialdec whose border is amplified by dint of the graph detprobdata detection process information and data
Definition at line 347 of file hypercolgraph_def.h.
References gcg::DETPROBDATA::getIndexForCons(), gcg::DETPROBDATA::isAssignedToOrigProb(), and partition().
◆ 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
add data structures to handle empty blocks
- 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 from gcg::MatrixGraph< T >.
Definition at line 412 of file hypercolgraph_def.h.
References gcg::PARTIALDECOMP::getNConss(), gcg::PARTIALDECOMP::getNOpenconss(), gcg::PARTIALDECOMP::getNOpenvars(), gcg::DETPROBDATA::getNVarsForCons(), gcg::PARTIALDECOMP::getOpenconss(), gcg::PARTIALDECOMP::getOpenvars(), gcg::DETPROBDATA::getVarsForCons(), and partition().