package org.neuroph.easyneurons.samples.perceptron;

import java.util.Observable;
import java.util.Observer;
import org.neuroph.core.learning.TrainingSet;

/**
 *
 * @author Marko Koprivica
 * @author Zoran Sevarac <sevarac@gmail.com>
 */
public class TrainingSetObserver implements Observer
{
    private TrainingSet trainingSet;

    public TrainingSet getTrainingSet() {
        return trainingSet;
    }

    public void setTrainingSet(TrainingSet trainingSet) {
        this.trainingSet = trainingSet;
    }

    @Override
    public void update(Observable o, Object arg) {
        setTrainingSet(((org.neuroph.easyneurons.samples.perceptron.PerceptronSampleTrainingSet) o).getTrainingSet());
    }

}
