Package pw.binom

Types

Link copied to clipboard
interface BitArray : Iterable<Boolean> , RandomAccess, List<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
class BitArrayListIteratorImpl(cursor: Int, sizeProvider: () -> Int, dataProvider: (Int) -> Boolean) : BitArrayListIterator
Link copied to clipboard
value class BytesBitArray(data: ByteArray) : MutableBitArray
Link copied to clipboard
value class LongsBitArray(data: LongArray) : MutableBitArray
Link copied to clipboard
interface MutableBitArray : 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