MCPcopy Create free account
hub / github.com/Singular/Singular / find

Method find

ppcc/adlib/map.h:288–298  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

286
287template <typename K, typename V>
288bool Map<K, V>::find(K key, V &value) {
289 INIT_HASH_LOOP(key);
290 while (_state[pos] != SLOT_EMPTY) {
291 if (_state[pos] == occ && _cmp(_keys[pos], key) == 0) {
292 value = _values[pos];
293 return true;
294 }
295 pos = next(pos, hash) & mask;
296 }
297 return false;
298}
299
300template <typename K, typename V>
301V Map<K, V>::get(K key, V if_absent) {

Callers 9

indexOfVertexMethod · 0.45
remapMethod · 0.45
permutedMethod · 0.45
containsMethod · 0.45
ppreduceInitiallyFunction · 0.45
intersect_setFunction · 0.45
equal_setFunction · 0.45
MainFunction · 0.45
MakeDirRecFunction · 0.45

Calls 1

nextFunction · 0.85

Tested by 1

MainFunction · 0.36