hash map to store key-value pairs (called origin
and image
)
SCIP_RETCODE SCIPhashmapCreate | ( | SCIP_HASHMAP ** | hashmap, |
BMS_BLKMEM * | blkmem, | ||
int | mapsize | ||
) |
creates a hash map mapping pointers to pointers
hashmap | pointer to store the created hash map |
blkmem | block memory used to store hash map entries |
mapsize | size of the hash map |
Definition at line 2765 of file misc.c.
References BMSallocBlockMemory, BMSallocBlockMemoryArray, BMSallocClearBlockMemoryArray, log(), MAX, NULL, SCIP_ALLOC, and SCIP_OKAY.
Referenced by addVarCardinality(), appendVarCardinality(), applyCompletesol(), applyHeur(), applyNlobbt(), applyOfins(), applyVbounds(), checkCurvature(), checkSystemGF2(), checkVarnames(), computeED(), computeInteriorPoint(), copyProb(), copyVars(), createAndSplitProblem(), createCoveringProblem(), createStartingData(), createSubSCIP(), createTcliqueGraph(), doCopy(), initAlternativeLP(), initConcsolver(), initConflictgraph(), initData(), inithashmapandtable(), initImplGraphSOS1(), initPropdata(), nlrowSetupQuadVarsHash(), preprocessCliques(), presolRoundVarsSOS1(), presolveDisaggregate(), readPolynomial(), relabelOrderConsistent(), removeDoubleAndSingletonsAndPerformDualpresolve(), removeRedundantConssAndNonzeros(), SCIP_DECL_CONSINITPRE(), SCIP_DECL_CONSINITSOL(), SCIP_DECL_CONSPRESOL(), SCIP_DECL_CONSTRANS(), SCIP_DECL_HEUREXEC(), SCIP_DECL_HEURINIT(), SCIP_DECL_PARAMCHGD(), SCIP_DECL_RELAXEXEC(), SCIP_DECL_SEPAEXECLP(), SCIPapplyProximity(), SCIPapplyRens(), SCIPapplyZeroobj(), SCIPcopyConflicts(), SCIPcopyConss(), SCIPcopyOrigConss(), SCIPcreateConsCardinality(), SCIPcreateConsIndicator(), SCIPcreateConsLinking(), SCIPcreateConsQuadratic(), SCIPcreateFiniteSolCopy(), SCIPcreateWorstCaseProfile(), SCIPexprgraphCreate(), SCIPexprgraphSimplify(), SCIPexprtreeRemoveFixedVars(), SCIPgetConsCopy(), SCIPgetVarCopy(), SCIPnlpCreate(), SCIPreoptSaveActiveConss(), SCIPreoptSaveGlobalBounds(), SCIPvisualInit(), SCIPwriteCliqueGraph(), SCIPwriteLp(), searchEcAggrWithCliques(), setUpEvents(), setupProbingSCIP(), solveSubMIP(), solveSubproblem(), writeBounds(), and writeOpbConstraints().
void SCIPhashmapFree | ( | SCIP_HASHMAP ** | hashmap | ) |
frees the hash map
hashmap | pointer to the hash map |
Definition at line 2798 of file misc.c.
References BMSfreeBlockMemory, BMSfreeBlockMemoryArray, MAX, NULL, SCIP_Real, and SCIPdebugMessage.
Referenced by applyCompletesol(), applyHeur(), applyOfins(), applyVbounds(), checkCurvature(), checkSystemGF2(), computeED(), computeInteriorPoint(), conshdlrdataFree(), copyProb(), copyVars(), createAndSplitProblem(), createConstraints(), createCoveringProblem(), createSubSCIP(), deleteSubproblem(), doCopy(), freeAllEventData(), freeConflictgraph(), freeStartingData(), freeTcliqueGraph(), initConcsolver(), initImplGraphSOS1(), nlrowRemoveFixedQuadVars(), preprocessCliques(), presolRoundVarsSOS1(), presolveDisaggregate(), propdataClear(), readPolynomial(), relabelOrderConsistent(), removeDoubleAndSingletonsAndPerformDualpresolve(), removeRedundantConssAndNonzeros(), SCIP_DECL_CONSEXIT(), SCIP_DECL_CONSEXITSOL(), SCIP_DECL_CONSINITPRE(), SCIP_DECL_CONSPRESOL(), SCIP_DECL_HEUREXEC(), SCIP_DECL_HEUREXIT(), SCIP_DECL_PARAMCHGD(), SCIP_DECL_PROPEXITSOL(), SCIP_DECL_READERWRITE(), SCIP_DECL_RELAXEXEC(), SCIPapplyRens(), SCIPapplyZeroobj(), SCIPcopyConflicts(), SCIPcopyConss(), SCIPcopyOrigConss(), SCIPcreateConsQuadratic(), SCIPcreateFiniteSolCopy(), SCIPcreateWorstCaseProfile(), SCIPexprgraphFree(), SCIPexprgraphSimplify(), SCIPexprtreeRemoveFixedVars(), SCIPgetConsCopy(), SCIPgetVarCopy(), SCIPnlpFree(), SCIPnlrowFree(), SCIPreoptFree(), SCIPvisualExit(), SCIPwriteCliqueGraph(), SCIPwriteLp(), searchEcAggrWithCliques(), sepadataClear(), solveSubMIP(), solveSubproblem(), writeBounds(), and writeOpbConstraints().
SCIP_RETCODE SCIPhashmapInsert | ( | SCIP_HASHMAP * | hashmap, |
void * | origin, | ||
void * | image | ||
) |
inserts new origin->image pair in hash map (must not be called for already existing origins!)
inserts new origin->image pair in hash map
hashmap | hash map |
origin | origin to set image for |
image | new image for origin |
Definition at line 2846 of file misc.c.
References FALSE, SCIP_HashMap::hashes, hashmapCheckLoad(), hashmapInsert(), hashvalue(), SCIP_HashMap::mask, NULL, SCIP_HASHMAPIMAGE::ptr, SCIP_CALL, SCIP_OKAY, and SCIP_HashMap::slots.
Referenced by addAltLPColumn(), addCliqueDataEntry(), addConsToOccurList(), addKnapsackConstraints(), addLinearConstraints(), addLogicOrConstraints(), addNewGenVBound(), addSetppcConstraints(), addVarboundConstraints(), addVarCardinality(), appendVarCardinality(), applyHeur(), checkCurvature(), checkSystemGF2(), checkVarnames(), collectCliqueData(), computeED(), createAndAddAndCons(), createCoveringProblem(), createKKTDualCons(), createSubSCIP(), createTcliqueGraph(), extractGates(), getEventData(), getNodeIdx(), getVariableIndex(), initConflictgraph(), initData(), initImplGraphSOS1(), nlpAddVars(), nlrowSetupQuadVarsHash(), presolRoundVarsSOS1(), presolveDisaggregateMarkComponent(), relabelOrderConsistent(), removeDoubleAndSingletonsAndPerformDualpresolve(), SCIP_DECL_CONSINIT(), SCIP_DECL_CONSINITPRE(), SCIP_DECL_CONSINITSOL(), SCIP_DECL_CONSTRANS(), SCIP_DECL_EVENTEXEC(), SCIP_DECL_PARAMCHGD(), SCIP_DECL_READERWRITE(), SCIPapplyHeurDualval(), SCIPcreateConsCardinality(), SCIPcreateConsIndicator(), SCIPcreateConsLinking(), SCIPcreateConsPseudobooleanWithConss(), SCIPcreateConsQuadratic(), SCIPcreateNlpiProb(), SCIPcreateWorstCaseProfile(), SCIPexprgraphAddVars(), SCIPexprgraphReplaceVarByLinearSum(), SCIPexprgraphSimplify(), SCIPexprtreeRemoveFixedVars(), SCIPgetConsCopy(), SCIPnlrowAddQuadVar(), SCIPreoptApplyGlbConss(), SCIPreoptSaveActiveConss(), SCIPvarCopy(), SCIPwriteCliqueGraph(), searchEcAggrWithCliques(), and writeOpbConstraints().
SCIP_RETCODE SCIPhashmapInsertReal | ( | SCIP_HASHMAP * | hashmap, |
void * | origin, | ||
SCIP_Real | image | ||
) |
inserts new origin->image pair in hash map (must not be called for already existing origins!)
inserts new origin->image pair in hash map
hashmap | hash map |
origin | origin to set image for |
image | new image for origin |
Definition at line 2876 of file misc.c.
References FALSE, SCIP_HashMap::hashes, hashmapCheckLoad(), hashmapInsert(), hashvalue(), SCIP_HashMap::mask, NULL, SCIP_HASHMAPIMAGE::real, SCIP_CALL, SCIP_OKAY, and SCIP_HashMap::slots.
Referenced by SCIPreoptSaveGlobalBounds().
void* SCIPhashmapGetImage | ( | SCIP_HASHMAP * | hashmap, |
void * | origin | ||
) |
retrieves image of given origin from the hash map, or NULL if no image exists
hashmap | hash map |
origin | origin to retrieve image for |
Definition at line 2903 of file misc.c.
References SCIP_HashMap::hashes, hashmapLookup(), SCIP_HashMapEntry::image, SCIP_HashMap::mask, NULL, SCIP_HASHMAPIMAGE::ptr, and SCIP_HashMap::slots.
Referenced by addAltLPColumn(), addCliqueDataEntry(), addCoefTerm(), addConsToOccurList(), addLocalBranchingConstraint(), addVarCardinality(), appendVarCardinality(), applyCompletesol(), applyDomainChanges(), applyNlobbt(), applyOfins(), applyVbounds(), checkCons(), checkCurvature(), checkIISlocal(), checkSystemGF2(), collectCliqueData(), collectMinactImplicVar(), componentSetupWorkingSol(), computeED(), computeImpliedEst(), computeInteriorPoint(), computeRanks(), consdataCreate(), consdataFree(), consdataPrint(), copyConsPseudoboolean(), copyVars(), correctLocksAndCaptures(), createKKTDualCons(), createNewSol(), createNewSols(), createRows(), createSolFromSubScipSol(), createSubSCIP(), extractGates(), filterCands(), findShortestOccurlist(), fixDiscreteVars(), freeMemory(), getEventData(), getGenVBound(), getLinVarsAndAndRess(), getNodeIdx(), getSOS1Implications(), getVariableIndex(), getVarIndex(), initConcsolver(), initConflictgraph(), initImplGraphSOS1(), maximalslack(), nlpSetupNlpiIndices(), nlpUpdateObjCoef(), nlpUpdateVarBounds(), nlrowExprtreeChanged(), nlrowLinearCoefChanged(), nlrowQuadElemChanged(), objimplicsCreate(), performImplicationGraphAnalysis(), preprocessCliques(), presolRoundVarsSOS1(), presolveAddKKTQuadLinearTerms(), presolveDisaggregate(), presolveDisaggregateMarkComponent(), printColumnSection(), relabelOrderConsistent(), removeConsFromOccurList(), removeDoubleAndSingletonsAndPerformDualpresolve(), removeRedundantNonZeros(), resetContributors(), SCIP_DECL_CONSGETNVARS(), SCIP_DECL_CONSGETVARS(), SCIP_DECL_CONSINITPRE(), SCIP_DECL_EVENTEXEC(), SCIP_DECL_HEUREXEC(), SCIP_DECL_HEUREXIT(), SCIP_DECL_PARAMCHGD(), SCIP_DECL_READERWRITE(), SCIP_DECL_RELAXEXEC(), SCIPaddNlpiProbRows(), SCIPaddToNlpiProblemQuadratic(), SCIPaddToNlpiProblemSOC(), SCIPapplyHeurDualval(), SCIPapplyProximity(), SCIPapplyRens(), SCIPapplyZeroobj(), SCIPcreateConsCardinality(), SCIPcreateConsQuadratic(), SCIPcreateFiniteSolCopy(), SCIPcreateNlpiProb(), SCIPexprgraphFindVarNode(), SCIPexprgraphReplaceVarByLinearSum(), SCIPexprgraphSetVarBounds(), SCIPexprgraphSimplify(), SCIPexprtreeRemoveFixedVars(), SCIPgetConsCopy(), SCIPgetConsLinking(), SCIPgetVarCopy(), SCIPnlpChgVarBoundsDive(), SCIPnlpChgVarObjDive(), SCIPnlpChgVarsBoundsDive(), SCIPnlpDelVar(), SCIPnlpGetVarsNonlinearity(), SCIPnlrowSearchQuadVar(), SCIPupdateNlpiProb(), SCIPvisualCutoffNode(), SCIPvisualFoundSolution(), SCIPvisualNewChild(), SCIPvisualSolvedNode(), SCIPvisualUpdateChild(), separateCuts(), setQuadraticObj(), solveSubMIP(), solveSubproblem(), sortGenVBounds(), tightenVarsBoundsSOS1(), transformToOrig(), updateArcData(), updateFirstRow(), updateFirstRowGlobal(), varGetLbIndex(), varGetUbIndex(), vbcSetColor(), writeExpandedSolutions(), and writeOpbConstraints().
SCIP_Real SCIPhashmapGetImageReal | ( | SCIP_HASHMAP * | hashmap, |
void * | origin | ||
) |
retrieves image of given origin from the hash map, or NULL if no image exists
hashmap | hash map |
origin | origin to retrieve image for |
Definition at line 2922 of file misc.c.
References SCIP_HashMap::hashes, hashmapLookup(), SCIP_HashMapEntry::image, SCIP_HashMap::mask, NULL, SCIP_HASHMAPIMAGE::real, SCIP_INVALID, and SCIP_HashMap::slots.
Referenced by SCIPreoptInstallBounds().
SCIP_RETCODE SCIPhashmapSetImage | ( | SCIP_HASHMAP * | hashmap, |
void * | origin, | ||
void * | image | ||
) |
sets image for given origin in the hash map, either by modifying existing origin->image pair or by appending a new origin->image pair
hashmap | hash map |
origin | origin to set image for |
image | new image for origin |
Definition at line 2943 of file misc.c.
References hashmapCheckLoad(), hashmapInsert(), hashvalue(), SCIP_HashMap::mask, NULL, SCIP_HASHMAPIMAGE::ptr, SCIP_CALL, SCIP_OKAY, SCIP_HashMap::slots, and TRUE.
Referenced by exprgraphRemoveVar(), nlpMoveVar(), nlrowRemoveFixedQuadVars(), SCIPvisualNewChild(), and SCIPwriteLp().
SCIP_RETCODE SCIPhashmapSetImageReal | ( | SCIP_HASHMAP * | hashmap, |
void * | origin, | ||
SCIP_Real | image | ||
) |
sets image for given origin in the hash map, either by modifying existing origin->image pair or by appending a new origin->image pair
hashmap | hash map |
origin | origin to set image for |
image | new image for origin |
Definition at line 2971 of file misc.c.
References hashmapCheckLoad(), hashmapInsert(), hashvalue(), SCIP_HashMap::mask, NULL, SCIP_HASHMAPIMAGE::real, SCIP_CALL, SCIP_OKAY, SCIP_HashMap::slots, and TRUE.
SCIP_Bool SCIPhashmapExists | ( | SCIP_HASHMAP * | hashmap, |
void * | origin | ||
) |
checks whether an image to the given origin exists in the hash map
hashmap | hash map |
origin | origin to search for |
Definition at line 2997 of file misc.c.
References SCIP_HashMap::hashes, hashmapLookup(), SCIP_HashMap::mask, NULL, and SCIP_HashMap::slots.
Referenced by addAltLPColumn(), addCliqueDataEntry(), addConsToOccurList(), addVarCardinality(), appendVarCardinality(), applyNlobbt(), checkCurvature(), checkIISlocal(), checkOrigPbCons(), checkSystemGF2(), checkVarnames(), chooseCoefVar(), chooseDoubleVar(), chooseFracVar(), chooseGuidedVar(), choosePscostVar(), chooseVeclenVar(), collectCliqueData(), collectMinactImplicVar(), computeED(), computeImpliedLct(), computeInteriorPoint(), consdataFree(), correctConshdlrdata(), correctLocksAndCaptures(), createAndAddAndCons(), createCoveringProblem(), createKKTDualCons(), filterCands(), findShortestOccurlist(), getEventData(), getLinVarsAndAndRess(), getNodeIdx(), getVariableIndex(), getVarIndex(), initConflictgraph(), initImplGraphSOS1(), liftCliqueVariables(), nlpAddNlRows(), nlpAddVars(), nlpRemoveFixedVar(), nlpSetupNlpiIndices(), nlpUpdateObjCoef(), nlpUpdateVarBounds(), nlrowExprtreeChanged(), nlrowLinearCoefChanged(), nlrowQuadElemChanged(), objimplicsCreate(), preprocessCliques(), presolRoundVarsSOS1(), presolveAddKKTQuadLinearTerms(), presolveDisaggregate(), presolveDisaggregateMarkComponent(), printColumnSection(), relabelOrderConsistent(), removeConsFromOccurList(), removeDoubleAndSingletonsAndPerformDualpresolve(), removeRedundantNonZeros(), resetContributors(), SCIP_DECL_CONSDELETE(), SCIP_DECL_CONSINIT(), SCIP_DECL_CONSINITSOL(), SCIP_DECL_CONSTRANS(), SCIP_DECL_PARAMCHGD(), SCIP_DECL_READERWRITE(), SCIPaddNlpiProbRows(), SCIPaddToNlpiProblemQuadratic(), SCIPcreateConsCardinality(), SCIPcreateConsIndicator(), SCIPcreateConsLinking(), SCIPcreateConsPseudobooleanWithConss(), SCIPcreateConsQuadratic(), SCIPcreateNlpiProb(), SCIPexistsConsLinking(), SCIPexprgraphAddVars(), SCIPexprgraphFindVarNode(), SCIPexprgraphReplaceVarByLinearSum(), SCIPexprgraphSetVarBounds(), SCIPexprgraphSimplify(), SCIPexprtreeRemoveFixedVars(), SCIPnlpAddVar(), SCIPnlpChgVarBoundsDive(), SCIPnlpChgVarObjDive(), SCIPnlpChgVarsBoundsDive(), SCIPnlpDelVar(), SCIPnlpGetVarsNonlinearity(), SCIPnlrowSearchQuadVar(), SCIPreoptApplyGlbConss(), SCIPreoptConsCanBeDeleted(), SCIPreoptInstallBounds(), SCIPreoptSaveActiveConss(), SCIPreoptSaveGlobalBounds(), SCIPupdateNlpiProb(), SCIPvarCopy(), SCIPwriteCliqueGraph(), SCIPwriteLp(), searchEcAggrWithCliques(), separateCuts(), separateIISRounding(), setQuadraticObj(), sortGenVBounds(), strengthenConss(), transformToOrig(), updateConsanddataUses(), updateFirstRow(), updateFirstRowGlobal(), varGetLbIndex(), varGetUbIndex(), and writeExpandedSolutions().
SCIP_RETCODE SCIPhashmapRemove | ( | SCIP_HASHMAP * | hashmap, |
void * | origin | ||
) |
removes origin->image pair from the hash map, if it exists
hashmap | hash map |
origin | origin to remove from the list |
Definition at line 3013 of file misc.c.
References SCIP_HashMap::hashes, hashmapLookup(), SCIP_HashMapEntry::image, SCIP_HashMap::mask, SCIP_HashMap::nelements, NULL, SCIP_HashMapEntry::origin, SCIP_OKAY, SCIP_HashMap::shift, SCIP_HashMap::slots, and TRUE.
Referenced by computeImpliedEst(), computeImpliedLct(), consdataFree(), correctConshdlrdata(), createSubSCIP(), exprgraphRemoveVar(), nlpDelVarPos(), nlrowRemoveFixedQuadVars(), removeDoubleAndSingletonsAndPerformDualpresolve(), SCIP_DECL_CONSDELETE(), SCIPapplyHeurDualval(), and updateConsanddataUses().
void SCIPhashmapPrintStatistics | ( | SCIP_HASHMAP * | hashmap, |
SCIP_MESSAGEHDLR * | messagehdlr | ||
) |
prints statistics about hash map usage
hashmap | hash map |
messagehdlr | message handler |
Definition at line 3059 of file misc.c.
References ELEM_DISTANCE, SCIP_HashMap::hashes, SCIP_HashMap::mask, MAX, SCIP_HashMap::nelements, NULL, SCIP_Real, and SCIPmessagePrintInfo().
Referenced by SCIP_DECL_CONSEXITSOL().
SCIP_Bool SCIPhashmapIsEmpty | ( | SCIP_HASHMAP * | hashmap | ) |
indicates whether a hash map has no entries
hashmap | hash map |
Definition at line 3097 of file misc.c.
References SCIP_HashMap::nelements, and NULL.
int SCIPhashmapGetNElements | ( | SCIP_HASHMAP * | hashmap | ) |
gives the number of elements in a hash map
hashmap | hash map |
Definition at line 3107 of file misc.c.
References SCIP_HashMap::nelements.
int SCIPhashmapGetNEntries | ( | SCIP_HASHMAP * | hashmap | ) |
gives the number of entries in the internal arrays of a hash map
hashmap | hash map |
Definition at line 3115 of file misc.c.
References SCIP_HashMap::mask.
Referenced by createSubSCIP(), releaseHashmapEntries(), releaseHashmapNLPRows(), and SCIPreoptResetActiveConss().
SCIP_HASHMAPENTRY* SCIPhashmapGetEntry | ( | SCIP_HASHMAP * | hashmap, |
int | entryidx | ||
) |
gives the hashmap entry at the given index or NULL if entry has no element
gives the hashmap entry at the given index or NULL if entry is empty
hashmap | hash map |
entryidx | index of hash map entry |
Definition at line 3123 of file misc.c.
References SCIP_HashMap::hashes, NULL, and SCIP_HashMap::slots.
Referenced by createSubSCIP(), releaseHashmapEntries(), releaseHashmapNLPRows(), and SCIPreoptResetActiveConss().
void* SCIPhashmapEntryGetOrigin | ( | SCIP_HASHMAPENTRY * | entry | ) |
gives the origin of the hashmap entry
entry | hash map entry |
Definition at line 3134 of file misc.c.
References NULL, and SCIP_HashMapEntry::origin.
Referenced by createSubSCIP().
void* SCIPhashmapEntryGetImage | ( | SCIP_HASHMAPENTRY * | entry | ) |
gives the image of the hashmap entry
entry | hash map entry |
Definition at line 3144 of file misc.c.
References SCIP_HashMapEntry::image, NULL, and SCIP_HASHMAPIMAGE::ptr.
Referenced by createSubSCIP(), releaseHashmapEntries(), releaseHashmapNLPRows(), and SCIPreoptResetActiveConss().
SCIP_Real SCIPhashmapEntryGetImageReal | ( | SCIP_HASHMAPENTRY * | entry | ) |
gives the image of the hashmap entry
entry | hash map entry |
Definition at line 3154 of file misc.c.
References SCIP_HashMapEntry::image, NULL, and SCIP_HASHMAPIMAGE::real.
SCIP_RETCODE SCIPhashmapRemoveAll | ( | SCIP_HASHMAP * | hashmap | ) |
removes all entries in a hash map.
hashmap | hash map |
Definition at line 3164 of file misc.c.
References BMSclearMemoryArray, SCIP_HashMap::hashes, SCIP_HashMap::mask, SCIP_HashMap::nelements, NULL, and SCIP_OKAY.
Referenced by createSubSCIP(), freeMemory(), resetLocalStartingData(), SCIP_DECL_EVENTEXEC(), SCIP_DECL_HEUREXIT(), and SCIPapplyHeurDualval().