MCPcopy Create free account
hub / github.com/ElementsProject/elements / BuildHashedSet

Function BuildHashedSet

src/test/fuzz/golomb_rice.cpp:31–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29}
30
31std::vector<uint64_t> BuildHashedSet(const std::unordered_set<std::vector<uint8_t>, ByteVectorHash>& elements, const uint64_t f)
32{
33 std::vector<uint64_t> hashed_elements;
34 hashed_elements.reserve(elements.size());
35 for (const std::vector<uint8_t>& element : elements) {
36 hashed_elements.push_back(HashToRange(element, f));
37 }
38 std::sort(hashed_elements.begin(), hashed_elements.end());
39 return hashed_elements;
40}
41} // namespace
42
43FUZZ_TARGET(golomb_rice)

Callers 3

GCSFilterMethod · 0.85
MatchAnyMethod · 0.85
FUZZ_TARGETFunction · 0.85

Calls 6

HashToRangeFunction · 0.85
reserveMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected