class DoubleGenotype extends ArrayList<Double> implements ListGenotype<Double> {

	public void init(Random random, int n) {
		try {
			getLowerBound(n - 1);
			getUpperBound(n - 1);
		} catch (IndexOutOfBoundsException outOfBoundException) {
			throw new IllegalArgumentException(
					"Cannot initialize a genotype with " + n + " entries with the specified bounds",
					outOfBoundException);
		}
		for (int i = 0; i < n; i++) {
			double lo = getLowerBound(i);
			double hi = getUpperBound(i);
			double value = lo + random.nextDouble() * (hi - lo);
			if (i >= size()) {
				add(value);
			} else {
				set(i, value);
			}
		}
	}

	public  DoubleGenotype();
	public  DoubleGenotype(double lowerBound, double upperBound);
	public  DoubleGenotype(Bounds<Double> bounds);

}