| Package | de.polygonal.ds |
| Class | public class BitVector |
| Inheritance | BitVector Object |
| Subclasses | BitBoard |
| Property | Defined By | ||
|---|---|---|---|
| bitCount : int [read-only]
The total number of bits. | BitVector | ||
| cellCount : int [read-only]
The total number of cells. | BitVector | ||
| Method | Defined By | ||
|---|---|---|---|
BitVector(bits:int)
Creates a bit-vector with a given number of bits. | BitVector | ||
clear():void
Resets all bits to 0;
| BitVector | ||
getBit(index:int):int
Gets a bit from a given index. | BitVector | ||
resize(size:int):void
Resizes the bit-vector to an appropriate number of bits. | BitVector | ||
setAll():void
Sets each bit to 1. | BitVector | ||
setBit(index:int, b:Boolean):void
Sets a bit at a given index. | BitVector | ||
toString():String
Prints out a string representing the current object. | BitVector | ||
| bitCount | property |
bitCount:int [read-only] The total number of bits.
public function get bitCount():int| cellCount | property |
cellCount:int [read-only] The total number of cells.
public function get cellCount():int| BitVector | () | Constructor |
public function BitVector(bits:int)Creates a bit-vector with a given number of bits. Each cell holds an int, allowing to store 32 flags each.
Parametersbits:int — The total number of bits.
|
| clear | () | method |
public function clear():voidResets all bits to 0;
| getBit | () | method |
public function getBit(index:int):intGets a bit from a given index.
Parameters
index:int — The index of the bit.
|
int |
| resize | () | method |
public function resize(size:int):voidResizes the bit-vector to an appropriate number of bits.
Parameters
size:int — The total number of bits.
|
| setAll | () | method |
public function setAll():voidSets each bit to 1.
| setBit | () | method |
public function setBit(index:int, b:Boolean):voidSets a bit at a given index.
Parameters
index:int — The index of the bit.
| |
b:Boolean — The boolean flag to set.
|
| toString | () | method |
public function toString():StringPrints out a string representing the current object.
ReturnsString — A string representing the current object.
|