BitSet

Data Structures View source
BitSet

Read the BitSet guide

Types

Functions and constants

public constant BITSET_SIZE = 32
public function emptyBitset() returns bitset

Creates an empty bitset.

public function bitset.get(int index) returns bool

Returns the value of the bit with the specified index. Errors if the index is outside [0, BITSET_SIZE) while safety checks are enabled, as do set, reset and flip.

public function bitset.set(int index) returns bitset

Sets the bit at the specified index to true.

public function bitset.reset(int index) returns bitset

Sets the bit at the specified index to false.

public function bitset.set(int index, bool value) returns bitset

Sets the bit at the specified index to the specified value.

public function bitset.flip(int index) returns bitset

Sets the bit at the specified index to the complement of its current value.

public function bitset.isEmpty() returns bool

Returns true if this bitset contains no bits that are set to true.

public function bitset.intersects(bitset other) returns bool

Returns true if the specified bitset has any bits set to true that are also set to true in this bitset.

public function bitset.bitAnd(bitset other) returns bitset

Performs a logical AND of this bit set with the bit set argument.

public function bitset.bitOr(bitset other) returns bitset

Performs a logical OR of this bit set with the bit set argument.

public function bitset.bitXor(bitset other) returns bitset

Performs a logical XOR of this bit set with the bit set argument.

public function bitset.toInt() returns int

Returns an integer representation of the data.

public function bitsetToIndex(bitset object) returns int
public function bitsetFromIndex(int index) returns bitset