createNewBitSet

fun createNewBitSet(numBits: Int, genes: Array<Boolean>? = null): BinarySet

Creates a new BinarySet with numBits bits and, if provided, sets bits from genes. Marks caches dirty so callers can install the returned bitset into variables()[0].

Parameters

numBits

number of bits

genes

optional boolean array to initialize bits (truncated to numBits)