/**
* This file is part of the Java Machine Learning Library
*
* The Java Machine Learning Library 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 2 of the License, or
* (at your option) any later version.
*
* The Java Machine Learning Library 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 the Java Machine Learning Library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
* Copyright (c) 2006-2008, Thomas Abeel
*
* Project: http://java-ml.sourceforge.net/
*
*/
package medusa.georgios.enhanced_mcl;
import java.io.Serializable;
import java.util.Map;
/**
* The interface for instances in a data set.
*
* {@jmlSource}
*
* @see Dataset
*
* @version 0.1.1
*
* @author Thomas Abeel
*
*/
public interface Instance extends Map, Iterable, Serializable {
/**
* Returns the class value for this instance.
*
* @return class value of this instance, or null if the class is not set
*/
public Object classValue();
public void setClassValue(Object value);
/**
* Returns the number of attributes this instance has.
*
* @return
*/
public int noAttributes();
@Override
@Deprecated
public int size();
public double value(int pos);
/**
* Subtract an instance from this instance and returns the results.
*
* This method does not modify this instance, but returns the result.
*
* @param the
* result of the subtraction
*/
public Instance minus(Instance min);
/**
* Subtract an scalar from this instance and returns the results.
*
* This method does not modify this instance, but returns the result.
*
* @param the
* result of the subtraction
*/
public Instance minus(double value);
public Instance plus(Instance max);
public Instance divide(double value);
public Instance divide(Instance currentRange);
public Instance plus(double value);
public Instance multiply(double value);
public Instance multiply(Instance value);
/**
* Removes attribute from the instance
*
* @param i
*/
public void removeAttribute(int i);
/**
* Take square root of all attributes.
*
* @return instance with a the square root for all attributes
*/
public Instance sqrt();
/**
* Return unique identifier for this instance.
*
* @return
*/
public int getID();
}
Ads help maintain this website.