public static Sample of(final int length) {
		if (length < 1) {
			throw new IllegalArgumentException(format(
				"Length must not be smaller than one, but was %d.", length
			));
		}

		final double[] values = new double[length];
		Arrays.fill(values, Double.NaN);
		return of(values);
	}
Create a new {@code Sample} object of the given {@code length}.

@param length the length of the new {@code Sample} object
@return a new {@code Sample} object of the given {@code length}
@throws IllegalArgumentException if the given {@code length} is smaller
        then one
jenetics.tool/src/main/java/io/jenetics/tool/trial/Sample.java