public static BitArray ofLength(final int length, final double p) {
		return new BitArray(Bits.newArray(length, p), 0, length);
	}
Create a new bit-array which can store at least the number
of bits as defined by the given {@code length} parameter. The returned
byte array is initialized with ones according to the given ones
probability {@code p}.

@param length the number of bits, the returned bit-array can store.
@param p the ones probability of the returned byte array.
@return the new byte array.s
@throws IllegalArgumentException if {@code p} is not a valid probability.
jenetics/src/main/java/io/jenetics/internal/collection/BitArray.java