DoubleGene implements
		NumericGene<Double, DoubleGene>,
		Mean<DoubleGene>,
		Comparable<DoubleGene>,
		Serializable { @Override public DoubleGene mean(final DoubleGene that) { return of(_allele + (that._allele - _allele)/2.0, _min, _max); } private  DoubleGene(final double allele, final double min, final double max); @Override Double allele(); @Override Double min(); @Override Double max(); DoubleRange range(); @Override byte byteValue(); @Override short shortValue(); @Override int intValue(); @Override long longValue(); @Override float floatValue(); @Override double doubleValue(); @Override boolean isValid(); @Override int compareTo(final DoubleGene other); @Override DoubleGene mean(final DoubleGene that); DoubleGene newInstance(final double allele); @Override DoubleGene newInstance(final Double allele); @Override DoubleGene newInstance(final Number allele); @Override DoubleGene newInstance(); @Override int hashCode(); @Override boolean equals(final Object obj); @Override String toString(); static DoubleGene of(
		final double allele,
		final double min,
		final double max
	); static DoubleGene of(final double allele, final DoubleRange range); static DoubleGene of(final double min, final double max); static DoubleGene of(final DoubleRange range);  }
@Test public void mean() { final double min = -Double.MAX_VALUE; final double max = Double.MAX_VALUE; final DoubleGene template = DoubleGene.of(min, max); for (int i = 1; i < 500; ++i) { final DoubleGene a = template.newInstance(i - 50.0); final DoubleGene b = template.newInstance((i - 100)*3.0); final DoubleGene c = a.mean(b); assertEquals(a.min().doubleValue(), min); assertEquals(a.max().doubleValue(), max); assertEquals(b.min().doubleValue(), min); assertEquals(b.max().doubleValue(), max); assertEquals(c.min().doubleValue(), min); assertEquals(c.max().doubleValue(), max); assertEquals(c.allele().doubleValue(), ((i - 50) + ((i - 100)*3))/2.0); } }