fsmvis.engine
Interface LayoutModel

All Known Implementing Classes:
SpringModel

public abstract interface LayoutModel
extends java.io.Serializable


Field Summary
static java.lang.String DAMPING_FACTOR
           
static java.lang.String DELTA_TIME
           
static java.lang.String FREENESS
           
static java.lang.String GRAVITY_DAMPING_FORCE
           
static java.lang.String GRAVITY_FORCE
           
static java.lang.String LAYOUT_BOUNDS
           
static java.lang.String RANGE_HI
           
static java.lang.String RANGE_LO
           
static java.lang.String SPRING_FORCE
           
static java.lang.String TIME_DAMPING_FORCE
           
static java.lang.String TIME_FORCE
           
 
Fields inherited from class java.io.Serializable
serialVersionUID
 
Method Summary
 void doIteration()
          Method to perform one iteration of the layout algorithm for this layout model
 double getApproxError()
          Calculates the approximate error in this layout, does this by calcing the value for a subset of the data set to get an approximation of the error without slowing down the layout too much.
 double getApproxVelocity()
          Returns an approximation of the average velocity in the data set
 double getAvgError()
          Returns the average error in the data set
 double getAvgVelocity()
          Returns the average velocity in the data set
 DataItem getDataItem(int index)
          Returns the data item at index index.
 DataItemCollection getDataItemCollection()
          Returns the dataItemCollection object that this layoutmodel is representing.
 java.util.List getDisplayableItems()
          Returns the indices of the items which are displayable.
 long getExecutionTime()
          Returns the number of milliseconds that the algorithm has been running for.
 int getNumIterations()
          Returns the number of iterations that have been carried out by this layout model
 Coordinate getPosition(int index)
          Returns the coordinate position of the object corresponding to the index index
 java.util.Properties getProperties()
          Returns the properties object used by a layout model
 void updateValues()
          called whenever the values for this layout model have been altered externally, so that the system knows to update their values
 

Field Detail

LAYOUT_BOUNDS

public static final java.lang.String LAYOUT_BOUNDS

RANGE_HI

public static final java.lang.String RANGE_HI

RANGE_LO

public static final java.lang.String RANGE_LO

DAMPING_FACTOR

public static final java.lang.String DAMPING_FACTOR

SPRING_FORCE

public static final java.lang.String SPRING_FORCE

GRAVITY_FORCE

public static final java.lang.String GRAVITY_FORCE

GRAVITY_DAMPING_FORCE

public static final java.lang.String GRAVITY_DAMPING_FORCE

TIME_FORCE

public static final java.lang.String TIME_FORCE

TIME_DAMPING_FORCE

public static final java.lang.String TIME_DAMPING_FORCE

FREENESS

public static final java.lang.String FREENESS

DELTA_TIME

public static final java.lang.String DELTA_TIME
Method Detail

doIteration

public void doIteration()
                 throws TooManyIterationsException
Method to perform one iteration of the layout algorithm for this layout model

getPosition

public Coordinate getPosition(int index)
Returns the coordinate position of the object corresponding to the index index
Parameters:
index - The index of the object
Returns:
The coordinate of the object

getDataItem

public DataItem getDataItem(int index)
Returns the data item at index index.
Parameters:
index - The index of the data item wanted
Returns:
The data item that was at this index

getDataItemCollection

public DataItemCollection getDataItemCollection()
Returns the dataItemCollection object that this layoutmodel is representing.
Returns:
The DataItemCollection that this model is laying out

getDisplayableItems

public java.util.List getDisplayableItems()
Returns the indices of the items which are displayable. By default this returns null. However, if it was required to only display a portion of the data set at a time this method could be overriden. Anyone interested in viewing the items should call this method, if it returns null then they can use all available indices
Returns:
The indices of the displayable data items

getNumIterations

public int getNumIterations()
Returns the number of iterations that have been carried out by this layout model
Returns:
The number of iterations that this layout model has done

getExecutionTime

public long getExecutionTime()
Returns the number of milliseconds that the algorithm has been running for.
Returns:
The time in millis that the system has been running

getApproxError

public double getApproxError()
Calculates the approximate error in this layout, does this by calcing the value for a subset of the data set to get an approximation of the error without slowing down the layout too much.
Returns:
The approximation of the avg error

getAvgError

public double getAvgError()
Returns the average error in the data set
Returns:
the average error

getApproxVelocity

public double getApproxVelocity()
Returns an approximation of the average velocity in the data set
Returns:
An approx of the avg velocity

getAvgVelocity

public double getAvgVelocity()
Returns the average velocity in the data set
Returns:
the average velocity

getProperties

public java.util.Properties getProperties()
Returns the properties object used by a layout model
Returns:
The properties object

updateValues

public void updateValues()
called whenever the values for this layout model have been altered externally, so that the system knows to update their values