Find the index of the previous clear bit less than or equal to i.

@param i starting index
@return index of the previous clear bit
5025
public int prevClearBit(final int i) {
    int x = i >> 6; // i / 64 with sign extension
    long w = ~bitmap.get(x);
    w <<= 64 - i - 1;
    if (w != 0L) {
      return i - Long.numberOfLeadingZeros(w);
    }
    for (--x; x >= 0; --x) {
      long map = ~bitmap.get(x);
      if (map != 0L) {
        return x * 64 + 63 - Long.numberOfLeadingZeros(map);
      }
    }
    return -1;
  }
124095
public void clear(int i) {
        char ch = (char) -1;
        int apos = i - 1;
        int rpos = pos - 1;
        for (; rpos > -1 && apos > -1; rpos--, apos--) {
            buffer[rpos] = ch;
            buffer2[rpos] = -1;
        }
        for (rpos = buffer.length - 1; apos > -1; rpos--, apos--) {
            buffer[rpos] = ch;
            buffer2[rpos] = -1;
        }
    }
1101980
@Override
    public final int getInt(final int i) {
        int val = this.array.optInt(i, Integer.MIN_VALUE);
        if (val == Integer.MIN_VALUE) {
            throw new ObjectMissingException(this, "[" + i + "]");
        }
        return val;
    }
1184852
public int indexOf(byte b) {
        if (_buf.hasArray()) {
            byte[] array = _buf.array();
            int arrayOffset = _buf.arrayOffset();
            int startAt = arrayOffset + position();
            int endAt = arrayOffset + limit();

            for (int i = startAt; i < endAt; i++) {
                if (array[i] == b) {
                    return i - arrayOffset;
                }
            }
            return -1;
        } else {
            int startAt = _buf.position();
            int endAt = _buf.limit();

            for (int i = startAt; i < endAt; i++) {
                if (_buf.get(i) == b) {
                    return i;
                }
            }
            return -1;
        }
    }
1056405
public String getValue(int i) {
        if (i < 0 || i >= values.size()) {
            return null;
        }
        return values.get(i);
    }
1272620
public DataBuffer getIndicesOf(int i) {
        int from = underlyingRank() * i;
        int to = from + underlyingRank(); //not included

        int[] arr = new int[rank];
        int j = 0; // iterator over underlying indices
        int k = 0; //iterator over hiddenIdx
        for (int dim = 0; dim < rank; dim++) {
            if (k < hiddenDimensions().length && hiddenDimensions()[k] == j) {
                arr[dim] = 0;
                k++;
            } else {
                arr[dim] = indices.getInt(j);
                j++;
            }
        }
        return Nd4j.getDataBufferFactory().createInt(arr);
    }
1178173
public int lastIndexOf(byte b) {
        byte[] bytes = getByteArray();
        int offset = getByteOffset();
        int i = getByteLength() - 1;
        while (i >= 0 && bytes[offset + i] != b) i--;
        return i;
    }
174936
private int compare(int i) {

        if (sortOnValues) {
            if (targetSearchValue > values[i]) {
                return 1;
            } else if (targetSearchValue < values[i]) {
                return -1;
            }
        } else {
            if (targetSearchValue > keys[i]) {
                return 1;
            } else if (targetSearchValue < keys[i]) {
                return -1;
            }
        }

        return 0;
    }
570757
private void reverseAfter(int i) {
		int start = i+1;
		int end = n-1;
		while (start < end) {
			swap(index,start,end);
			start++;
			end--;
		}
	}
546468
public int indexOf(int[] sequence) {
        int index = -1;
        for (int i = 0; index == -1 && i <= currentSize - sequence.length;
             i++) {
            if (buffer[i] == sequence[0]) {
                boolean matches = true;
                for (int j = 1; matches && j < sequence.length; j++) {
                    if (buffer[i + j] != sequence[j]) {
                        matches = false;
                    }
                }
                if (matches) {
                    index = i;
                }
            }
        }
        return index;
    }
1286322
public double get(long i) {
        if (i < 0 || i >= idxAfterLast) {
            return missingEntries;
        }
        return elements[SafeCast.safeLongToInt(i)];
    }
1082042
public int nextSetBit(final int i) {
    int x = i >> 6; // signed i / 64
    long w = bitmap.get(x);
    w >>>= i;
    if (w != 0) {
      return i + numberOfTrailingZeros(w);
    }
    // for speed, replaced bitmap.limit() with hardcoded MAX_CAPACITY / 64
    for (++x; x < MAX_CAPACITY / 64; ++x) {
      long X = bitmap.get(x);
      if (X != 0) {
        return x * 64 + numberOfTrailingZeros(X);
      }
    }
    return -1;
  }
1362009
public static int cardinality(SkippableIterator i) {
		int card = 0;
		while (i.hasValue()) {
			card += Integer.bitCount(i.getCurrentWord());
			i.advance();
		}
		return card;
	}
165157
protected int removeHeapNode(int i)
    {
        int val = heap[i];
        int rightMost = --size;
        heap[i] = heap[rightMost];
        heap[rightMost] = 0;
        if(fastValueRemove == Mode.HASH)
        {
            valueIndexMap.remove(val);
            if(size != 0)
                valueIndexMap.put(heap[i], i);
        }
        else if(fastValueRemove == Mode.BOUNDED)
        {
            valueIndexStore[val] = -1;
        }
        heapDown(i);
        return val;
    }
916136
def get_raw_index(self, i):
        
        if self.is_indexed:
            return int(self.order[i])
        if self.data.base is None:
            return int(i)
        return int(self.data_start - self.base_start + i)
645381
public static int ofSetBits32_1(int i) {
        i = i - ((i >>> 1) & 0x55555555);
        i = (i & 0x33333333) + ((i >>> 2) & 0x33333333);
        i = ((i + (i >>> 4)) & 0x0F0F0F0F);
        return (i * (0x01010101)) >>> 24;
    }
288091
public final void removeElementAt(int i)
  {

    if (i > m_firstFree)
      System.arraycopy(m_map, i + 1, m_map, i, m_firstFree);
    else
      m_map[i] = java.lang.Integer.MIN_VALUE;

    m_firstFree--;
  }