Detailed Description
class to manage the detection process and data for one coefficient matrix of a MIP, usually there is one detprobdata for the original and one detprobdata for the presolved problem
Definition at line 106 of file class_detprobdata.h.
#include <class_detprobdata.h>
Public Member Functions | |
DETPROBDATA (SCIP *scip, SCIP_Bool _originalProblem) | |
constructor More... | |
~DETPROBDATA () | |
void | addConsPartition (ConsPartition *partition) |
adds a constraint partition if it is no duplicate of an existing constraint partition More... | |
void | addCandidatesNBlocksNVotes (int candidate, int nvotes) |
adds a candidate for block number and counts how often a candidate is added More... | |
void | addPartialdecToAncestor (PARTIALDECOMP *partialdec) |
adds a partialdec to ancestor partialdecs More... | |
bool | addPartialdecToOpen (PARTIALDECOMP *partialdec) |
adds a partialdec to current partialdecs (data structure for partialdecs that are goin to processed in the propagation rounds) More... | |
bool | addPartialdecToFinished (PARTIALDECOMP *partialdec) |
adds a partialdec to finished partialdecs More... | |
void | addPartialdecToFinishedUnchecked (PARTIALDECOMP *partialdec) |
adds a partialdec to finished partialdecs without checking for duplicates, dev has to check this on his own More... | |
void | addVarPartition (VarPartition *partition) |
adds a variable partition if it is no duplicate of an existing variable partition More... | |
void | clearAncestorPartialdecs () |
clears ancestor partialdec data structure, More... | |
void | clearCurrentPartialdecs () |
clears current partialdec data structure More... | |
void | clearFinishedPartialdecs () |
clears finished partialdec data structure More... | |
void | createConssAdjacency () |
create the constraint adjacency datastructure that is used (if created) for some methods to faster access the constarints that have variables in common More... | |
void | freeTemporaryData () |
frees temporary data that is only needed during the detection process More... | |
PARTIALDECOMP * | getAncestorPartialdec (int partialdecindex) |
returns a partialdec from ancestor partialdec data structure with given index More... | |
ConsPartition * | getConsPartition (int partitionIndex) |
returns pointer to a constraint partition More... | |
SCIP_CONS * | getCons (int consIndex) |
returns the SCIP constraint related to a constraint index More... | |
std::vector< int > & | getConssForCons (int consIndex) |
return array of constraint indices that have a common variable with the given constraint More... | |
std::vector< int > & | getConssForVar (int varIndex) |
returns the constraint indices of the coefficient matrix for a variable More... | |
std::vector< PARTIALDECOMP * > & | getOpenPartialdecs () |
determines all partialdecs from current (open) partialdec data structure More... | |
PARTIALDECOMP * | getFinishedPartialdec (int partialdecindex) |
returns a partialdec from finished partialdec data structure More... | |
std::vector< PARTIALDECOMP * > & | getFinishedPartialdecs () |
gets all finished partialdecs More... | |
int | getIndexForCons (SCIP_CONS *cons) |
returns the constraint index related to a SCIP constraint More... | |
int | getIndexForCons (const char *consname) |
returns the constraint index related to a SCIP constraint More... | |
int | getIndexForVar (SCIP_VAR *var) |
returns the variable index related to a SCIP variable More... | |
int | getIndexForVar (const char *varname) |
returns the variable index related to a SCIP variable More... | |
int | getNAncestorPartialdecs () |
returns size of ancestor partialdec data structure More... | |
int | getNConsPartitions () |
returns number of different constraint partitions More... | |
int | getNConss () |
returns the number of variables considered in the detprobdata More... | |
int | getNConssForCons (int consIndex) |
returns the number of constraints for a given constraint More... | |
int | getNConssForVar (int varIndex) |
returns the number of constraints for a given variable where the var has a nonzero entry in More... | |
int | getNOpenPartialdecs () |
returns size of current (open) partialdec data structure More... | |
int | getNFinishedPartialdecs () |
int | getNPartialdecs () |
int | getNNonzeros () |
returns the number of nonzero entries in the coefficient matrix More... | |
int | getNVarPartitions () |
returns number of different variable partitions More... | |
int | getNVars () |
return the number of variables considered in the detprobdata More... | |
int | getNVarsForCons (int consIndex) |
returns the number of variables for a given constraint More... | |
std::vector< SCIP_VAR * > | getOrigVarsFixedZero () |
returns pointers to all orig vars that are fixed to zero More... | |
std::vector< SCIP_CONS * > | getRelevantConss () |
returns pointers to all constraints that are not marked as deleted or obsolete More... | |
std::vector< SCIP_VAR * > | getRelevantVars () |
returns pointers to all problem vars that are not fixed to 0 More... | |
SCIP * | getScip () |
returns the corresponding scip data structure More... | |
void | getSortedCandidatesNBlocks (std::vector< int > &candidates) |
gets the candidates for number of blocks added by the user followed by the found ones sorted in descending order by how often a candidate was proposed More... | |
SCIP_Real | getVal (int row, int col) |
returns a coefficient from the coefficient matrix More... | |
std::vector< SCIP_Real > & | getValsForCons (int consIndex) |
returns the nonzero coefficients of the coefficient matrix for a constraint More... | |
VarPartition * | getVarPartition (int partitionIndex) |
returns pointer to a variable partition with given index More... | |
std::vector< VarPartition * > | getVarPartitions () |
returns vector to stored variable partitions More... | |
SCIP_VAR * | getVar (int varIndex) |
returns SCIP variable related to a variable index More... | |
std::vector< int > & | getVarsForCons (int consIndex) |
returns the variable indices of the coefficient matrix for a constraint More... | |
bool | isConsCardinalityCons (int consindexd) |
returns whether a constraint is a cardinality constraint, i.e. of the \(\sum_{i} x_i = b\) More... | |
SCIP_Bool | isConssAdjInitialized () |
determines whether or not the constraint-constraint adjacency data structure is initilized More... | |
bool | isConsSetpp (int consindexd) |
is cons with specified indec partitioning, or packing covering constraint? More... | |
bool | isConsSetppc (int consindexd) |
is cons with specified index partitioning packing, or covering constraint? More... | |
SCIP_Bool | isFiniteNonnegativeIntegral (SCIP *scip, SCIP_Real x) |
is constraint ranged row, i.e., -inf < lhs < rhs < inf? More... | |
SCIP_Bool | isPartialdecDuplicateofFinished (PARTIALDECOMP *partialdec) |
check if partialdec is a duplicate of an existing finished partialdec More... | |
SCIP_Bool | isAssignedToOrigProb () |
returns true if the matrix structure corresponds to the presolved problem More... | |
SCIP_Bool | isRangedRow (SCIP *scip, SCIP_Real lhs, SCIP_Real rhs) |
is constraint ranged row, i.e., -inf < lhs < rhs < inf? More... | |
SCIP_Bool | partialdecIsNoDuplicateOfPartialdecs (PARTIALDECOMP *comppartialdec, std::vector< PARTIALDECOMP * > const &partialdecs, bool sort) |
check if partialdec is a duplicate of any given partialdecs More... | |
void | printBlockcandidateInformation (SCIP *scip, FILE *file) |
output method for json file writer to write block candidate information More... | |
void | printPartitionInformation (FILE *file) |
output method for json file writer to write partition candidate information More... | |
void | sortFinishedForScore () |
sorts partialdecs in finished partialdecs data structure according to the current scoretype More... | |
std::vector< PARTIALDECOMP * > | translatePartialdecs (DETPROBDATA *otherdata, std::vector< PARTIALDECOMP * > otherpartialdecs) |
translates partialdecs if the index structure of the problem has changed, e.g. due to presolving More... | |
std::vector< PARTIALDECOMP * > | translatePartialdecs (DETPROBDATA *otherdata) |
translates partialdecs if the index structure of the problem has changed, e.g. due to presolving More... | |
Data Fields | |
std::vector< std::pair< int, int > > | candidatesNBlocks |
std::vector< ConsPartition * > | conspartitioncollection |
std::vector< VarPartition * > | varpartitioncollection |
SCIP_Real | classificationtime |
SCIP_Real | nblockscandidatescalctime |
SCIP_Real | postprocessingtime |
SCIP_Real | translatingtime |
Constructor & Destructor Documentation
◆ DETPROBDATA()
gcg::DETPROBDATA::DETPROBDATA | ( | SCIP * | scip, |
SCIP_Bool | _originalProblem | ||
) |
constructor
- Parameters
-
scip SCIP data structure _originalProblem true iff the detprobdata is created for the presolved problem
Definition at line 307 of file class_detprobdata.cpp.
References createConssAdjacency(), GCGconsGetNVars(), GCGconsGetVals(), GCGconsGetVars(), getNConss(), and gcg::varIsFixedToZero().
◆ ~DETPROBDATA()
gcg::DETPROBDATA::~DETPROBDATA | ( | ) |
destructor
Definition at line 449 of file class_detprobdata.cpp.
References conspartitioncollection, GCGconshdlrDecompDeregisterPartialdecs(), getCons(), and varpartitioncollection.
Member Function Documentation
◆ addConsPartition()
void gcg::DETPROBDATA::addConsPartition | ( | ConsPartition * | partition | ) |
adds a constraint partition if it is no duplicate of an existing constraint partition
- Parameters
-
partition conspartition to be added
Definition at line 505 of file class_detprobdata.cpp.
References conspartitioncollection, gcg::IndexPartition::getName(), and partition().
Referenced by DEC_DECL_CONSCLASSIFY(), and reduceConsclasses().
◆ addCandidatesNBlocksNVotes()
void gcg::DETPROBDATA::addCandidatesNBlocksNVotes | ( | int | candidate, |
int | nvotes | ||
) |
adds a candidate for block number and counts how often a candidate is added
- Parameters
-
candidate candidate for block size nvotes number of votes this candidates will get
Definition at line 479 of file class_detprobdata.cpp.
References candidatesNBlocks.
◆ addPartialdecToAncestor()
void gcg::DETPROBDATA::addPartialdecToAncestor | ( | PARTIALDECOMP * | partialdec | ) |
adds a partialdec to ancestor partialdecs
- Parameters
-
partialdec partialdec that is added to the ancestor partialdecs
Definition at line 538 of file class_detprobdata.cpp.
Referenced by detect().
◆ addPartialdecToOpen()
bool gcg::DETPROBDATA::addPartialdecToOpen | ( | PARTIALDECOMP * | partialdec | ) |
adds a partialdec to current partialdecs (data structure for partialdecs that are goin to processed in the propagation rounds)
- Parameters
-
partialdec pointer of partialdec to be added
- Returns
- TRUE if the partialdecs was successfully added (i.e. it is no duplicate of a known partialdec)
Definition at line 546 of file class_detprobdata.cpp.
References gcg::PARTIALDECOMP::checkConsistency(), and partialdecIsNoDuplicateOfPartialdecs().
Referenced by detect().
◆ addPartialdecToFinished()
bool gcg::DETPROBDATA::addPartialdecToFinished | ( | PARTIALDECOMP * | partialdec | ) |
adds a partialdec to finished partialdecs
- Parameters
-
partialdec pointer of partialdec that is going to be added to the finished partialdecs (data structure to carry finished decompositions)
- Returns
- TRUE if the partialdecs was successfully added (i.e. it is no duplicate of a known partialdec)
Definition at line 563 of file class_detprobdata.cpp.
References gcg::PARTIALDECOMP::checkConsistency(), gcg::PARTIALDECOMP::isComplete(), and partialdecIsNoDuplicateOfPartialdecs().
Referenced by detect().
◆ addPartialdecToFinishedUnchecked()
void gcg::DETPROBDATA::addPartialdecToFinishedUnchecked | ( | PARTIALDECOMP * | partialdec | ) |
adds a partialdec to finished partialdecs without checking for duplicates, dev has to check this on his own
- Parameters
-
partialdec pointer of partialdec that is going to be added unchecked to the finished partialdecs (data structure to carry finished decompositions)
- See also
- addPartialdecToFinished()
Definition at line 580 of file class_detprobdata.cpp.
References gcg::PARTIALDECOMP::checkConsistency().
Referenced by GCGconshdlrDecompAddMatrixPartialdec().
◆ addVarPartition()
void gcg::DETPROBDATA::addVarPartition | ( | VarPartition * | partition | ) |
adds a variable partition if it is no duplicate of an existing variable partition
- Parameters
-
partition varpartition to be added
Definition at line 589 of file class_detprobdata.cpp.
References gcg::IndexPartition::getName(), partition(), and varpartitioncollection.
Referenced by DEC_DECL_VARCLASSIFY(), and reduceVarclasses().
◆ clearAncestorPartialdecs()
void gcg::DETPROBDATA::clearAncestorPartialdecs | ( | ) |
clears ancestor partialdec data structure,
- Note
- does not free the partialdecs themselves
Definition at line 623 of file class_detprobdata.cpp.
◆ clearCurrentPartialdecs()
void gcg::DETPROBDATA::clearCurrentPartialdecs | ( | ) |
clears current partialdec data structure
- Note
- does not free the partialdecs themselves
Definition at line 629 of file class_detprobdata.cpp.
◆ clearFinishedPartialdecs()
void gcg::DETPROBDATA::clearFinishedPartialdecs | ( | ) |
clears finished partialdec data structure
- Note
- does not free the partialdecs themselves
Definition at line 635 of file class_detprobdata.cpp.
◆ createConssAdjacency()
void gcg::DETPROBDATA::createConssAdjacency | ( | ) |
create the constraint adjacency datastructure that is used (if created) for some methods to faster access the constarints that have variables in common
Definition at line 641 of file class_detprobdata.cpp.
Referenced by gcg::PARTIALDECOMP::assignSmallestComponentsButOneConssAdjacency(), DEC_DECL_FINISHPARTIALDEC(), DEC_DECL_POSTPROCESSPARTIALDEC(), DEC_DECL_PROPAGATEPARTIALDEC(), and DETPROBDATA().
◆ freeTemporaryData()
void gcg::DETPROBDATA::freeTemporaryData | ( | ) |
frees temporary data that is only needed during the detection process
Definition at line 672 of file class_detprobdata.cpp.
◆ getAncestorPartialdec()
PARTIALDECOMP * gcg::DETPROBDATA::getAncestorPartialdec | ( | int | partialdecindex | ) |
returns a partialdec from ancestor partialdec data structure with given index
- Returns
- partialdec from ancestor partialdec data structure
- Parameters
-
partialdecindex index of partialdec in ancestor partialdec data structure
Definition at line 678 of file class_detprobdata.cpp.
◆ getConsPartition()
ConsPartition * gcg::DETPROBDATA::getConsPartition | ( | int | partitionIndex | ) |
returns pointer to a constraint partition
- Returns
- pointer to a cosntraint partition with the given index
- Parameters
-
partitionIndex index of constraint partition
Definition at line 688 of file class_detprobdata.cpp.
References conspartitioncollection.
Referenced by reduceConsclasses().
◆ getCons()
SCIP_CONS * gcg::DETPROBDATA::getCons | ( | int | consIndex | ) |
returns the SCIP constraint related to a constraint index
- Returns
- the SCIP constraint related to a constraint index
- Parameters
-
consIndex index of the constraint to be considered
Definition at line 698 of file class_detprobdata.cpp.
Referenced by calculateDualvalsOptimalOrigLP(), gcg::BipartiteGraph< T >::createFromPartialMatrix(), gcg::HyperrowcolGraph< T >::createFromPartialMatrix(), gcg::HypercolGraph< T >::createFromPartialMatrix(), gcg::HyperrowGraph< T >::createFromPartialMatrix(), createGraph(), createGraphNewDetection(), createPartialdecFromDecomp(), createPartialdecFromMasterconss(), createTestPricingprobConss(), DEC_DECL_CONSCLASSIFY(), detectIsomorph(), gcg::PARTIALDECOMP::displayInfo(), fhook(), fhookForPartialdecs(), GCGwriteCls(), gcg::PARTIALDECOMP::getScore(), gcg::PARTIALDECOMP::hasSetppccardMaster(), setupArrays(), setuparraysnewdetection(), shuffleDualvalsRandom(), writePartialdec(), and ~DETPROBDATA().
◆ getConssForCons()
std::vector< int > & gcg::DETPROBDATA::getConssForCons | ( | int | consIndex | ) |
return array of constraint indices that have a common variable with the given constraint
- Returns
- return vector of constraint indices that have a common variable with the given constraint
- Note
- constraint adjacency data structure has to initilized
- Parameters
-
consIndex index of the constraint to be considered
Definition at line 706 of file class_detprobdata.cpp.
Referenced by gcg::PARTIALDECOMP::assignSmallestComponentsButOneConssAdjacency(), and gcg::PARTIALDECOMP::completeByConnectedConssAdjacency().
◆ getConssForVar()
std::vector< int > & gcg::DETPROBDATA::getConssForVar | ( | int | varIndex | ) |
returns the constraint indices of the coefficient matrix for a variable
- Returns
- vector of constraint indices that have a nonzero entry with this variable
- Parameters
-
varIndex index of the variable to be considered
Definition at line 714 of file class_detprobdata.cpp.
Referenced by gcg::PARTIALDECOMP::completeByConnected(), gcg::PARTIALDECOMP::completeGreedily(), connected(), gcg::PARTIALDECOMP::considerImplicits(), gcg::HypercolGraph< T >::createFromPartialMatrix(), createGraphFromPartialMatrix(), gcg::PARTIALDECOMP::findVarsLinkingToMaster(), gcg::PARTIALDECOMP::findVarsLinkingToStairlinking(), GCGconshdlrDecompCalcBendersScore(), GCGconshdlrDecompCalcMaxForseeingWhiteScore(), and GCGconshdlrDecompCalcStrongDecompositionScore().
◆ getOpenPartialdecs()
std::vector< PARTIALDECOMP * > & gcg::DETPROBDATA::getOpenPartialdecs | ( | ) |
determines all partialdecs from current (open) partialdec data structure
- Returns
- all partialdecs in current (open) partialdec data structure
Definition at line 722 of file class_detprobdata.cpp.
Referenced by detect(), and translatePartialdecs().
◆ getFinishedPartialdec()
PARTIALDECOMP * gcg::DETPROBDATA::getFinishedPartialdec | ( | int | partialdecindex | ) |
returns a partialdec from finished partialdec data structure
- Returns
- partialdec from finished partialdec data structure
- Parameters
-
partialdecindex index of partialdec in finished partialdec data structure
Definition at line 728 of file class_detprobdata.cpp.
◆ getFinishedPartialdecs()
std::vector< PARTIALDECOMP * > & gcg::DETPROBDATA::getFinishedPartialdecs | ( | ) |
gets all finished partialdecs
- Returns
- all finished partialdecs
Definition at line 738 of file class_detprobdata.cpp.
Referenced by detect(), and translatePartialdecs().
◆ getIndexForCons() [1/2]
int gcg::DETPROBDATA::getIndexForCons | ( | SCIP_CONS * | cons | ) |
returns the constraint index related to a SCIP constraint
- Parameters
-
cons the SCIP constraint pointer the index is asked for
- Returns
- the constraint index related to a SCIP constraint
Definition at line 744 of file class_detprobdata.cpp.
Referenced by createPartialdecFromDecomp(), gcg::HyperrowcolGraph< T >::createPartialdecFromPartition(), gcg::HyperrowGraph< T >::createPartialdecFromPartition(), gcg::HypercolGraph< T >::createPartialdecFromPartition(), gcg::PARTIALDECOMP::fixConsToBlock(), gcg::PARTIALDECOMP::fixConsToBlockByName(), gcg::PARTIALDECOMP::fixConsToMaster(), gcg::PARTIALDECOMP::fixConsToMasterByName(), getIndexForCons(), readBlockconss(), and readMasterconss().
◆ getIndexForCons() [2/2]
int gcg::DETPROBDATA::getIndexForCons | ( | const char * | consname | ) |
returns the constraint index related to a SCIP constraint
- Parameters
-
consname name of the constraint the index is asked for
- Returns
- the constraint index related to a SCIP constraint
Definition at line 753 of file class_detprobdata.cpp.
References getIndexForCons().
◆ getIndexForVar() [1/2]
int gcg::DETPROBDATA::getIndexForVar | ( | SCIP_VAR * | var | ) |
returns the variable index related to a SCIP variable
- Parameters
-
var variable pointer the index is asked for
- Returns
- the variable index related to a SCIP variable
Definition at line 776 of file class_detprobdata.cpp.
Referenced by createPartialdecFromDecomp(), gcg::PARTIALDECOMP::fixVarToBlockByName(), gcg::PARTIALDECOMP::fixVarToLinkingByName(), gcg::PARTIALDECOMP::fixVarToMasterByName(), GCGconshdlrDecompCreateVarmapForPartialdecId(), and getIndexForVar().
◆ getIndexForVar() [2/2]
int gcg::DETPROBDATA::getIndexForVar | ( | const char * | varname | ) |
returns the variable index related to a SCIP variable
- Parameters
-
varname name of the variable the index is asked for
- Returns
- the variable index related to a SCIP variable
Definition at line 768 of file class_detprobdata.cpp.
References getIndexForVar().
◆ getNAncestorPartialdecs()
int gcg::DETPROBDATA::getNAncestorPartialdecs | ( | ) |
returns size of ancestor partialdec data structure
- Returns
- size of ancestor partialdec data structure
Definition at line 784 of file class_detprobdata.cpp.
◆ getNConsPartitions()
int gcg::DETPROBDATA::getNConsPartitions | ( | ) |
returns number of different constraint partitions
- Returns
- number of different constraint partitions
Definition at line 790 of file class_detprobdata.cpp.
References conspartitioncollection.
Referenced by reduceConsclasses().
◆ getNConss()
int gcg::DETPROBDATA::getNConss | ( | ) |
returns the number of variables considered in the detprobdata
- Returns
- number of variables considered in the detprobdata
Definition at line 796 of file class_detprobdata.cpp.
Referenced by connected(), createGraphFromPartialMatrix(), createPartialdecFromDecomp(), createPartialdecFromMasterconss(), createTestPricingprobConss(), DEC_DECL_CONSCLASSIFY(), DEC_DECL_PROPAGATEPARTIALDEC(), detection(), DETPROBDATA(), gcg::PARTIALDECOMP::filloutBorderFromConstoblock(), gcg::PARTIALDECOMP::filloutPartialdecFromConstoblock(), GCGconshdlrDecompAddMatrixPartialdec(), GCGconshdlrDecompCalcCandidatesNBlocks(), GCGwriteCls(), gcg::PARTIALDECOMP::PARTIALDECOMP(), printPartitionInformation(), reduceConsclasses(), reduceVarclasses(), AUT_HOOK2::setNewDetectionStuff(), struct_hook::struct_hook(), and writePartialdec().
◆ getNConssForCons()
int gcg::DETPROBDATA::getNConssForCons | ( | int | consIndex | ) |
returns the number of constraints for a given constraint
- Returns
- the number of constraints for a given constraint
- Parameters
-
consIndex index of the constraint to be considered
Definition at line 802 of file class_detprobdata.cpp.
Referenced by DEC_DECL_PROPAGATEPARTIALDEC().
◆ getNConssForVar()
int gcg::DETPROBDATA::getNConssForVar | ( | int | varIndex | ) |
returns the number of constraints for a given variable where the var has a nonzero entry in
- Returns
- the number of constraints for a given variable
- Parameters
-
varIndex index of the variable to be considered
Definition at line 810 of file class_detprobdata.cpp.
Referenced by gcg::PARTIALDECOMP::completeGreedily(), connected(), gcg::PARTIALDECOMP::considerImplicits(), gcg::HypercolGraph< T >::createFromPartialMatrix(), createGraphFromPartialMatrix(), gcg::PARTIALDECOMP::findVarsLinkingToMaster(), gcg::PARTIALDECOMP::findVarsLinkingToStairlinking(), GCGconshdlrDecompCalcBendersScore(), GCGconshdlrDecompCalcMaxForseeingWhiteScore(), and GCGconshdlrDecompCalcStrongDecompositionScore().
◆ getNOpenPartialdecs()
int gcg::DETPROBDATA::getNOpenPartialdecs | ( | ) |
returns size of current (open) partialdec data structure
- Returns
- size of current (open) partialdec data structure
Definition at line 818 of file class_detprobdata.cpp.
◆ getNFinishedPartialdecs()
int gcg::DETPROBDATA::getNFinishedPartialdecs | ( | ) |
returns size of finished partialdec data structure
- Returns
- size of finished partialdec data structure
Definition at line 824 of file class_detprobdata.cpp.
Referenced by detect().
◆ getNPartialdecs()
int gcg::DETPROBDATA::getNPartialdecs | ( | ) |
returns the number of stored partialdecs
- Returns
- number of stored partialdecs
Definition at line 830 of file class_detprobdata.cpp.
◆ getNNonzeros()
int gcg::DETPROBDATA::getNNonzeros | ( | ) |
returns the number of nonzero entries in the coefficient matrix
- Returns
- the number of nonzero entries in the coefficient matrix
Definition at line 836 of file class_detprobdata.cpp.
◆ getNVarPartitions()
int gcg::DETPROBDATA::getNVarPartitions | ( | ) |
returns number of different variable partitions
- Returns
- number of different variable partitions
Definition at line 842 of file class_detprobdata.cpp.
References varpartitioncollection.
Referenced by reduceVarclasses().
◆ getNVars()
int gcg::DETPROBDATA::getNVars | ( | ) |
return the number of variables considered in the detprobdata
- Returns
- the number of variables considered in the detprobdata
Definition at line 848 of file class_detprobdata.cpp.
Referenced by connected(), createPartialdecFromDecomp(), DEC_DECL_VARCLASSIFY(), gcg::PARTIALDECOMP::filloutBorderFromConstoblock(), gcg::PARTIALDECOMP::filloutPartialdecFromConstoblock(), GCGconshdlrDecompAddMatrixPartialdec(), GCGconshdlrDecompCalcCandidatesNBlocks(), GCGwriteCls(), gcg::PARTIALDECOMP::PARTIALDECOMP(), printPartitionInformation(), reduceConsclasses(), reduceVarclasses(), and writePartialdec().
◆ getNVarsForCons()
int gcg::DETPROBDATA::getNVarsForCons | ( | int | consIndex | ) |
returns the number of variables for a given constraint
- Returns
- the number of variables for a given constraint
- Parameters
-
consIndex index of the constraint to be considered
Definition at line 854 of file class_detprobdata.cpp.
Referenced by gcg::PARTIALDECOMP::checkConsistency(), gcg::PARTIALDECOMP::completeGreedily(), connected(), gcg::PARTIALDECOMP::considerImplicits(), gcg::BipartiteGraph< T >::createFromPartialMatrix(), gcg::HyperrowcolGraph< T >::createFromPartialMatrix(), gcg::RowGraphWeighted< T >::createFromPartialMatrix(), gcg::HypercolGraph< T >::createFromPartialMatrix(), gcg::HyperrowGraph< T >::createFromPartialMatrix(), createGraph(), createGraphFromPartialMatrix(), createGraphNewDetection(), createPartialdecFromMasterconss(), gcg::RowGraph< T >::createPartialdecFromPartition(), gcg::HyperrowcolGraph< T >::createPartialdecFromPartition(), gcg::HyperrowGraph< T >::createPartialdecFromPartition(), gcg::HypercolGraph< T >::createPartialdecFromPartition(), createRowindexList(), DEC_DECL_CONSCLASSIFY(), DEC_DECL_POSTPROCESSPARTIALDEC(), DEC_DECL_PROPAGATEPARTIALDEC(), gcg::PARTIALDECOMP::filloutPartialdecFromConstoblock(), GCGconshdlrDecompCalcBendersScore(), GCGconshdlrDecompCalcCandidatesNBlocks(), GCGconshdlrDecompCalcClassicScore(), graphCompletible(), setupArrays(), setuparraysnewdetection(), and writeGpNonzeros().
◆ getOrigVarsFixedZero()
std::vector< SCIP_VAR * > gcg::DETPROBDATA::getOrigVarsFixedZero | ( | ) |
returns pointers to all orig vars that are fixed to zero
- Returns
- vector of vars
Definition at line 862 of file class_detprobdata.cpp.
Referenced by createDecompFromPartialdec().
◆ getRelevantConss()
std::vector< SCIP_CONS * > gcg::DETPROBDATA::getRelevantConss | ( | ) |
returns pointers to all constraints that are not marked as deleted or obsolete
- Returns
- vector of conss
Definition at line 868 of file class_detprobdata.cpp.
Referenced by createDecompFromPartialdec().
◆ getRelevantVars()
std::vector< SCIP_VAR * > gcg::DETPROBDATA::getRelevantVars | ( | ) |
returns pointers to all problem vars that are not fixed to 0
- Returns
- vector of vars
Definition at line 874 of file class_detprobdata.cpp.
Referenced by createDecompFromPartialdec().
◆ getScip()
SCIP * gcg::DETPROBDATA::getScip | ( | ) |
returns the corresponding scip data structure
- Returns
- the corresponding scip data structure
Definition at line 880 of file class_detprobdata.cpp.
Referenced by createGraphNewDetection(), fhook(), and AUT_HOOK2::setNewDetectionStuff().
◆ getSortedCandidatesNBlocks()
void gcg::DETPROBDATA::getSortedCandidatesNBlocks | ( | std::vector< int > & | candidates | ) |
gets the candidates for number of blocks added by the user followed by the found ones sorted in descending order by how often a candidate was proposed
- Parameters
-
candidates will contain the candidates for number of blocks sorted in descending order by how often a candidate was added
Definition at line 886 of file class_detprobdata.cpp.
References candidatesNBlocks, GCGconshdlrDecompGetBlockNumberCandidate(), and GCGconshdlrDecompGetNBlockNumberCandidates().
Referenced by detection().
◆ getVal()
SCIP_Real gcg::DETPROBDATA::getVal | ( | int | row, |
int | col | ||
) |
returns a coefficient from the coefficient matrix
- Returns
- a coefficient from the coefficient matrix
- Parameters
-
row index of the constraint to be considered col index of the variable to be considered
Definition at line 916 of file class_detprobdata.cpp.
Referenced by gcg::PARTIALDECOMP::assignCurrentStairlinking(), createGraphNewDetection(), GCGconshdlrDecompCalcMaxForeseeingWhiteAggScore(), GCGconshdlrDecompCalcStrongDecompositionScore(), setuparraysnewdetection(), and writeTikzNonzeros().
◆ getValsForCons()
std::vector< SCIP_Real > & gcg::DETPROBDATA::getValsForCons | ( | int | consIndex | ) |
returns the nonzero coefficients of the coefficient matrix for a constraint
- Returns
- vector of coefficients of in matrix for constraints
- Note
- same order as in
- See also
- getVarsForCons()
- Parameters
-
consIndex index of the constraint to be considered
Definition at line 931 of file class_detprobdata.cpp.
Referenced by createGraph(), and setupArrays().
◆ getVarPartition()
VarPartition * gcg::DETPROBDATA::getVarPartition | ( | int | partitionIndex | ) |
returns pointer to a variable partition with given index
- Returns
- pointer to a variable partition with given index
- Parameters
-
partitionIndex index of variable partition
Definition at line 939 of file class_detprobdata.cpp.
References varpartitioncollection.
Referenced by reduceVarclasses().
◆ getVarPartitions()
std::vector< VarPartition * > gcg::DETPROBDATA::getVarPartitions | ( | ) |
returns vector to stored variable partitions
- Returns
- returns vector to stored variable partitions
Definition at line 949 of file class_detprobdata.cpp.
References varpartitioncollection.
◆ getVar()
SCIP_VAR * gcg::DETPROBDATA::getVar | ( | int | varIndex | ) |
returns SCIP variable related to a variable index
- Returns
- SCIP variable pointer related to a variable index
- Parameters
-
varIndex index of the variable to be considered
Definition at line 955 of file class_detprobdata.cpp.
Referenced by gcg::BipartiteGraph< T >::createFromPartialMatrix(), gcg::HyperrowcolGraph< T >::createFromPartialMatrix(), gcg::HypercolGraph< T >::createFromPartialMatrix(), gcg::HyperrowGraph< T >::createFromPartialMatrix(), createGraph(), createGraphNewDetection(), createPartialdecFromDecomp(), createPartialdecFromMasterconss(), DEC_DECL_VARCLASSIFY(), gcg::PARTIALDECOMP::displayInfo(), fhook(), GCGconshdlrDecompCalcStrongDecompositionScore(), GCGconshdlrDecompCreateVarmapForPartialdecId(), GCGwriteCls(), setupArrays(), setuparraysnewdetection(), shuffleDualvalsRandom(), and writePartialdec().
◆ getVarsForCons()
std::vector< int > & gcg::DETPROBDATA::getVarsForCons | ( | int | consIndex | ) |
returns the variable indices of the coefficient matrix for a constraint
- Returns
- the variable indices of the coefficient matrix for a constraint
- Parameters
-
consIndex index of the constraint to be considered
Definition at line 963 of file class_detprobdata.cpp.
Referenced by gcg::PARTIALDECOMP::assignSmallestComponentsButOneConssAdjacency(), gcg::PARTIALDECOMP::checkConsistency(), gcg::PARTIALDECOMP::completeByConnected(), gcg::PARTIALDECOMP::completeByConnectedConssAdjacency(), gcg::PARTIALDECOMP::completeGreedily(), connected(), gcg::PARTIALDECOMP::considerImplicits(), gcg::BipartiteGraph< T >::createFromPartialMatrix(), gcg::HyperrowcolGraph< T >::createFromPartialMatrix(), gcg::RowGraphWeighted< T >::createFromPartialMatrix(), gcg::HypercolGraph< T >::createFromPartialMatrix(), gcg::HyperrowGraph< T >::createFromPartialMatrix(), createGraph(), createGraphFromPartialMatrix(), createGraphNewDetection(), createPartialdecFromMasterconss(), gcg::RowGraph< T >::createPartialdecFromPartition(), gcg::HyperrowcolGraph< T >::createPartialdecFromPartition(), gcg::HyperrowGraph< T >::createPartialdecFromPartition(), gcg::HypercolGraph< T >::createPartialdecFromPartition(), createRowindexList(), DEC_DECL_POSTPROCESSPARTIALDEC(), gcg::PARTIALDECOMP::filloutPartialdecFromConstoblock(), GCGconshdlrDecompCalcBendersScore(), GCGconshdlrDecompCalcClassicScore(), graphCompletible(), setuparraysnewdetection(), and writeGpNonzeros().
◆ isConsCardinalityCons()
bool gcg::DETPROBDATA::isConsCardinalityCons | ( | int | consindexd | ) |
returns whether a constraint is a cardinality constraint, i.e. of the \(\sum_{i} x_i = b\)
- Parameters
-
consindexd index of constraint that is be checked
- Returns
- returns whether a constraint is a cardinality constraint
Definition at line 971 of file class_detprobdata.cpp.
References GCGgetConsIsCardinalityCons().
Referenced by gcg::PARTIALDECOMP::hasSetppccardMaster().
◆ isConssAdjInitialized()
SCIP_Bool gcg::DETPROBDATA::isConssAdjInitialized | ( | ) |
determines whether or not the constraint-constraint adjacency data structure is initilized
- Returns
- true iff the constraint-constraint adjacency data structure is initilized
Definition at line 985 of file class_detprobdata.cpp.
Referenced by gcg::PARTIALDECOMP::assignSmallestComponentsButOneConssAdjacency(), DEC_DECL_FINISHPARTIALDEC(), DEC_DECL_POSTPROCESSPARTIALDEC(), and DEC_DECL_PROPAGATEPARTIALDEC().
◆ isConsSetpp()
bool gcg::DETPROBDATA::isConsSetpp | ( | int | consindexd | ) |
is cons with specified indec partitioning, or packing covering constraint?
- Parameters
-
consindexd index of the given cons
- Returns
- is cons with specified indec partitioning, or packing covering constraint
Definition at line 1035 of file class_detprobdata.cpp.
References GCGgetConsIsSetppc().
Referenced by gcg::PARTIALDECOMP::hasSetppMaster().
◆ isConsSetppc()
bool gcg::DETPROBDATA::isConsSetppc | ( | int | consindexd | ) |
is cons with specified index partitioning packing, or covering constraint?
- Parameters
-
consindexd index of cons to be checked
- Returns
- whether a constraint is partitioning packing, or covering constraint?
Definition at line 991 of file class_detprobdata.cpp.
References GCGgetConsIsSetppc().
Referenced by gcg::PARTIALDECOMP::hasSetppccardMaster(), and gcg::PARTIALDECOMP::hasSetppcMaster().
◆ isFiniteNonnegativeIntegral()
SCIP_Bool gcg::DETPROBDATA::isFiniteNonnegativeIntegral | ( | SCIP * | scip, |
SCIP_Real | x | ||
) |
is constraint ranged row, i.e., -inf < lhs < rhs < inf?
- Returns
- whether val is ranged row
- Parameters
-
scip SCIP data structure x value
Definition at line 1079 of file class_detprobdata.cpp.
Referenced by DEC_DECL_CONSCLASSIFY().
◆ isPartialdecDuplicateofFinished()
SCIP_Bool gcg::DETPROBDATA::isPartialdecDuplicateofFinished | ( | PARTIALDECOMP * | partialdec | ) |
check if partialdec is a duplicate of an existing finished partialdec
- Parameters
-
partialdec partialdec to be checked
- Returns
- TRUE iff partialdec is a duplicate of an existing finished partialdec
Definition at line 1090 of file class_detprobdata.cpp.
References partialdecIsNoDuplicateOfPartialdecs().
◆ isAssignedToOrigProb()
SCIP_Bool gcg::DETPROBDATA::isAssignedToOrigProb | ( | ) |
returns true if the matrix structure corresponds to the presolved problem
- Returns
- TRUE if the matrix structure corresponds to the presolved problem
Definition at line 1098 of file class_detprobdata.cpp.
Referenced by gcg::HyperrowcolGraph< T >::createPartialdecFromPartition(), gcg::HyperrowGraph< T >::createPartialdecFromPartition(), gcg::HypercolGraph< T >::createPartialdecFromPartition(), GCGconshdlrDecompCalcCandidatesNBlocks(), GCGwriteCls(), and reorderPermutations().
◆ isRangedRow()
SCIP_Bool gcg::DETPROBDATA::isRangedRow | ( | SCIP * | scip, |
SCIP_Real | lhs, | ||
SCIP_Real | rhs | ||
) |
is constraint ranged row, i.e., -inf < lhs < rhs < inf?
- Returns
- whether constraint is ranged row
- Parameters
-
scip SCIP data structure lhs left hand side rhs right hand side
Definition at line 1104 of file class_detprobdata.cpp.
Referenced by DEC_DECL_CONSCLASSIFY().
◆ partialdecIsNoDuplicateOfPartialdecs()
SCIP_Bool gcg::DETPROBDATA::partialdecIsNoDuplicateOfPartialdecs | ( | PARTIALDECOMP * | comppartialdec, |
std::vector< PARTIALDECOMP * > const & | partialdecs, | ||
bool | sort | ||
) |
check if partialdec is a duplicate of any given partialdecs
- Parameters
-
comppartialdec partialdec to be checked partialdecs partialdecs to compare with sort sort the vars and conss data structures in the partialdecs by their indices
- Returns
- TRUE iff partialdec is no duplicate of any given partialdecs
Definition at line 1117 of file class_detprobdata.cpp.
References gcg::PARTIALDECOMP::isEqual().
Referenced by addPartialdecToFinished(), addPartialdecToOpen(), and isPartialdecDuplicateofFinished().
◆ printBlockcandidateInformation()
void gcg::DETPROBDATA::printBlockcandidateInformation | ( | SCIP * | scip, |
FILE * | file | ||
) |
output method for json file writer to write block candidate information
- Parameters
-
scip SCIP data structure file output file or NULL for standard output
- Parameters
-
scip SCIP data structure file output file or NULL for standard output
Definition at line 1138 of file class_detprobdata.cpp.
References candidatesNBlocks.
Referenced by GCGprintBlockcandidateInformation().
◆ printPartitionInformation()
void gcg::DETPROBDATA::printPartitionInformation | ( | FILE * | file | ) |
output method for json file writer to write partition candidate information
- Parameters
-
file output file or NULL for standard output
- Parameters
-
file output file or NULL for standard output
Definition at line 1157 of file class_detprobdata.cpp.
References conspartitioncollection, getNConss(), getNVars(), partition(), and varpartitioncollection.
Referenced by GCGprintPartitionInformation().
◆ sortFinishedForScore()
void gcg::DETPROBDATA::sortFinishedForScore | ( | ) |
sorts partialdecs in finished partialdecs data structure according to the current scoretype
Definition at line 1215 of file class_detprobdata.cpp.
References GCGconshdlrDecompGetScoretype().
◆ translatePartialdecs() [1/2]
std::vector< PARTIALDECOMP * > gcg::DETPROBDATA::translatePartialdecs | ( | DETPROBDATA * | otherdata, |
std::vector< PARTIALDECOMP * > | otherpartialdecs | ||
) |
translates partialdecs if the index structure of the problem has changed, e.g. due to presolving
- Returns
- translated partialdecs
- Parameters
-
otherdata old detprobdata otherpartialdecs partialdecs to be translated
Definition at line 1224 of file class_detprobdata.cpp.
◆ translatePartialdecs() [2/2]
std::vector< PARTIALDECOMP * > gcg::DETPROBDATA::translatePartialdecs | ( | DETPROBDATA * | otherdata | ) |
translates partialdecs if the index structure of the problem has changed, e.g. due to presolving
- Returns
- translated partialdecs
- Parameters
-
otherdata old detprobdata
Definition at line 1246 of file class_detprobdata.cpp.
References getFinishedPartialdecs(), and getOpenPartialdecs().
Field Documentation
◆ candidatesNBlocks
std::vector<std::pair<int, int> > gcg::DETPROBDATA::candidatesNBlocks |
candidate for the number of blocks, second int indicates how often a candidate was added
Definition at line 142 of file class_detprobdata.h.
Referenced by addCandidatesNBlocksNVotes(), GCGconshdlrDecompAddCandidatesNBlocks(), getSortedCandidatesNBlocks(), and printBlockcandidateInformation().
◆ conspartitioncollection
std::vector<ConsPartition*> gcg::DETPROBDATA::conspartitioncollection |
collection of different constraint class distributions
Definition at line 144 of file class_detprobdata.h.
Referenced by addConsPartition(), GCGconshdlrDecompCalcCandidatesNBlocks(), GCGwriteCls(), getConsPartition(), getNConsPartitions(), printPartitionInformation(), and ~DETPROBDATA().
◆ varpartitioncollection
std::vector<VarPartition*> gcg::DETPROBDATA::varpartitioncollection |
collection of different variable class distributions
Definition at line 145 of file class_detprobdata.h.
Referenced by addVarPartition(), GCGconshdlrDecompCalcCandidatesNBlocks(), GCGwriteCls(), getNVarPartitions(), getVarPartition(), getVarPartitions(), printPartitionInformation(), and ~DETPROBDATA().
◆ classificationtime
SCIP_Real gcg::DETPROBDATA::classificationtime |
time that was consumed by the classification of the constraint and variables classifiers
Definition at line 147 of file class_detprobdata.h.
Referenced by GCGconshdlrDecompClassify().
◆ nblockscandidatescalctime
SCIP_Real gcg::DETPROBDATA::nblockscandidatescalctime |
time that was used to calulate the candidates of te block number
Definition at line 148 of file class_detprobdata.h.
Referenced by GCGconshdlrDecompCalcCandidatesNBlocks().
◆ postprocessingtime
SCIP_Real gcg::DETPROBDATA::postprocessingtime |
time that was spent in postproceesing decomposigtions
Definition at line 149 of file class_detprobdata.h.
Referenced by detect().
◆ translatingtime
SCIP_Real gcg::DETPROBDATA::translatingtime |
time that was spent by transforming partialdecs between presolved and orig problem
Definition at line 150 of file class_detprobdata.h.