MCPcopy Create free account
hub / github.com/1a1a11a/libCacheSim / count

Method count

libCacheSim/dataStructure/sparsepp/spp.h:3122–3126  ·  view source on GitHub ↗

Counts how many elements have key key. For maps, it's either 0 or 1. ---------------------------------------------------------------------

Source from the content-addressed store, hash-verified

3120 // Counts how many elements have key key. For maps, it's either 0 or 1.
3121 // ---------------------------------------------------------------------
3122 size_type count(const key_type &key) const
3123 {
3124 Position pos = _find_position(key);
3125 return (size_type)(pos._t == pt_full ? 1 : 0);
3126 }
3127
3128 // Likewise, equal_range doesn't really make sense for us. Oh well.
3129 // -----------------------------------------------------------------

Callers 2

countMethod · 0.45
countMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected