MCPcopy Create free account
hub / github.com/data61/MP-SPDZ / get_bit

Method get_bit

Tools/BitVector.h:185–192  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

183 template <class T, int L>
184 void set(const FixedVec<T, L>& a);
185 bool get_bit(int i) const
186 {
187#ifdef CHECK_SIZE
188 if (i >= (int)nbits)
189 throw out_of_range("BitVector access: " + to_string(i) + "/" + to_string(nbits));
190#endif
191 return (bytes[i/8] >> (i % 8)) & 1;
192 }
193 void set_bit(int i,unsigned int a)
194 {
195 if ((size_t)i >= nbits)

Callers 1

getMethod · 0.45

Calls 1

to_stringFunction · 0.50

Tested by

no test coverage detected