@@ -0,0 +1,1759 @@
+/*%0D%0A * Encog(tm) Core v3.2 - Java Version%0D%0A * http://www.heatonresearch.com/encog/%0D%0A * https://github.com/encog/encog-java-core%0D%0A %0D%0A * Copyright 2008-2013 Heaton Research, Inc.%0D%0A *%0D%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0D%0A * you may not use this file except in compliance with the License.%0D%0A * You may obtain a copy of the License at%0D%0A *%0D%0A *     http://www.apache.org/licenses/LICENSE-2.0%0D%0A *%0D%0A * Unless required by applicable law or agreed to in writing, software%0D%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0D%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0D%0A * See the License for the specific language governing permissions and%0D%0A * limitations under the License.%0D%0A *   %0D%0A * For more information on Heaton Research copyrights, licenses %0D%0A * and trademarks visit:%0D%0A * http://www.heatonresearch.com/copyright%0D%0A */%0D%0Apackage org.encog.ensemble.data.factories;%0D%0A%0D%0Aimport java.util.ArrayList;%0D%0Aimport java.util.Random;%0D%0A%0D%0Aimport org.encog.ensemble.data.EnsembleDataSet;%0D%0Aimport org.encog.ml.data.MLDataPair;%0D%0A%0D%0Apublic class NonResamplingDataSetFactory extends EnsembleDataSetFactory %7B%0D%0A%0D%0A%09private ArrayList%3CMLDataPair%3E elementsLeft = new ArrayList%3CMLDataPair%3E();%0D%0A%09public NonResamplingDataSetFactory(int dataSetSize) %7B%0D%0A%09%09super(dataSetSize);%0D%0A%09%09for (MLDataPair dp:dataSource) %7B%0D%0A%09%09%09elementsLeft.add(dp);%0D%0A%09%09%7D%0D%0A%09%7D%0D%0A%0D%0A%09@Override%0D%0A%09public EnsembleDataSet getNewDataSet() %7B%0D%0A%09%09Random generator = new Random();%0D%0A%09%09EnsembleDataSet ds = new EnsembleDataSet(dataSource.getInputSize(), dataSource.getIdealSize());%0D%0A%09%09for (int i = 0; i %3C dataSetSize; i++)%0D%0A%09%09%7B%0D%0A%09%09%09int candidate = generator.nextInt(elementsLeft.size());%0D%0A%09%09%09ds.add(elementsLeft.remove(candidate));%0D%0A%09%09%7D%0D%0A%09%09return ds;%0D%0A%09%7D%0D%0A%7D%0D%0A

add NonResamplingDataSetFactory