hash table that resolves conflicts by probing
Macros | |
#define | SCIPhashSignature64(a) (UINT64_C(0x8000000000000000)>>((UINT32_C(0x9e3779b9) * ((uint32_t)(a)))>>26)) |
#define | SCIPhashTwo(a, b) ((uint32_t)((((uint32_t)(a) + 0xd37e9a1ce2148403ULL) * ((uint32_t)(b) + 0xe5fcc163aef32782ULL) )>>32)) |
#define | SCIPhashThree(a, b, c) |
#define | SCIPhashFour(a, b, c, d) |
#define | SCIPhashFive(a, b, c, d, e) |
#define | SCIPhashSix(a, b, c, d, e, f) |
#define | SCIPhashSeven(a, b, c, d, e, f, g) |
#define SCIPhashSignature64 | ( | a | ) | (UINT64_C(0x8000000000000000)>>((UINT32_C(0x9e3779b9) * ((uint32_t)(a)))>>26)) |
Definition at line 517 of file pub_misc.h.
Referenced by addCoef(), calcSignature(), consdataGetSignature(), consdataUpdateSignatures(), SCIP_DECL_HASHKEYVAL(), and SCIP_DECL_HASHKEYVAL().
#define SCIPhashTwo | ( | a, | |
b ) ((uint32_t)((((uint32_t)(a) + 0xd37e9a1ce2148403ULL) * ((uint32_t)(b) + 0xe5fcc163aef32782ULL) )>>32)) |
Definition at line 519 of file pub_misc.h.
Referenced by hashIndexPair(), hashIndexPair(), SCIP_DECL_HASHKEYVAL(), SCIP_DECL_HASHKEYVAL(), SCIP_DECL_HASHKEYVAL(), SCIP_DECL_HASHKEYVAL(), SCIP_DECL_HASHKEYVAL(), and SCIPrandomSetSeed().
Definition at line 521 of file pub_misc.h.
Referenced by SCIP_DECL_HASHKEYVAL(), SCIP_DECL_HASHKEYVAL(), SCIP_DECL_HASHKEYVAL(), SCIP_DECL_HASHKEYVAL(), and SCIP_DECL_HASHKEYVAL().
Definition at line 524 of file pub_misc.h.
Referenced by SCIP_DECL_HASHKEYVAL(), SCIP_DECL_HASHKEYVAL(), SCIP_DECL_HASHKEYVAL(), SCIP_DECL_HASHKEYVAL(), SCIP_DECL_HASHKEYVAL(), SCIP_DECL_HASHKEYVAL(), SCIP_DECL_HASHKEYVAL(), SCIP_DECL_HASHKEYVAL(), SCIP_DECL_HASHKEYVAL(), and SCIP_DECL_HASHKEYVAL().
Definition at line 531 of file pub_misc.h.
Referenced by SCIP_DECL_HASHKEYVAL().
Definition at line 535 of file pub_misc.h.
Referenced by SCIP_DECL_HASHKEYVAL().
computes a hashcode for double precision floating point values containing 15 significant bits, the sign and the exponent
Definition at line 544 of file pub_misc.h.
Referenced by SCIP_DECL_HASHKEYVAL(), SCIP_DECL_HASHKEYVAL(), SCIP_DECL_HASHKEYVAL(), SCIP_DECL_HASHKEYVAL(), SCIP_DECL_HASHKEYVAL(), SCIP_DECL_HASHKEYVAL(), SCIP_DECL_HASHKEYVAL(), SCIP_DECL_HASHKEYVAL(), SCIP_DECL_HASHKEYVAL(), SCIP_DECL_HASHKEYVAL(), SCIP_DECL_HASHKEYVAL(), SCIP_DECL_HASHKEYVAL(), SCIP_DECL_HASHKEYVAL(), SCIP_DECL_HASHKEYVAL(), and SCIP_DECL_HASHKEYVAL().
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 ) |
creates a hash table
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 2246 of file misc.c.
References assert(), BMSallocBlockMemory, BMSallocBlockMemoryArray, BMSallocClearBlockMemoryArray, i, MAX, NULL, SCIP_ALLOC, and SCIP_OKAY.
Referenced by bilinearTermsInsertEntry(), checkConsnames(), collectBranchingCands(), computeSymmetryGroup(), copyConsPseudoboolean(), detectHiddenProducts(), detectRedundantConstraints(), detectRedundantConstraints(), detectRedundantConstraints(), detectRedundantConstraints(), detectRedundantConstraints(), detectRedundantConstraints(), fillGraphByConss(), fillGraphByConss(), fillGraphByNonlinearConss(), findCumulativeConss(), inithashmapandtable(), mod2matrixPreprocessColumns(), mod2matrixPreprocessRows(), nodepairqueueCreate(), presoldataInitHashtables(), propdataInit(), SCIP_DECL_HEUREXEC(), SCIP_DECL_HEURINIT(), SCIP_DECL_PRESOLEXEC(), SCIP_DECL_PRESOLEXEC(), SCIP_DECL_PRESOLEXEC(), SCIP_DECL_READERREAD(), SCIP_DECL_READERWRITE(), SCIPcliquetableCreate(), SCIPcutpoolCreate(), SCIPparamsetCreate(), SCIPprobCreate(), SCIPvariableGraphCreate(), SCIPvisualizeConsCumulative(), SCIPwriteLp(), SCIPwriteMps(), SCIPwritePip(), and writeOpb().
void SCIPhashtableFree | ( | SCIP_HASHTABLE ** | hashtable | ) |
frees the hash table
hashtable | pointer to the hash table |
Definition at line 2296 of file misc.c.
References assert(), BMSfreeBlockMemory, BMSfreeBlockMemoryArray, i, MAX, NULL, and SCIPdebugMessage.
Referenced by bilinearTermsFree(), checkConsnames(), collectBranchingCands(), computeSymmetryGroup(), conshdlrdataFree(), copyConsPseudoboolean(), detectHiddenProducts(), detectRedundantConstraints(), detectRedundantConstraints(), detectRedundantConstraints(), detectRedundantConstraints(), detectRedundantConstraints(), detectRedundantConstraints(), fillGraphByConss(), fillGraphByConss(), fillGraphByNonlinearConss(), findCumulativeConss(), mod2matrixPreprocessColumns(), mod2matrixPreprocessRows(), nodepairqueueCreate(), propdataExit(), propdataInit(), SCIP_DECL_HEUREXEC(), SCIP_DECL_HEUREXIT(), SCIP_DECL_PRESOLEXEC(), SCIP_DECL_PRESOLEXEC(), SCIP_DECL_PRESOLEXEC(), SCIP_DECL_PRESOLFREE(), SCIP_DECL_READERREAD(), SCIP_DECL_READERWRITE(), SCIPcliquetableFree(), SCIPcutpoolFree(), SCIPparamsetFree(), SCIPprobFree(), SCIPvariableGraphFree(), SCIPvisualizeConsCumulative(), SCIPwriteLp(), SCIPwriteMps(), SCIPwritePip(), and writeOpb().
void SCIPhashtableClear | ( | SCIP_HASHTABLE * | hashtable | ) |
removes all elements of the hash table
removes all elements of the hash table
hashtable | hash table |
Definition at line 2348 of file misc.c.
References SCIPhashtableRemoveAll().
SCIP_RETCODE SCIPhashtableInsert | ( | SCIP_HASHTABLE * | hashtable, |
void * | element ) |
inserts element in hash table (multiple inserts of same element override the previous entry)
inserts element in hash table
hashtable | hash table |
element | element to insert into the table |
Definition at line 2497 of file misc.c.
References assert(), SCIP_HashTable::hashes, hashtableCheckLoad(), hashtableInsert(), hashvalue(), i, SCIP_HashTable::mask, NULL, SCIP_CALL, SCIP_HashTable::slots, TRUE, and SCIP_HashTable::userptr.
Referenced by addConflictBinvar(), bilinearTermsInsertEntry(), checkConsnames(), cleanupHashDatas(), collectAggregatedVars(), collectAggregatedVars(), collectAggregatedVars(), collectBranchingCands(), collectMinactImplicVars(), computeSymmetryGroup(), copyConsPseudoboolean(), correctPresoldata(), createAndAddAndCons(), createConstantAssignment(), createPresoldata(), createVariable(), detectRedundantConstraints(), detectRedundantConstraints(), detectRedundantConstraints(), detectRedundantConstraints(), detectRedundantConstraints(), determineVariableFixings(), fillGraphByConss(), fillGraphByConss(), fillGraphByNonlinearConss(), fillRelationTables(), findCumulativeConss(), getConflictImplics(), mod2matrixPreprocessColumns(), mod2matrixPreprocessRows(), nodepairqueueCreate(), retrieveParallelConstraints(), SCIP_DECL_PRESOLEXEC(), SCIP_DECL_PRESOLEXEC(), SCIP_DECL_PRESOLEXEC(), SCIP_DECL_READERWRITE(), SCIPcliquetableAdd(), SCIPcliquetableCleanup(), SCIPcreateConsPseudobooleanWithConss(), SCIPcutpoolAddNewRow(), SCIPprobAddConsName(), SCIPprobAddVarName(), SCIPvariablegraphBreadthFirst(), SCIPvisualizeConsCumulative(), SCIPwriteMps(), selectSolsRandomized(), setupAndSolveSubscipCrossover(), writeOpbFixedVars(), and writeOpbRelevantAnds().
SCIP_RETCODE SCIPhashtableSafeInsert | ( | SCIP_HASHTABLE * | hashtable, |
void * | element ) |
inserts element in hash table (multiple insertion of same element is checked and results in an error)
inserts element in hash table
hashtable | hash table |
element | element to insert into the table |
Definition at line 2529 of file misc.c.
References assert(), FALSE, SCIP_HashTable::hashes, hashtableCheckLoad(), hashtableInsert(), hashvalue(), i, SCIP_HashTable::mask, NULL, SCIP_CALL, SCIP_HashTable::slots, and SCIP_HashTable::userptr.
Referenced by paramsetAdd(), retrieveParallelConstraints(), and SCIP_DECL_HEUREXEC().
void * SCIPhashtableRetrieve | ( | SCIP_HASHTABLE * | hashtable, |
void * | key ) |
retrieve element with key from hash table, returns NULL if not existing
hashtable | hash table |
key | key to retrieve |
Definition at line 2558 of file misc.c.
References assert(), ELEM_DISTANCE, SCIP_HashTable::hashes, hashvalue(), i, SCIP_HashTable::mask, NULL, SCIP_HashTable::shift, SCIP_HashTable::slots, TRUE, and SCIP_HashTable::userptr.
Referenced by applyVariableAssignment(), cancelCol(), cancelRow(), checkConsnames(), computeSymmetryGroup(), consdataFree(), CREATE_CONSTRAINT(), createAndAddAndCons(), createConstantAssignment(), createLinking(), createVariable(), detectProductsUnconditional(), detectRedundantConstraints(), detectRedundantConstraints(), detectRedundantConstraints(), detectRedundantConstraints(), detectRedundantConstraints(), extractGates(), fillGraphByConss(), fillGraphByConss(), fillGraphByNonlinearConss(), fillRelationTables(), mod2matrixPreprocessColumns(), mod2matrixPreprocessRows(), nodepairqueueCreate(), paramSetBool(), paramSetChar(), paramSetInt(), paramSetLongint(), paramsetParse(), paramSetReal(), paramsetSetHeuristicsAggressive(), paramsetSetHeuristicsFast(), paramsetSetPresolvingAggressive(), paramsetSetPresolvingFast(), paramsetSetSeparatingAggressive(), paramsetSetSeparatingDefault(), parseAggregation(), parseArrayIndex(), parseConstraint(), parseQuadratic(), parseSolveItem(), parseValue(), parseVariableArrayAssignment(), retrieveParallelConstraints(), scalePenalties(), SCIP_DECL_HEUREXEC(), SCIP_DECL_PRESOLEXEC(), SCIP_DECL_PRESOLEXEC(), SCIP_DECL_PRESOLEXEC(), SCIPcliquetableAdd(), SCIPcliquetableCleanup(), SCIPcreateConsPseudobooleanWithConss(), SCIPcutpoolAddRow(), SCIPcutpoolDelRow(), SCIPcutpoolIsCutNew(), SCIPgetBilinTermIdxNonlinear(), SCIPhashtableExists(), SCIPparamsetCopyParams(), SCIPparamsetFix(), SCIPparamsetGetBool(), SCIPparamsetGetChar(), SCIPparamsetGetInt(), SCIPparamsetGetLongint(), SCIPparamsetGetParam(), SCIPparamsetGetReal(), SCIPparamsetGetString(), SCIPparamsetIsFixed(), SCIPparamsetSetBool(), SCIPparamsetSetChar(), SCIPparamsetSetDefaultBool(), SCIPparamsetSetDefaultChar(), SCIPparamsetSetDefaultInt(), SCIPparamsetSetDefaultLongint(), SCIPparamsetSetDefaultReal(), SCIPparamsetSetDefaultString(), SCIPparamsetSetEmphasis(), SCIPparamsetSetInt(), SCIPparamsetSetLongint(), SCIPparamsetSetReal(), SCIPparamsetSetString(), SCIPparamsetSetToDefault(), SCIPprobFindCons(), SCIPprobFindVar(), SCIPprobRemoveConsName(), and transformToOrig().
SCIP_Bool SCIPhashtableExists | ( | SCIP_HASHTABLE * | hashtable, |
void * | element ) |
returns whether the given element exists in the table
hashtable | hash table |
element | element to search in the table |
Definition at line 2609 of file misc.c.
References assert(), SCIP_HashTable::hashes, SCIP_HashTable::mask, NULL, SCIPhashtableRetrieve(), SCIP_HashTable::slots, and SCIP_HashTable::userptr.
Referenced by addConflictBinvar(), cleanupHashDatas(), collectAggregatedVars(), collectAggregatedVars(), collectAggregatedVars(), collectBranchingCands(), collectMinactImplicVars(), computeSymmetryGroup(), consdataFree(), copyConsPseudoboolean(), correctConshdlrdata(), correctPresoldata(), cutpoolDelCut(), determineVariableFixings(), fillGraphByConss(), fillGraphByConss(), fillGraphByNonlinearConss(), findCumulativeConss(), getConflictImplics(), mod2matrixPreprocessRows(), printBoundSection(), printColumnSection(), resolvePropagation(), SCIP_DECL_PRESOLEXIT(), SCIP_DECL_READERWRITE(), SCIPcutpoolAddNewRow(), SCIPprobRemoveVarName(), SCIPvariablegraphBreadthFirst(), SCIPvisualizeConsCumulative(), SCIPwriteMps(), selectSolsRandomized(), transformToOrig(), updateConsanddataUses(), and writeOpbFixedVars().
SCIP_RETCODE SCIPhashtableRemove | ( | SCIP_HASHTABLE * | hashtable, |
void * | element ) |
removes element from the hash table, if it exists
hashtable | hash table |
element | element to remove from the table |
Definition at line 2627 of file misc.c.
References assert(), ELEM_DISTANCE, SCIP_HashTable::hashes, hashvalue(), i, SCIP_HashTable::mask, SCIP_HashTable::nelements, NULL, SCIP_OKAY, SCIP_HashTable::shift, SCIP_HashTable::slots, TRUE, and SCIP_HashTable::userptr.
Referenced by cleanupHashDatas(), consdataFree(), correctConshdlrdata(), correctPresoldata(), cutpoolDelCut(), detectRedundantConstraints(), extractGates(), mod2matrixPreprocessRows(), retrieveParallelConstraints(), SCIP_DECL_PRESOLEXEC(), SCIP_DECL_PRESOLEXEC(), SCIP_DECL_PRESOLEXIT(), SCIPcliquetableCleanup(), SCIPprobRemoveConsName(), SCIPprobRemoveVarName(), and updateConsanddataUses().
void SCIPhashtableRemoveAll | ( | SCIP_HASHTABLE * | hashtable | ) |
removes all elements of the hash table
hashtable | hash table |
Definition at line 2705 of file misc.c.
References assert(), BMSclearMemoryArray, SCIP_HashTable::hashes, SCIP_HashTable::mask, SCIP_HashTable::nelements, and NULL.
Referenced by correctPresoldata(), resolvePropagation(), SCIP_DECL_PRESOLEXEC(), SCIP_DECL_PRESOLEXIT(), SCIPcutpoolClear(), SCIPhashtableClear(), and SCIPvariablegraphBreadthFirst().
SCIP_Longint SCIPhashtableGetNElements | ( | SCIP_HASHTABLE * | hashtable | ) |
returns number of hash table elements
hashtable | hash table |
Definition at line 2717 of file misc.c.
References assert(), SCIP_HashTable::nelements, and NULL.
Referenced by SCIP_DECL_HEUREXEC().
int SCIPhashtableGetNEntries | ( | SCIP_HASHTABLE * | hashtable | ) |
gives the number of entries in the internal arrays of a hash table
hashtable | hash table |
Definition at line 2727 of file misc.c.
References SCIP_HashTable::mask.
Referenced by detectHiddenProducts(), and SCIP_DECL_PRESOLEXEC().
void * SCIPhashtableGetEntry | ( | SCIP_HASHTABLE * | hashtable, |
int | entryidx ) |
gives the element at the given index or NULL if entry at that index has no element
hashtable | hash table |
entryidx | index of hash table entry |
Definition at line 2735 of file misc.c.
References SCIP_HashTable::hashes, i, NULL, and SCIP_HashTable::slots.
Referenced by detectHiddenProducts().
SCIP_Real SCIPhashtableGetLoad | ( | SCIP_HASHTABLE * | hashtable | ) |
returns the load of the given hash table in percentage
hashtable | hash table |
Definition at line 2744 of file misc.c.
References assert(), SCIP_HashTable::mask, SCIP_HashTable::nelements, and NULL.
void SCIPhashtablePrintStatistics | ( | SCIP_HASHTABLE * | hashtable, |
SCIP_MESSAGEHDLR * | messagehdlr ) |
prints statistics about hash table usage
hashtable | hash table |
messagehdlr | message handler |
Definition at line 2754 of file misc.c.
References assert(), ELEM_DISTANCE, SCIP_HashTable::hashes, i, SCIP_HashTable::mask, MAX, SCIP_HashTable::nelements, NULL, and SCIPmessagePrintInfo().
Referenced by detectRedundantConstraints().