@@ -0,0 +1,1897 @@
+/*%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 * %09 Franz Wilhelmst%C3%B6tter (franz.wilhelmstoetter@gmx.at)%0A *%0A */%0Apackage org.jenetics;%0A%0Aimport java.util.Random;%0A%0Aimport org.jenetics.util.MSeq;%0Aimport org.jenetics.util.RandomRegistry;%0A%0A/**%0A * @author %3Ca href=%22mailto:franz.wilhelmstoetter@gmx.at%22%3EFranz Wilhelmst%C3%B6tter%3C/a%3E%0A * @since 1.2%0A * @version 1.2 &mdash; %3Cem%3E$Date: 2013-02-18 $%3C/em%3E%0A */%0Apublic class NPointCrossover%3CG extends Gene%3C?, G%3E%3E extends Crossover%3CG%3E %7B%0A%0A%09private final int _n;%0A%0A%09public NPointCrossover(final double probability, final int n) %7B%0A%09%09super(probability);%0A%09%09_n = n;%0A%09%7D%0A%0A%09public NPointCrossover(final double probability) %7B%0A%09%09this(probability, 2);%0A%09%7D%0A%0A%09public NPointCrossover(final int n) %7B%0A%09%09this(0.05, n);%0A%09%7D%0A%0A%09public NPointCrossover() %7B%0A%09%09this(0.05, 2);%0A%09%7D%0A%0A%09@Override%0A%09protected int crossover(final MSeq%3CG%3E that, final MSeq%3CG%3E other) %7B%0A%09%09assert (that.length() == other.length());%0A%0A%09%09final Random random = RandomRegistry.getRandom();%0A%09%09final int index = random.nextInt(that.length());%0A%0A%09%09that.swap(index, that.length(), other, index);%0A%0A%09%09return 2;%0A%09%7D%0A%0A%7D%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A

Add 'NPointCrossover' class.