Detailed Description
C++ interface of cons_decomp.
Definition in file cons_decomp.hpp.
#include "gcg/class_partialdecomp.h"Go to the source code of this file.
Functions | |
| GCG_EXPORT std::vector< gcg::PARTIALDECOMP * > * | GCGconshdlrDecompGetPartialdecs (GCG *gcg) |
| gets vector of all partialdecs | |
| GCG_EXPORT gcg::PARTIALDECOMP * | GCGgetPartialdecToWrite (GCG *gcg, SCIP_Bool transformed) |
| GCG_EXPORT gcg::PARTIALDECOMP * | GCGconshdlrDecompGetPartialdecFromID (GCG *scip, int partialdecid) |
| local method to find a partialdec for a given id or NULL if no partialdec with such id is found | |
| GCG_EXPORT SCIP_RETCODE | GCGconshdlrDecompAddPreexisitingPartialDec (GCG *gcg, gcg::PARTIALDECOMP *partialdec) |
| adds a preexisting partial dec to be considered at the beginning of the detection | |
| GCG_EXPORT SCIP_RETCODE | GCGconshdlrDecompAddPreexisitingPartialDec (GCG *gcg, gcg::PARTIALDECOMP *partialdec, SCIP_Bool addpartialdec) |
| adds a preexisting partial dec to be considered at the beginning of the detection | |
| GCG_EXPORT void | GCGconshdlrDecompDeregisterPartialdec (GCG *gcg, gcg::PARTIALDECOMP *partialdec) |
| deregisters a partialdec in the conshdlr | |
| GCG_EXPORT void | GCGconshdlrDecompRegisterPartialdec (GCG *gcg, gcg::PARTIALDECOMP *partialdec) |
| registers a partialdec in the conshdlr | |
| GCG_EXPORT gcg::DETPROBDATA * | GCGconshdlrDecompGetDetprobdataOrig (GCG *gcg) |
| help method to access detprobdata for unpresolved problem | |
| GCG_EXPORT gcg::DETPROBDATA * | GCGconshdlrDecompGetDetprobdataPresolved (GCG *gcg) |
| help method to access detprobdata for transformed problem | |
| GCG_EXPORT SCIP_RETCODE | GCGconshdlrDecompChooseCandidatesFromSelected (GCG *gcg, std::vector< std::pair< gcg::PARTIALDECOMP *, SCIP_Real > > &candidates, SCIP_Bool original, SCIP_Bool printwarnings) |
| initilizes the candidates data structures with selected partialdecs | |
| GCG_EXPORT std::string | GCGconshdlrDecompGetDetectorHistoryByPartialdecId (GCG *gcg, int id) |
| gets detector history of partialdec with given id | |
Function Documentation
◆ GCGconshdlrDecompGetPartialdecs()
| GCG_EXPORT std::vector< gcg::PARTIALDECOMP * > * GCGconshdlrDecompGetPartialdecs | ( | GCG * | gcg | ) |
gets vector of all partialdecs
- Returns
- finished partialdecs
- Parameters
-
gcg GCG data structure
Definition at line 4397 of file cons_decomp.cpp.
References assert(), GCGconshdlrDecompGetPartialdecs(), getConshdlrdata(), and SCIP_ConshdlrData::partialdecs.
Referenced by GCGconshdlrDecompGetPartialdecs(), and gcg::updatePartialdecList().
◆ GCGgetPartialdecToWrite()
| GCG_EXPORT gcg::PARTIALDECOMP * GCGgetPartialdecToWrite | ( | GCG * | gcg, |
| SCIP_Bool | transformed ) |
Definition at line 2441 of file cons_decomp.cpp.
References assert(), GCGconshdlrDecompAddMatrixPartialdec(), GCGconshdlrDecompChooseCandidatesFromSelected(), GCGconshdlrDecompGetPartialdecFromID(), GCGgetPartialdecToWrite(), getConshdlrdata(), and SCIP_ConshdlrData::partialdectowrite.
Referenced by GCGgetPartialdecToWrite(), SCIP_DECL_READERWRITE(), SCIP_DECL_READERWRITE(), SCIP_DECL_READERWRITE(), and SCIP_DECL_READERWRITE().
◆ GCGconshdlrDecompGetPartialdecFromID()
| GCG_EXPORT gcg::PARTIALDECOMP * GCGconshdlrDecompGetPartialdecFromID | ( | GCG * | scip, |
| int | partialdecid ) |
local method to find a partialdec for a given id or NULL if no partialdec with such id is found
- Returns
- partialdec pointer of partialdec with given id or NULL if it does not exist
- Note
- returns NULL if no partialdec by this id is known
- Parameters
-
scip GCG data structure partialdecid partialdec id
Definition at line 281 of file cons_decomp.cpp.
References GCGconshdlrDecompGetPartialdecFromID(), getConshdlrdata(), and SCIP_ConshdlrData::partialdecsbyid.
Referenced by buildProblem(), checkIdenticalBlocks(), GCG_DECL_SCORECALC(), GCG_DECL_SCORECALC(), GCG_DECL_SCORECALC(), GCG_DECL_SCORECALC(), GCG_DECL_SCORECALC(), GCG_DECL_SCORECALC(), GCG_DECL_SCORECALC(), GCG_DECL_SCORECALC(), GCG_DECL_SCORECALC(), GCGconshdlrDecompCheckConsistency(), GCGconshdlrDecompChooseCandidatesFromSelected(), GCGconshdlrDecompCreateVarmapForPartialdec(), GCGconshdlrDecompGetNextPartialdecID(), GCGconshdlrDecompGetPartialdecFromID(), GCGconshdlrDecompGetPartialdecFromID(), GCGgetPartialdecToWrite(), GCGWriteGpDecompMatrix(), GCGwriteGpVisualizationFormat(), GCGwriteTexReport(), and GCGwriteTexVisualization().
◆ GCGconshdlrDecompAddPreexisitingPartialDec() [1/2]
| GCG_EXPORT SCIP_RETCODE GCGconshdlrDecompAddPreexisitingPartialDec | ( | GCG * | gcg, |
| gcg::PARTIALDECOMP * | partialdec ) |
adds a preexisting partial dec to be considered at the beginning of the detection
- Note
- refines the partialdec to be consistent, adds meta data/statistics, completes partial dec by assigning open conss to master if USERGIVEN::COMPLETED_CONSTOMASTER is set
- Returns
- SCIP return code
- Parameters
-
gcg GCG data structure partialdec partial dec to add
Definition at line 3133 of file cons_decomp.cpp.
References GCGconshdlrDecompAddPreexisitingPartialDec().
Referenced by gcg::BLOCK_STRUCTURE::createPartialdec(), GCGconshdlrDecompAddPreexisitingPartialDec(), GCGconshdlrDecompAddPreexisitingPartialDec(), GCGconshdlrDecompAddPreexistingDecomp(), readBLKFile(), readDECFile(), and readJDec().
◆ GCGconshdlrDecompAddPreexisitingPartialDec() [2/2]
| GCG_EXPORT SCIP_RETCODE GCGconshdlrDecompAddPreexisitingPartialDec | ( | GCG * | gcg, |
| gcg::PARTIALDECOMP * | partialdec, | ||
| SCIP_Bool | addpartialdec ) |
adds a preexisting partial dec to be considered at the beginning of the detection
- Note
- refines the partialdec to be consistent, adds meta data/statistics, completes partial dec by assigning open conss to master if USERGIVEN::COMPLETED_CONSTOMASTER is set
- Returns
- SCIP return code
- Parameters
-
gcg GCG data structure partialdec partial dec to add addpartialdec if completed, add partial dec as well
Definition at line 3142 of file cons_decomp.cpp.
References addPartialdec(), assert(), gcg::PARTIALDECOMP::considerImplicits(), SCIP_ConshdlrData::detprobdataorig, SCIP_ConshdlrData::detprobdatapres, gcg::PARTIALDECOMP::fixConsToMaster(), GCGconshdlrDecompAddPreexisitingPartialDec(), GCGconshdlrDecompFindScore(), GCGgetOrigprob(), getConshdlrdata(), gcg::PARTIALDECOMP::getNBlocks(), gcg::PARTIALDECOMP::getNConssForBlock(), gcg::PARTIALDECOMP::getNLinkingvars(), gcg::PARTIALDECOMP::getNMasterconss(), gcg::PARTIALDECOMP::getNMastervars(), gcg::PARTIALDECOMP::getNVarsForBlock(), gcg::PARTIALDECOMP::getOpenconss(), gcg::PARTIALDECOMP::getScore(), gcg::PARTIALDECOMP::getUsergiven(), gcg::PARTIALDECOMP::isAssignedToOrigProb(), gcg::PARTIALDECOMP::isComplete(), gcg::PARTIAL, gcg::PARTIALDECOMP::prepare(), gcg::PARTIALDECOMP::setUsergiven(), gcg::PARTIALDECOMP::shouldCompletedByConsToMaster(), and gcg::DETPROBDATA::translatePartialdecs().
◆ GCGconshdlrDecompDeregisterPartialdec()
| GCG_EXPORT void GCGconshdlrDecompDeregisterPartialdec | ( | GCG * | gcg, |
| gcg::PARTIALDECOMP * | partialdec ) |
deregisters a partialdec in the conshdlr
Use this function at deletion of the partialdec. The partialdec is not destroyed in this function, the conshdlr will not know that it exists.
- Parameters
-
gcg GCG data structure partialdec the partialdec
Definition at line 3774 of file cons_decomp.cpp.
References assert(), GCGconshdlrDecompDeregisterPartialdec(), getConshdlrdata(), gcg::PARTIALDECOMP::getID(), i, SCIP_ConshdlrData::partialdecs, and SCIP_ConshdlrData::partialdecsbyid.
Referenced by GCGconshdlrDecompDeregisterPartialdec(), and gcg::PARTIALDECOMP::~PARTIALDECOMP().
◆ GCGconshdlrDecompRegisterPartialdec()
| GCG_EXPORT void GCGconshdlrDecompRegisterPartialdec | ( | GCG * | gcg, |
| gcg::PARTIALDECOMP * | partialdec ) |
registers a partialdec in the conshdlr
Use this function at initialization of the partialdec. If the partialdec already exists in the conshdlr it is ignored.
- Parameters
-
gcg GCG data structure partialdec the partialdec to register
Definition at line 4568 of file cons_decomp.cpp.
References GCGconshdlrDecompRegisterPartialdec(), getConshdlrdata(), gcg::PARTIALDECOMP::getID(), SCIP_ConshdlrData::partialdecs, and SCIP_ConshdlrData::partialdecsbyid.
Referenced by GCGconshdlrDecompRegisterPartialdec(), gcg::PARTIALDECOMP::PARTIALDECOMP(), and gcg::PARTIALDECOMP::PARTIALDECOMP().
◆ GCGconshdlrDecompGetDetprobdataOrig()
| GCG_EXPORT gcg::DETPROBDATA * GCGconshdlrDecompGetDetprobdataOrig | ( | GCG * | gcg | ) |
help method to access detprobdata for unpresolved problem
- Returns
- pointer to detprobdata in wrapper data structure
- Parameters
-
gcg GCG data structure
Definition at line 3962 of file cons_decomp.cpp.
References assert(), SCIP_ConshdlrData::detprobdataorig, GCGconshdlrDecompGetDetprobdataOrig(), GCGconshdlrDecompOrigDetprobdataExists(), getConshdlrdata(), and resetDetprobdata().
Referenced by buildProblem(), calculateDualvalsOptimalOrigLP(), createPartialdecFromDecomp(), GCG_DECL_CONSCLASSIFY(), GCG_DECL_CONSCLASSIFY(), GCG_DECL_CONSCLASSIFY(), GCG_DECL_CONSCLASSIFY(), GCG_DECL_CONSCLASSIFY(), GCG_DECL_CONSCLASSIFY(), GCG_DECL_CONSCLASSIFY(), GCG_DECL_VARCLASSIFY(), GCG_DECL_VARCLASSIFY(), GCG_DECL_VARCLASSIFY(), GCG_DECL_VARCLASSIFY(), GCG_DECL_VARCLASSIFY(), GCGconshdlrDecompGetDetprobdataOrig(), gcg::PARTIALDECOMP::getDetprobdata(), shuffleDualvalsRandom(), and writeCls().
◆ GCGconshdlrDecompGetDetprobdataPresolved()
| GCG_EXPORT gcg::DETPROBDATA * GCGconshdlrDecompGetDetprobdataPresolved | ( | GCG * | gcg | ) |
help method to access detprobdata for transformed problem
- Returns
- pointer to detprobdata in wrapper data structure
- Parameters
-
gcg GCG data structure
Definition at line 3976 of file cons_decomp.cpp.
References assert(), SCIP_ConshdlrData::detprobdatapres, GCGconshdlrDecompGetDetprobdataPresolved(), GCGconshdlrDecompPresolvedDetprobdataExists(), getConshdlrdata(), and resetDetprobdata().
Referenced by calculateDualvalsOptimalOrigLP(), createPartialdecFromDecomp(), GCG_DECL_CONSCLASSIFY(), GCG_DECL_CONSCLASSIFY(), GCG_DECL_CONSCLASSIFY(), GCG_DECL_CONSCLASSIFY(), GCG_DECL_CONSCLASSIFY(), GCG_DECL_CONSCLASSIFY(), GCG_DECL_CONSCLASSIFY(), GCG_DECL_VARCLASSIFY(), GCG_DECL_VARCLASSIFY(), GCG_DECL_VARCLASSIFY(), GCG_DECL_VARCLASSIFY(), GCG_DECL_VARCLASSIFY(), GCGconshdlrDecompGetDetprobdataPresolved(), gcg::PARTIALDECOMP::getDetprobdata(), shuffleDualvalsRandom(), and writeCls().
◆ GCGconshdlrDecompChooseCandidatesFromSelected()
| GCG_EXPORT SCIP_RETCODE GCGconshdlrDecompChooseCandidatesFromSelected | ( | GCG * | gcg, |
| std::vector< std::pair< gcg::PARTIALDECOMP *, SCIP_Real > > & | candidates, | ||
| SCIP_Bool | original, | ||
| SCIP_Bool | printwarnings ) |
initilizes the candidates data structures with selected partialdecs
initializes it with all if there are no selected partialdecs, sort them according to the current scoretype
- Parameters
-
gcg GCG data structure candidates tuples of partialdecs and scores will be added to this vector (sorted w.r.t. the scores). original choose candidates for the original problem? printwarnings should warnings be printed?
- Returns
- SCIP return code
References GCG_EXPORT, and GCGconshdlrDecompChooseCandidatesFromSelected().
◆ GCGconshdlrDecompGetDetectorHistoryByPartialdecId()
| GCG_EXPORT std::string GCGconshdlrDecompGetDetectorHistoryByPartialdecId | ( | GCG * | gcg, |
| int | id ) |
gets detector history of partialdec with given id
- Returns
- detector history of partialdec as string
- Parameters
-
gcg GCG data structure id id of partialdec
References GCGconshdlrDecompGetDetectorHistoryByPartialdecId().
Referenced by GCGconshdlrDecompGetDetectorHistoryByPartialdecId().