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

Method intersect_with

ppcc/adlib/map.h:392–399  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

390
391template <typename K, typename V>
392Map<K, V> *Map<K, V>::intersect_with(Map<K, V> *that) {
393 Map<K, V> *result = new Map<K, V>(_cmp, _hash);
394 for (Each it(this); it; it++) {
395 if (that->contains(it.key()))
396 result->add(it.key(), it.value());
397 }
398 return result;
399}
400
401template <typename K, typename V>
402Map<K, V> *Map<K, V>::intersect_in_place(Map<K, V> *that) {

Callers 2

MainFunction · 0.45
MainFunction · 0.45

Calls 3

containsMethod · 0.45
addMethod · 0.45
valueMethod · 0.45

Tested by 2

MainFunction · 0.36
MainFunction · 0.36