MCPcopy Create free account
hub / github.com/comaps/comaps / ForEach

Method ForEach

libs/coding/compressed_bit_vector.hpp:233–251  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

231 // the bit's 0-based position as argument.
232 template <typename Fn>
233 static void ForEach(CompressedBitVector const & cbv, Fn && f)
234 {
235 CompressedBitVector::StorageStrategy strat = cbv.GetStorageStrategy();
236 switch (strat)
237 {
238 case CompressedBitVector::StorageStrategy::Dense:
239 {
240 DenseCBV const & denseCBV = static_cast<DenseCBV const &>(cbv);
241 denseCBV.ForEach(f);
242 return;
243 }
244 case CompressedBitVector::StorageStrategy::Sparse:
245 {
246 SparseCBV const & sparseCBV = static_cast<SparseCBV const &>(cbv);
247 sparseCBV.ForEach(f);
248 return;
249 }
250 }
251 }
252};
253
254class CompressedBitVectorHasher

Callers

nothing calls this directly

Calls 2

GetStorageStrategyMethod · 0.80
ForEachMethod · 0.45

Tested by

no test coverage detected