|
|
int | SCIPcalcHashtableSize (int minsize) |
|
SCIP_RETCODE | SCIPhashtableCreate (SCIP_HASHTABLE **hashtable, BMS_BLKMEM *blkmem, int tablesize, SCIP_DECL_HASHGETKEY((*hashgetkey)), SCIP_DECL_HASHKEYEQ((*hashkeyeq)), SCIP_DECL_HASHKEYVAL((*hashkeyval)), void *userptr) |
|
void | SCIPhashtableFree (SCIP_HASHTABLE **hashtable) |
|
void | SCIPhashtableClear (SCIP_HASHTABLE *hashtable) |
|
SCIP_RETCODE | SCIPhashtableInsert (SCIP_HASHTABLE *hashtable, void *element) |
|
SCIP_RETCODE | SCIPhashtableSafeInsert (SCIP_HASHTABLE *hashtable, void *element) |
|
void * | SCIPhashtableRetrieve (SCIP_HASHTABLE *hashtable, void *key) |
|
void * | SCIPhashtableRetrieveNext (SCIP_HASHTABLE *hashtable, SCIP_HASHTABLELIST **hashtablelist, void *key) |
|
SCIP_Bool | SCIPhashtableExists (SCIP_HASHTABLE *hashtable, void *element) |
|
SCIP_RETCODE | SCIPhashtableRemove (SCIP_HASHTABLE *hashtable, void *element) |
|
void | SCIPhashtableRemoveAll (SCIP_HASHTABLE *hashtable) |
|
SCIP_Longint | SCIPhashtableGetNElements (SCIP_HASHTABLE *hashtable) |
|
SCIP_Real | SCIPhashtableGetLoad (SCIP_HASHTABLE *hashtable) |
|
void | SCIPhashtablePrintStatistics (SCIP_HASHTABLE *hashtable, SCIP_MESSAGEHDLR *messagehdlr) |
|
| SCIP_DECL_HASHKEYEQ (SCIPhashKeyEqString) |
|
| SCIP_DECL_HASHKEYVAL (SCIPhashKeyValString) |
|
| SCIP_DECL_HASHGETKEY (SCIPhashGetKeyStandard) |
|
| SCIP_DECL_HASHKEYEQ (SCIPhashKeyEqPtr) |
|
| SCIP_DECL_HASHKEYVAL (SCIPhashKeyValPtr) |
|
int SCIPcalcHashtableSize |
( |
int |
minsize | ) |
|
returns a reasonable hash table size (a prime number) that is at least as large as the specified value
- Parameters
-
minsize | minimal size of the hash table |
Definition at line 964 of file misc.c.
References SCIPsortedvecFindInt().
Referenced by applyVbounds(), checkCurvature(), checkSystemGF2(), checkVarnames(), collectBranchingCands(), copyProb(), copyVars(), createCoveringProblem(), createStartingData(), createSubSCIP(), createTcliqueGraph(), createTopoSortedVars(), detectRedundantConstraints(), findCumulativeConss(), initAlternativeLP(), initData(), inithashmapandtable(), initializeCandsLists(), initPropdata(), nlrowSetupQuadVarsHash(), nodepairqueueCreate(), preprocessCliques(), presolveDisaggregate(), presolveFindDuplicates(), propdataInit(), readPolynomial(), removeDoubleAndSingletonsAndPerformDualpresolve(), removeRedundantConssAndNonzeros(), SCIP_DECL_CONSINITSOL(), SCIP_DECL_HEUREXEC(), SCIP_DECL_PRESOLEXEC(), SCIP_DECL_READERWRITE(), SCIP_DECL_SEPAEXECLP(), SCIPapplyProximity(), SCIPapplyZeroobj(), SCIPcliquetableCleanup(), SCIPcopy(), SCIPcopyConss(), SCIPcopyOrig(), SCIPcopyOrigConss(), SCIPcreateConsQuadratic(), SCIPcreateFiniteSolCopy(), SCIPcreateWorstCaseProfile(), SCIPexprgraphCreate(), SCIPexprtreeRemoveFixedVars(), SCIPgetConsCopy(), SCIPgetVarCopy(), SCIPnlpCreate(), SCIPvisualizeConsCumulative(), SCIPwriteCliqueGraph(), SCIPwriteLp(), setUpEvents(), solveSubMIP(), solveSubproblem(), and writeOpbConstraints().
creates a hash table
- Parameters
-
hashtable | pointer to store the created hash table |
blkmem | block memory used to store hash table entries |
tablesize | size of the hash table |
userptr | user pointer |
Definition at line 1287 of file misc.c.
References BMSallocClearMemoryArray, BMSallocMemory, NULL, SCIP_ALLOC, and SCIP_OKAY.
Referenced by collectBranchingCands(), createTopoSortedVars(), detectRedundantConstraints(), findCumulativeConss(), inithashmapandtable(), initializeCandsLists(), nodepairqueueCreate(), presoldataInitHashtables(), presolveFindDuplicates(), propdataInit(), SCIP_DECL_HEURINIT(), SCIP_DECL_PRESOLEXEC(), SCIP_DECL_READERREAD(), SCIP_DECL_READERWRITE(), SCIPcliquetableCleanup(), SCIPcutpoolCreate(), SCIPexprParse(), SCIPparamsetCreate(), SCIPprobCreate(), SCIPvisualizeConsCumulative(), SCIPwriteLp(), and SCIPwritePip().
frees the hash table
- Parameters
-
hashtable | pointer to the hash table |
Definition at line 1317 of file misc.c.
References SCIP_HashTable::blkmem, BMSfreeMemory, BMSfreeMemoryArray, hashtablelistFree(), SCIP_HashTable::lists, SCIP_HashTable::nlists, and NULL.
Referenced by collectBranchingCands(), conshdlrdataFree(), createTopoSortedVars(), detectRedundantConstraints(), findCumulativeConss(), initializeCandsLists(), nodepairqueueCreate(), presolveFindDuplicates(), propdataExit(), propdataInit(), SCIP_DECL_HEUREXIT(), SCIP_DECL_PRESOLEXEC(), SCIP_DECL_PRESOLFREE(), SCIP_DECL_READERREAD(), SCIP_DECL_READERWRITE(), SCIPcliquetableCleanup(), SCIPcutpoolFree(), SCIPexprParse(), SCIPparamsetFree(), SCIPprobFree(), SCIPvisualizeConsCumulative(), SCIPwriteLp(), and SCIPwritePip().
inserts element in hash table (multiple inserts of same element possible)
- Note
- A pointer to a hashtablelist returned by SCIPhashtableRetrieveNext() might get invalid when adding an element to the hash table, due to dynamic resizing.
- Parameters
-
hashtable | hash table |
element | element to insert into the table |
Definition at line 1374 of file misc.c.
References SCIP_HashTable::blkmem, hashtablelistAppend(), hashtableResize(), SCIP_HashTable::lists, SCIP_HashTable::nelements, SCIP_HashTable::nlists, NULL, SCIP_CALL, SCIP_HASHTABLE_RESIZE_PERCENTAGE, SCIP_OKAY, SCIPhashtableGetLoad(), and SCIP_HashTable::userptr.
Referenced by addConflictBinvar(), cleanupHashDatas(), collectAggregatedVars(), collectBranchingCands(), collectMinactImplicVars(), correctPresoldata(), createAndAddAndCons(), createConstantAssignment(), createPresoldata(), createTopoSortedVars(), createVariable(), detectRedundantConstraints(), exprparseReadVariable(), findCumulativeConss(), getConflictImplics(), initializeCandsLists(), nodepairqueueCreate(), presolveFindDuplicates(), SCIP_DECL_HEUREXEC(), SCIP_DECL_PRESOLEXEC(), SCIP_DECL_READERWRITE(), SCIPcliquetableCleanup(), SCIPcreateConsPseudobooleanWithConss(), SCIPcutpoolAddNewRow(), SCIPhashtableSafeInsert(), SCIPprobAddConsName(), SCIPprobAddVarName(), SCIPvisualizeConsCumulative(), selectSolsRandomized(), and setupSubproblem().
void* SCIPhashtableRetrieve |
( |
SCIP_HASHTABLE * |
hashtable, |
|
|
void * |
key |
|
) |
| |
retrieve element with key from hash table, returns NULL if not existing
- Parameters
-
hashtable | hash table |
key | key to retrieve |
Definition at line 1434 of file misc.c.
References hashtablelistRetrieve(), SCIP_HashTable::lists, SCIP_HashTable::nlists, NULL, and SCIP_HashTable::userptr.
Referenced by applyVariableAssignment(), consdataFree(), CREATE_CONSTRAINT(), createAndAddAndCons(), createConstantAssignment(), createLinking(), createVariable(), detectRedundantConstraints(), exprparseReadVariable(), extractGates(), nodepairqueueCreate(), paramSetBool(), paramSetChar(), paramSetInt(), paramSetLongint(), paramsetParse(), paramSetReal(), paramsetSetHeuristicsAggressive(), paramsetSetHeuristicsFast(), paramsetSetPresolvingAggressive(), paramsetSetPresolvingFast(), paramsetSetSeparatingAggressive(), paramsetSetSeparatingDefault(), parseAggregation(), parseArrayIndex(), parseConstraint(), parseQuadratic(), parseSolveItem(), parseValue(), parseVariableArrayAssignment(), SCIP_DECL_PRESOLEXEC(), SCIPcreateConsPseudobooleanWithConss(), SCIPcutpoolAddRow(), SCIPcutpoolDelRow(), SCIPhashtableSafeInsert(), SCIPparamsetCopyParams(), SCIPparamsetFix(), SCIPparamsetGetBool(), SCIPparamsetGetChar(), SCIPparamsetGetInt(), SCIPparamsetGetLongint(), SCIPparamsetGetParam(), SCIPparamsetGetReal(), SCIPparamsetGetString(), SCIPparamsetIsFixed(), SCIPparamsetSet(), SCIPparamsetSetBool(), SCIPparamsetSetChar(), SCIPparamsetSetDefaultBool(), SCIPparamsetSetDefaultInt(), SCIPparamsetSetInt(), SCIPparamsetSetLongint(), SCIPparamsetSetReal(), SCIPparamsetSetString(), SCIPparamsetSetToDefault(), SCIPprobFindCons(), SCIPprobFindVar(), and transformToOrig().
retrieve element with key from hash table, returns NULL if not existing can be used to retrieve all entries with the same key (one-by-one)
- Note
- The returned hashtablelist pointer might get invalid when adding a new element to the hash table.
- Parameters
-
hashtable | hash table |
hashtablelist | input: entry in hash table list from which to start searching, or NULL output: entry in hash table list corresponding to element after retrieved one, or NULL |
key | key to retrieve |
Definition at line 1463 of file misc.c.
References hashtablelistRetrieveNext(), SCIP_HashTable::lists, SCIP_HashTable::nlists, NULL, and SCIP_HashTable::userptr.
Referenced by presolveFindDuplicates().
returns whether the given element exists in the table
- Parameters
-
hashtable | hash table |
element | element to search in the table |
Definition at line 1499 of file misc.c.
References hashtablelistFind(), SCIP_HashTable::lists, SCIP_HashTable::nlists, NULL, and SCIP_HashTable::userptr.
Referenced by addConflictBinvar(), cleanupHashDatas(), collectAggregatedVars(), collectBranchingCands(), collectMinactImplicVars(), consdataFree(), correctConshdlrdata(), correctPresoldata(), createTopoSortedVars(), cutpoolDelCut(), depthFirstSearch(), findCumulativeConss(), getConflictImplics(), initializeCandsLists(), printBoundSection(), printColumnSection(), resolvePropagation(), SCIP_DECL_PRESOLEXIT(), SCIP_DECL_READERWRITE(), SCIPcliquetableCleanup(), SCIPprobRemoveConsName(), SCIPprobRemoveVarName(), SCIPvisualizeConsCumulative(), selectSolsRandomized(), setupSubproblem(), transformToOrig(), and updateConsanddataUses().
removes element from the hash table, if it exists
- Parameters
-
hashtable | hash table |
element | element to remove from the table |
Definition at line 1526 of file misc.c.
References SCIP_HashTable::blkmem, hashtablelistRemove(), SCIP_HashTable::lists, SCIP_HashTable::nelements, SCIP_HashTable::nlists, NULL, SCIP_OKAY, and SCIP_HashTable::userptr.
Referenced by cleanupHashDatas(), consdataFree(), correctConshdlrdata(), correctPresoldata(), cutpoolDelCut(), depthFirstSearch(), detectRedundantConstraints(), extractGates(), presolveFindDuplicates(), SCIP_DECL_PRESOLEXIT(), SCIPprobRemoveConsName(), SCIPprobRemoveVarName(), and updateConsanddataUses().
SCIP_DECL_HASHKEYEQ |
( |
SCIPhashKeyEqString |
| ) |
|
standard hash key comparator for string keys
returns TRUE iff both keys (i.e. strings) are equal
Definition at line 1646 of file misc.c.
SCIP_DECL_HASHKEYVAL |
( |
SCIPhashKeyValString |
| ) |
|
standard hashing function for string keys
returns the hash value of the key (i.e. string)
Definition at line 1655 of file misc.c.
SCIP_DECL_HASHGETKEY |
( |
SCIPhashGetKeyStandard |
| ) |
|
gets the element as the key
Definition at line 1674 of file misc.c.
SCIP_DECL_HASHKEYEQ |
( |
SCIPhashKeyEqPtr |
| ) |
|
returns TRUE iff both keys(pointer) are equal
Definition at line 1681 of file misc.c.
SCIP_DECL_HASHKEYVAL |
( |
SCIPhashKeyValPtr |
| ) |
|
returns the hash value of the key
Definition at line 1687 of file misc.c.
|