edu.uiuc.ge.illigal.gale.data
Class Instance

java.lang.Object
  |
  +--edu.uiuc.ge.illigal.gale.data.Instance
Direct Known Subclasses:
StringInstance

public abstract class Instance
extends java.lang.Object

This abstract class contains the information of a instance. It is designed to contain real-valued instances.

Since:
0.9alpha
Version:
0.9alpha
Author:
Xavier Llorà <xllora@illigal.ge.uiuc.edu>

Field Summary
protected  boolean[] baKnown
          Contains the if the data is known or not
protected  float[] faInfo
          Contains the numerical information of the instance
protected  int iClass
          Contains the class where the instance belongs
protected  int iLength
          Instance length
 
Constructor Summary
Instance()
           
 
Method Summary
 int getInstanceClass()
          Returns the class where the instance belongs
 int getLength()
          Returns the instance length
 float getValue(int iPos)
          Returns the numerical value for the element specified
 boolean isKnown(int iPos)
          Returns if the given position is useful or not
abstract  java.lang.String toString()
          Converts the instance into a string readable format.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

iLength

protected int iLength
Instance length


faInfo

protected float[] faInfo
Contains the numerical information of the instance


baKnown

protected boolean[] baKnown
Contains the if the data is known or not


iClass

protected int iClass
Contains the class where the instance belongs

Constructor Detail

Instance

public Instance()
Method Detail

getInstanceClass

public int getInstanceClass()
Returns the class where the instance belongs

Returns:
The value of the class

getValue

public float getValue(int iPos)
Returns the numerical value for the element specified

Parameters:
iPos - Index of the requested value
Returns:
The value of the requested index

isKnown

public boolean isKnown(int iPos)
Returns if the given position is useful or not

Parameters:
iPos - Index of the requested value
Returns:
The value of the requested index

getLength

public int getLength()
Returns the instance length

Returns:
The instance length

toString

public abstract java.lang.String toString()
Converts the instance into a string readable format. It must be implemented for all subclasses

Overrides:
toString in class java.lang.Object
Returns:
The Instance information in a String format