|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.mahout.math.bitvector.QuickBitVector
@Deprecated public class QuickBitVector
| Field Summary | |
|---|---|
protected static int |
BITS_PER_UNIT
Deprecated. |
| Method Summary | |
|---|---|
static void |
clear(long[] bits,
int bitIndex)
Deprecated. Changes the bit with index bitIndex in the bitvector bits to the "clear" (false) state. |
static boolean |
get(long[] bits,
int bitIndex)
Deprecated. Returns from the bitvector the value of the bit with the specified index. |
static long |
getLongFromTo(long[] bits,
int from,
int to)
Deprecated. Returns a long value representing bits of a bitvector from index from to index to. |
static int |
leastSignificantBit(int value)
Deprecated. Returns the index of the least significant bit in state "true". |
static long[] |
makeBitVector(int size,
int bitsPerElement)
Deprecated. Constructs a low level bitvector that holds size elements, with each element taking bitsPerElement bits. |
static int |
mostSignificantBit(int value)
Deprecated. Returns the index of the most significant bit in state "true". |
protected static int |
offset(int bitIndex)
Deprecated. Returns the index within the unit that contains the given bitIndex. |
static void |
put(long[] bits,
int bitIndex,
boolean value)
Deprecated. Sets the bit with index bitIndex in the bitvector bits to the state specified by value. |
static void |
putLongFromTo(long[] bits,
long value,
int from,
int to)
Deprecated. Sets bits of a bitvector from index from to index to to the bits of value. |
static void |
set(long[] bits,
int bitIndex)
Deprecated. Changes the bit with index bitIndex in the bitvector bits to the "set" (true) state. |
protected static int |
unit(int bitIndex)
Deprecated. Returns the index of the unit that contains the given bitIndex. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final int BITS_PER_UNIT
| Method Detail |
|---|
public static void clear(long[] bits,
int bitIndex)
bits - the bitvector.bitIndex - the index of the bit to be cleared.
public static boolean get(long[] bits,
int bitIndex)
bits - the bitvector.bitIndex - the bit index.
public static long getLongFromTo(long[] bits,
int from,
int to)
from, ..., bit
to-from set to bit to. All other bits of return value are set to 0. If from >
to then returns zero (0L). Precondition (not checked): to-from+1 <= 64.
bits - the bitvector.from - index of start bit (inclusive).to - index of end bit (inclusive).
public static int leastSignificantBit(int value)
0x80000000 --> 31 0x7fffffff --> 0 0x00000001 --> 0 0x00000000 --> 32
public static long[] makeBitVector(int size,
int bitsPerElement)
size - the number of elements to be stored in the bitvector (must be >= 0).bitsPerElement - the number of bits one single element takes.
public static int mostSignificantBit(int value)
0x80000000 --> 31 0x7fffffff --> 30 0x00000001 --> 0 0x00000000 --> -1
protected static int offset(int bitIndex)
public static void put(long[] bits,
int bitIndex,
boolean value)
bits - the bitvector.bitIndex - the index of the bit to be changed.value - the value to be stored in the bit.
public static void putLongFromTo(long[] bits,
long value,
int from,
int to)
from to index to to the bits of value.
Bit from is set to bit 0 of value, ..., bit to is set to bit
to-from of value. All other bits stay unaffected. If from > to then does
nothing. Precondition (not checked): to-from+1 <= 64.
bits - the bitvector.value - the value to be copied into the bitvector.from - index of start bit (inclusive).to - index of end bit (inclusive).
public static void set(long[] bits,
int bitIndex)
bits - the bitvector.bitIndex - the index of the bit to be set.protected static int unit(int bitIndex)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||