|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectat.ac.sbg.cosy.soccerbot.recognition.splitmerge.BitSet
public class BitSet
Library for storage of sets of single bits
Constructor Summary | |
---|---|
BitSet()
|
Method Summary | |
---|---|
static int |
bitCount(int[] bitSet)
Returns the total number of bits set to 1 within bitSet |
static int |
calculateSize(int size)
Calculates the size of a new BitSet as int array which has space for at least size bits and pads the rest (modulo 32) |
static void |
copy(int[] sourceBitSet,
int[] targetBitSet)
Copies source BitSet into target Bitset, requires both BitSets to be initialized and of same length. |
static int |
firstBit(int[] bitSet)
Returns the index of the first bit set to 1 within bitSet |
static int |
getBit(int[] array,
int index)
Returns a specified bit within a bitset implemented as integer-array |
static void |
releaseBit(int[] array,
int index)
Releases a bit within a bitset implemented as integer-array (sets bit to 0) |
static void |
setBit(int[] array,
int index)
Sets a bit within a bitset implemented as integer-array (sets bit to 1) |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BitSet()
Method Detail |
---|
public static int calculateSize(int size)
size
- > 0 number of bits within bitset
public static int getBit(int[] array, int index)
array
- initialized bitsetindex
- >= 0, < array.length * 32 position of bit within bitset
public static void setBit(int[] array, int index)
array
- initialized bitsetindex
- >= 0, < array.length * 32 position of bit within bitsetpublic static void releaseBit(int[] array, int index)
array
- initialized bitsetindex
- >= 0, < array.length * 32 position of bit within bitsetpublic static int bitCount(int[] bitSet)
bitSet
- int array used as a set of bits that can be accessed directly
public static int firstBit(int[] bitSet)
bitSet
- int array used as a set of bits that can be accessed directly
public static void copy(int[] sourceBitSet, int[] targetBitSet)
sourceBitSet
- source of deep copy operationtargetBitSet
- target of deep copy operation
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |