All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.sourceforge.cilib.entity.initialisation.DataDependantInitialisationStrategy Maven / Gradle / Ivy

/**           __  __
 *    _____ _/ /_/ /_    Computational Intelligence Library (CIlib)
 *   / ___/ / / / __ \   (c) CIRG @ UP
 *  / /__/ / / / /_/ /   http://cilib.net
 *  \___/_/_/_/_.___/
 */
package net.sourceforge.cilib.entity.initialisation;

import java.util.ArrayList;
import net.sourceforge.cilib.controlparameter.ControlParameter;
import net.sourceforge.cilib.entity.Entity;
import net.sourceforge.cilib.io.ARFFFileReader;
import net.sourceforge.cilib.io.DataTable;
import net.sourceforge.cilib.io.DataTableBuilder;
import net.sourceforge.cilib.io.StandardDataTable;


public abstract class DataDependantInitialisationStrategy  implements InitialisationStrategy{
    protected DataTableBuilder tableBuilder;
    protected InitialisationStrategy initialisationStrategy;
    protected DataTable dataset;
    protected int windowSize;
    protected ArrayList bounds;

    public DataDependantInitialisationStrategy() {
        initialisationStrategy = new RandomBoundedInitialisationStrategy();
        tableBuilder = new DataTableBuilder(new ARFFFileReader());
        dataset = new StandardDataTable();
        windowSize = 0;
        bounds = new ArrayList();
    }

    public DataDependantInitialisationStrategy(DataDependantInitialisationStrategy copy) {
        initialisationStrategy = copy.initialisationStrategy;
        tableBuilder = copy.tableBuilder;
        dataset = copy.dataset;
        windowSize = copy.windowSize;
        bounds = copy.bounds;
    }

    @Override
    public abstract void initialise(Enum key, E entity);

    public void setBounds(ArrayList newBounds) {
        bounds = newBounds;
    }

    public void setInitialisationStrategy(InitialisationStrategy strategy) {
        initialisationStrategy = strategy;
    }

    public InitialisationStrategy getInitialisationStrategy() {
        return initialisationStrategy;
    }

    public void setDataTableBuilder(DataTableBuilder builder) {
        tableBuilder = builder;
    }

    public DataTableBuilder getDataTableBuilder() {
        return tableBuilder;
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy