Save This Page
Home » mahout-collections-1.0-src » org.apache.mahout.math.bitvector » [javadoc | source]
org.apache.mahout.math.bitvector
public class: QuickBitVector [javadoc | source]
java.lang.Object
   org.apache.mahout.math.bitvector.QuickBitVector
Deprecated! until - unit tests are in place. Until this time, this class/interface is unsupported.

Field Summary
protected static final  int BITS_PER_UNIT     
Method from org.apache.mahout.math.bitvector.QuickBitVector Summary:
clear,   get,   getLongFromTo,   leastSignificantBit,   makeBitVector,   mostSignificantBit,   offset,   put,   putLongFromTo,   set,   unit
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.mahout.math.bitvector.QuickBitVector Detail:
 public static  void clear(long[] bits,
    int bitIndex) 
      Deprecated!
    Changes the bit with index bitIndex in the bitvector bits to the "clear" (false) state.
 public static boolean get(long[] bits,
    int bitIndex) 
      Deprecated!
    Returns from the bitvector the value of the bit with the specified index. The value is true if the bit with the index bitIndex is currently set; otherwise, returns false.
 public 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. Bits are returned as a long value with the return value having bit 0 set to bit 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.
 public static int leastSignificantBit(int value) 
      Deprecated!
    Returns the index of the least significant bit in state "true". Returns 32 if no bit is in state "true". Examples:
    0x80000000 --> 31
    0x7fffffff --> 0
    0x00000001 --> 0
    0x00000000 --> 32
    
 public static long[] makeBitVector(int size,
    int bitsPerElement) 
      Deprecated!
    Constructs a low level bitvector that holds size elements, with each element taking bitsPerElement bits.
 public static int mostSignificantBit(int value) 
      Deprecated!
    Returns the index of the most significant bit in state "true". Returns -1 if no bit is in state "true". Examples:
    0x80000000 --> 31
    0x7fffffff --> 30
    0x00000001 --> 0
    0x00000000 --> -1
    
 protected static int offset(int bitIndex) 
      Deprecated!
    Returns the index within the unit that contains the given bitIndex.
 public 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.
 public 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. 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.
 public 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.