net.sourceforge.cilib.problem.dataset.DataSetBuilder Maven / Gradle / Ivy
/** __ __
* _____ _/ /_/ /_ Computational Intelligence Library (CIlib)
* / ___/ / / / __ \ (c) CIRG @ UP
* / /__/ / / / /_/ / http://cilib.net
* \___/_/_/_/_.___/
*/
package net.sourceforge.cilib.problem.dataset;
import java.util.ArrayList;
import java.util.Iterator;
import net.sourceforge.cilib.type.types.container.Vector;
import net.sourceforge.cilib.util.Cloneable;
public abstract class DataSetBuilder implements Iterable, Cloneable {
private static final long serialVersionUID = 5252204062214206898L;
protected ArrayList dataSets = null;
public DataSetBuilder() {
this.dataSets = new ArrayList();
}
public DataSetBuilder(DataSetBuilder rhs) {
dataSets = new ArrayList();
for (DataSet dataset : rhs.dataSets) {
dataSets.add(dataset.getClone());
}
}
public abstract DataSetBuilder getClone();
public void addDataSet(DataSet dataSet) {
this.dataSets.add(dataSet);
}
public DataSet getDataSet(int index) {
return this.dataSets.get(index);
}
public Iterator iterator() {
return this.dataSets.iterator();
}
public abstract void initialise();
public void uninitialise(Vector centroids) {
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy