@@ -0,0 +1,2196 @@
+/*%0A * Java Genetic Algorithm Library (@__identifier__@).%0A * Copyright (c) @__year__@ Franz Wilhelmst%C3%B6tter%0A *%0A * This library is free software; you can redistribute it and/or%0A * modify it under the terms of the GNU Lesser General Public%0A * License as published by the Free Software Foundation; either%0A * version 2.1 of the License, or (at your option) any later version.%0A *%0A * This library is distributed in the hope that it will be useful,%0A * but WITHOUT ANY WARRANTY; without even the implied warranty of%0A * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.%09See the GNU%0A * Lesser General Public License for more details.%0A *%0A * You should have received a copy of the GNU Lesser General Public%0A * License along with this library; if not, write to the Free Software%0A * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA%0A *%0A * Author:%0A *     Franz Wilhelmst%C3%B6tter (franz.wilhelmstoetter@gmx.at)%0A *%0A */%0Apackage org.jenetix.util;%0A%0Aimport java.util.Random;%0A%0Aimport org.jscience.mathematics.number.Complex;%0A%0Aimport org.jenetics.util.RandomRegistry;%0Aimport org.jenetics.util.object;%0A%0A/**%0A * Random number generator for %7B@link Complex%7D values within a defined range.%0A *%0A * @author %3Ca href=%22mailto:franz.wilhelmstoetter@gmx.at%22%3EFranz Wilhelmst%C3%B6tter%3C/a%3E%0A * @since 1.0%0A * @version 1.0 &mdash; %3Cem%3E$Date: 2013-03-15 $%3C/em%3E%0A */%0Apublic class ComplexRandom implements NumberRandom%3CComplex%3E %7B%0A%0A%09private Random _random;%0A%0A%09public ComplexRandom(final Random random) %7B%0A%09%09_random = object.nonNull(random, %22Random%22);%0A%09%7D%0A%0A%09public ComplexRandom() %7B%0A%09%09this(RandomRegistry.getRandom());%0A%09%7D%0A%0A%09@Override%0A%09public Complex next(final Complex min, final Complex max) %7B%0A%09%09return next(_random, min, max);%0A%09%7D%0A%0A%09public static Complex next(final Random random, final Complex min, final Complex max) %7B%0A%09%09if (min.getReal() %3E max.getReal() %7C%7C min.getImaginary() %3E max.getImaginary()) %7B%0A%09%09%09throw new IllegalArgumentException();%0A%09%09%7D%0A%0A%09%09final double real = random.nextDouble()*(max.getReal() - min.getReal()) +%0A%09%09%09%09%09%09%09%09min.getReal();%0A%09%09final double imag = random.nextDouble()*(max.getImaginary() - min.getImaginary()) +%0A%09%09%09%09%09%09%09%09min.getImaginary();%0A%0A%09%09return Complex.valueOf(real, imag);%0A%09%7D%0A%0A%7D%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A

Add ComplexRandom classes.