fsmvis.data
Class DataItem

java.lang.Object
  |
  +--fsmvis.data.DataItem

public class DataItem
extends java.lang.Object
implements java.io.Serializable

See Also:
Serialized Form

Field Summary
protected static double[] average
           
protected  java.awt.Color color
           
static java.awt.Color DEFAULT_COLOR
           
protected  Vect force
           
protected static java.util.ArrayList idfValues
           
protected  double ORD_FACTOR
           
protected  Coordinate position
           
protected static double[] sigma
           
protected static double stdDevs
           
protected  java.lang.Object[] values
           
protected  Vect velocity
           
 
Constructor Summary
DataItem(java.lang.Object[] values)
          constructor: takes an array of values
 
Method Summary
static double[] average()
           
 java.awt.Color getColor()
          Returns the color of this data item
 double getDistanceTo(DataItem other, boolean withKMeans)
          Calculates the distance metric to another data item
 Vect getForce()
          Returns the vector force object associated with this object
 Coordinate getPosition()
          Returns the current position coordinate of this data item
 java.lang.Object[] getValues()
          Returns the collection of values that this DataItem contains
 Vect getVelocity()
          Returns the current velocity of this object
 void setColor(java.awt.Color color)
          Sets the color of this data item
 void setForce(Vect force)
          Sets the forces associated with this object to be force
static void setNormalizeData(double[] sigma, double[] average, double stdDevs)
          sets up the normalization data that all data item will use
 void setPosition(Coordinate position)
          Sets the layout position for this object to be the point
 void setVelocity(Vect velocity)
          Sets the velocity of this object to be the new value velocity
static double[] sigma()
           
static double stdDevs()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

values

protected java.lang.Object[] values

position

protected Coordinate position

force

protected Vect force

velocity

protected Vect velocity

color

protected java.awt.Color color

sigma

protected static double[] sigma

average

protected static double[] average

stdDevs

protected static double stdDevs

idfValues

protected static java.util.ArrayList idfValues

DEFAULT_COLOR

public static final java.awt.Color DEFAULT_COLOR

ORD_FACTOR

protected final double ORD_FACTOR
Constructor Detail

DataItem

public DataItem(java.lang.Object[] values)
constructor: takes an array of values
Parameters:
values - The array of object values
Method Detail

sigma

public static double[] sigma()

average

public static double[] average()

stdDevs

public static double stdDevs()

getValues

public java.lang.Object[] getValues()
Returns the collection of values that this DataItem contains
Returns:
The collection of values in this DataItem

getPosition

public Coordinate getPosition()
Returns the current position coordinate of this data item
Returns:
The current position of this data item

setPosition

public void setPosition(Coordinate position)
Sets the layout position for this object to be the point
Parameters:
position - The coordinate for the position of this object

getForce

public Vect getForce()
Returns the vector force object associated with this object
Returns:
The current forces acting on this object

setForce

public void setForce(Vect force)
Sets the forces associated with this object to be force
Parameters:
force - The new force value to associate with this object

getVelocity

public Vect getVelocity()
Returns the current velocity of this object
Returns:
The velocity of this data item

setVelocity

public void setVelocity(Vect velocity)
Sets the velocity of this object to be the new value velocity
Parameters:
velocity - The new velocity of this object

getColor

public java.awt.Color getColor()
Returns the color of this data item
Returns:
The color of this data item

setColor

public void setColor(java.awt.Color color)
Sets the color of this data item
Parameters:
color - the new color for this data item

getDistanceTo

public double getDistanceTo(DataItem other,
                            boolean withKMeans)
Calculates the distance metric to another data item
Parameters:
other -  
Returns:
the distance to this other data item

setNormalizeData

public static void setNormalizeData(double[] sigma,
                                    double[] average,
                                    double stdDevs)
sets up the normalization data that all data item will use
Parameters:
sigma -  
average -  
stdDevs -