MCPcopy Create free account
hub / github.com/Gecode/gecode / status

Method status

gecode/support/bitset-base.hpp:503–527  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

501 }
502
503 forceinline BitSetStatus
504 RawBitSetBase::status(unsigned int sz) const {
505 unsigned int pos = sz / bpb;
506 unsigned int bits = sz % bpb;
507 if (pos > 0) {
508 if (data[0].all()) {
509 for (unsigned int i=1; i<pos; i++)
510 if (!data[i].all())
511 return BSS_SOME;
512 return data[pos].all(bits) ? BSS_ALL : BSS_SOME;
513 } else if (data[0].none()) {
514 for (unsigned int i=1; i<pos; i++)
515 if (!data[i].none())
516 return BSS_SOME;
517 return data[pos].none(bits) ? BSS_NONE : BSS_SOME;
518 } else {
519 return BSS_SOME;
520 }
521 }
522 if (data[0].all(bits))
523 return BSS_ALL;
524 if (data[0].none(bits))
525 return BSS_NONE;
526 return BSS_SOME;
527 }
528
529 forceinline bool
530 RawBitSetBase::all(unsigned int sz) const {

Callers

nothing calls this directly

Calls 2

allMethod · 0.45
noneMethod · 0.45

Tested by

no test coverage detected