DoubleChromosome extends AbstractBoundedChromosome<Double, DoubleGene> implements
		NumericChromosome<Double, DoubleGene>,
		Serializable { public DoubleStream doubleStream() { return IntStream.range(0, length()).mapToDouble(this::doubleValue); } protected  DoubleChromosome(
		final ISeq<DoubleGene> genes,
		final IntRange lengthRange
	); @Override DoubleChromosome newInstance(final ISeq<DoubleGene> genes); @Override DoubleChromosome newInstance(); DoubleChromosome map(final Function<? super double[], double[]> f); DoubleStream doubleStream(); double[] toArray(final double[] array); double[] toArray(); static DoubleChromosome of(final DoubleGene... genes); static DoubleChromosome of(final Iterable<DoubleGene> genes); static DoubleChromosome of(
		final double min,
		final double max,
		final IntRange lengthRange
	); static DoubleChromosome of(
		final double min,
		final double max,
		final int length
	); static DoubleChromosome of(
		final DoubleRange range,
		final IntRange lengthRange
	); static DoubleChromosome of(final DoubleRange range, final int length); static DoubleChromosome of(final double min, final double max); static DoubleChromosome of(final DoubleRange range);  }
@Test public void doubleStream() { final DoubleChromosome chromosome = DoubleChromosome.of(0, 1, 1000); final double[] values = chromosome.doubleStream().toArray(); Assert.assertEquals(values.length, 1000); for (int i = 0; i < values.length; ++i) { Assert.assertEquals(chromosome.get(i).doubleValue(), values[i]); Assert.assertEquals(chromosome.doubleValue(i), values[i]); } }