MCPcopy Create free account
hub / github.com/devosoft/avida / NOT

Method NOT

avida-core/source/tools/cBitArray.cc:202–213  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

200}
201
202void cRawBitArray::NOT(const int num_bits)
203{
204 const int num_fields = GetNumFields(num_bits);
205 for (int i = 0; i < num_fields; i++) {
206 bit_fields[i] = ~bit_fields[i];
207 }
208
209 const int last_bit = GetFieldPos(num_bits);
210 if (last_bit > 0) {
211 bit_fields[num_fields - 1] &= (1 << last_bit) - 1;
212 }
213}
214
215void cRawBitArray::AND(const cRawBitArray & array2, const int num_bits)
216{

Callers 2

mainFunction · 0.45
RunTestsMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected