Package pw.binom

Types

Link copied to clipboard
interface BitArray : Iterable<Boolean>
Link copied to clipboard
value class BitArray32(value: Int) : BitArray

Implements bitset based on Int. Index 0 is the most left bit. For example: index 30 in value 0b010 is 1, index 31 and 29 is 0

Link copied to clipboard
value class BitArray64(value: Long) : BitArray

Implements bitset based on Long. Index 0 is the most left bit. For example: index 30 in value 0b010 is 1, index 31 and 29 is 0

Link copied to clipboard
abstract class BitArrayListIterator(cursor: Int) : ListIterator<Boolean>
Link copied to clipboard
value class BytesBitArray(data: ByteArray) : BitArray

Functions

Link copied to clipboard
fun ByteArray.toBitset(): BytesBitArray

Creates and return BytesBitArray using this array as data.

fun Int.toBitset(): BitArray32
fun Long.toBitset(): BitArray64