MCPcopy Create free account
hub / github.com/comaps/comaps / operator()

Method operator()

libs/coding/compressed_bit_vector.cpp:22–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20 IntersectOp() {}
21
22 unique_ptr<coding::CompressedBitVector> operator()(coding::DenseCBV const & a, coding::DenseCBV const & b) const
23 {
24 size_t const sizeA = a.NumBitGroups();
25 size_t const sizeB = b.NumBitGroups();
26 vector<uint64_t> resGroups(min(sizeA, sizeB));
27 for (size_t i = 0; i < resGroups.size(); ++i)
28 resGroups[i] = a.GetBitGroup(i) & b.GetBitGroup(i);
29 return coding::CompressedBitVectorBuilder::FromBitGroups(std::move(resGroups));
30 }
31
32 // The intersection of dense and sparse is always sparse.
33 unique_ptr<coding::CompressedBitVector> operator()(coding::DenseCBV const & a, coding::SparseCBV const & b) const

Callers

nothing calls this directly

Calls 9

NumBitGroupsMethod · 0.80
GetBitGroupMethod · 0.80
sizeMethod · 0.45
PopCountMethod · 0.45
SelectMethod · 0.45
GetBitMethod · 0.45
push_backMethod · 0.45
BeginMethod · 0.45
EndMethod · 0.45

Tested by

no test coverage detected