MCPcopy Create free account
hub / github.com/LucaFulchir/libRaptorQ / add

Method add

src/Precode_Matrix.cpp:62–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60}
61
62void Bitmask::add (const size_t id)
63{
64 size_t element = static_cast<size_t> (div_floor (id, sizeof(size_t)));
65 while (element >= mask.size())
66 mask.push_back(0);
67 if (exists(id))
68 return;
69
70 size_t add_mask = 1 << (id - (element * sizeof(size_t)));
71 mask[element] |= add_mask;
72 if (id < _max_nonrepair)
73 --holes;
74}
75
76bool Bitmask::exists (const size_t id ) const
77{

Callers 2

add_symbolMethod · 0.80
decodeMethod · 0.80

Calls 3

div_floorFunction · 0.70
sizeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected