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

Method NAND

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

Source from the content-addressed store, hash-verified

229}
230
231void cRawBitArray::NAND(const cRawBitArray & array2, const int num_bits)
232{
233 const int num_fields = GetNumFields(num_bits);
234 for (int i = 0; i < num_fields; i++) {
235 bit_fields[i] = ~(bit_fields[i] & array2.bit_fields[i]);
236 }
237
238 const int last_bit = GetFieldPos(num_bits);
239 if (last_bit > 0) {
240 bit_fields[num_fields - 1] &= (1 << last_bit) - 1;
241 }
242}
243
244void cRawBitArray::NOR(const cRawBitArray & array2, const int num_bits)
245{

Callers 2

mainFunction · 0.45
RunTestsMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected