/**
    This file is part of JkernelMachines.

    JkernelMachines is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    JkernelMachines is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with JkernelMachines.  If not, see <http://www.gnu.org/licenses/>.

    Copyright David Picard - 2010

*/
package fr.lip6.classifier;

import java.util.List;

import fr.lip6.type.TrainingSample;

/**
 * Classifier interface that provides training and evaluation methods.
 * @author dpicard
 *
 * @param <T>
 */
public interface Classifier<T> extends Cloneable {

	/**
	 * Add a single example to the current training set and train the classifier
	 * @param t the training sample
	 */
	public void train(TrainingSample<T> t);
	
	/**
	 * Replace the current training list and train the classifier
	 * @param l list of training samples
	 */
	public void train(List<TrainingSample<T>> l);
	
	/**
	 * Computes the category of the provided example
	 * @param e example
	 * @return >0. if e belongs to the category, <0. if not.
	 */
	public double valueOf(T e);
	
}

@@ -1491,10 +1491,166 @@
 T e);%0A%09%0A
+%09/**%0A%09 * Creates and returns a copy of this object.%0A%09 * @see java.lang.Object#clone()%0A%09 */%0A%09public Classifier%3CT%3E clone() throws CloneNotSupportedException;%0A
 %7D%0A

add cloneable interface trick