/** or this element into this set (grow as necessary to accommodate) */ @Override public void add(int el) { //System.out.println("add("+el+")"); int n = wordNumber(el); //System.out.println("word number is "+n); //System.out.println("bits.length "+bits.length); if (n >= bits.length) { growToInclude(el); } bits[n] |= bitMask(el); }
/** complement bits in the range minBit..maxBit.*/ public void notInPlace(int minBit, int maxBit) { // make sure that we have room for maxBit growToInclude(maxBit); for (int i = minBit; i <= maxBit; i++) { int n = wordNumber(i); bits[n] ^= bitMask(i); } }
public void clear(int el) { int n = wordNumber(el); if (n >= bits.length) { // grow as necessary to accommodate growToInclude(el); } bits[n] &= ~bitMask(el); }
public void clear(int el) { int n = wordNumber(el); if (n >= bits.length) { // grow as necessary to accommodate growToInclude(el); } bits[n] &= ~bitMask(el); }
public void remove(int el) { int n = wordNumber(el); if (n >= bits.length) { growToInclude(el); } bits[n] &= ~bitMask(el); }
/** or this element into this set (grow as necessary to accommodate) */ @Override public void add(int el) { //System.out.println("add("+el+")"); int n = wordNumber(el); //System.out.println("word number is "+n); //System.out.println("bits.length "+bits.length); if (n >= bits.length) { growToInclude(el); } bits[n] |= bitMask(el); }
@Override public void remove(int el) { int n = wordNumber(el); if (n >= bits.length) { growToInclude(el); } bits[n] &= ~bitMask(el); }
public void clear(int el) { int n = wordNumber(el); if (n >= bits.length) { // grow as necessary to accommodate growToInclude(el); } bits[n] &= ~bitMask(el); }
public void clear(int el) { int n = wordNumber(el); if (n >= bits.length) { // grow as necessary to accommodate growToInclude(el); } bits[n] &= ~bitMask(el); }
/** complement bits in the range minBit..maxBit.*/ public void notInPlace(int minBit, int maxBit) { // make sure that we have room for maxBit growToInclude(maxBit); for (int i = minBit; i <= maxBit; i++) { int n = wordNumber(i); bits[n] ^= bitMask(i); } }
public void remove(int el) { int n = wordNumber(el); if (n >= bits.length) { growToInclude(el); } bits[n] &= ~bitMask(el); }
/** or this element into this set (grow as necessary to accommodate) */ public void add(int el) { //System.out.println("add("+el+")"); int n = wordNumber(el); //System.out.println("word number is "+n); //System.out.println("bits.length "+bits.length); if (n >= bits.length) { growToInclude(el); } bits[n] |= bitMask(el); }
@Override public void remove(int el) { int n = wordNumber(el); if (n >= bits.length) { growToInclude(el); } bits[n] &= ~bitMask(el); }
/** or this element into this set (grow as necessary to accommodate) */ public void add(int el) { //System.out.println("add("+el+")"); int n = wordNumber(el); //System.out.println("word number is "+n); //System.out.println("bits.length "+bits.length); if (n >= bits.length) { growToInclude(el); } bits[n] |= bitMask(el); }
/** complement bits in the range minBit..maxBit.*/ public void notInPlace(int minBit, int maxBit) { // make sure that we have room for maxBit growToInclude(maxBit); for (int i = minBit; i <= maxBit; i++) { int n = wordNumber(i); bits[n] ^= bitMask(i); } }
/** complement bits in the range minBit..maxBit.*/ public void notInPlace(int minBit, int maxBit) { // make sure that we have room for maxBit growToInclude(maxBit); for (int i = minBit; i <= maxBit; i++) { int n = wordNumber(i); bits[n] ^= bitMask(i); } }