|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--fsmvis.engine.SpringModel
Field Summary | |
protected static double |
dampingFactor
|
protected DataItemCollection |
dataItems
|
protected double |
dataSizeFactor
|
protected static double |
deltaTime
|
protected EndCriteria |
endC
|
protected java.util.ArrayList |
force
|
protected static double |
freeness
|
protected static double |
gravityDampingForce
|
protected static double |
gravityForce
|
protected static double |
layoutBounds
|
protected int |
numIterations
|
protected java.util.ArrayList |
position
|
protected java.util.Properties |
properties
|
protected static double |
rangeHi
|
protected static double |
rangeLo
|
protected long |
runningTime
|
protected static double |
springForce
|
protected long |
startTime
|
protected static double |
timeDampingForce
|
protected static double |
timeForce
|
protected double |
unrelatedDist
|
protected java.util.ArrayList |
velocity
|
protected Viewer |
viewParent
|
Constructor Summary | |
SpringModel(DataItemCollection dataItems,
EndCriteria ec,
Viewer v)
constructor: |
Method Summary | |
protected void |
addForces(int obj1,
int obj2)
Calculates the force that will be acting between obj1 and obj2 This is based on the difference between their actual distance and their high dimensional distance. |
void |
calcForces(int index)
Calculates the forces that will be exerted on dataItem with index index Calcs forces by comparing every object with every other object with indices < index. |
protected void |
calcGravityForce(int index)
Method to simulate gravity acting on the system, does this by dividing the z component of the force |
protected void |
calcTimeForce(int index)
Method to apply a similar effect on the fourth dimension, which I have called time, to flatten everything out to 2D |
void |
doIteration()
Method to perform one iteration of the layout algorithm for this layout model |
void |
doNormalise()
Instruction to normalise data for spring 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 error 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 |
double |
getStress()
Calculates stress |
protected void |
init()
Initalises the data structures needed for the spring model |
void |
initValues()
intitialises the values held in the properties object |
protected void |
integrateChanges(int index)
Integrates the changes that have already been calculated. |
protected void |
loadProperties()
Initialises the properties for this object to be the properties held for this object |
void |
randomizePositions()
randomizes the starting locations of the data set. |
void |
resetIterations()
reset iterations |
void |
setDataItemCollection(DataItemCollection dataItems)
Accessor method for the dataItems object |
void |
updateValues()
called whenever the values for this layout model have been altered externally, so that the system knows to update their values |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected java.util.ArrayList position
protected java.util.ArrayList velocity
protected java.util.ArrayList force
protected DataItemCollection dataItems
protected int numIterations
protected double unrelatedDist
protected EndCriteria endC
protected java.util.Properties properties
protected static double layoutBounds
protected static double rangeLo
protected static double rangeHi
protected static double dampingFactor
protected static double springForce
protected static double gravityForce
protected static double gravityDampingForce
protected static double timeForce
protected static double timeDampingForce
protected static double freeness
protected static double deltaTime
protected double dataSizeFactor
protected long startTime
protected long runningTime
protected Viewer viewParent
Constructor Detail |
public SpringModel(DataItemCollection dataItems, EndCriteria ec, Viewer v)
dataItems
- The data set to use for this layoutMethod Detail |
protected final void init()
protected void loadProperties()
public void initValues()
public void doNormalise()
public void randomizePositions()
public void doIteration() throws TooManyIterationsException
public void calcForces(int index)
index
- The index of the dataItem that forces are to be calculated
onprotected final void addForces(int obj1, int obj2)
obj1
- obj2
- protected void calcGravityForce(int index)
index
- The index of the object to calc Gravity force forprotected void calcTimeForce(int index)
index
- The index of the object to calc Time force forprotected final void integrateChanges(int index)
index
- The index of the object to integrate changes forpublic Coordinate getPosition(int index)
index
- The index of the objectpublic DataItem getDataItem(int index)
index
- The index of the data item wantedpublic DataItemCollection getDataItemCollection()
public java.util.List getDisplayableItems()
public void setDataItemCollection(DataItemCollection dataItems)
dataItems
- THe dataItemCollection to be used with this layout
modelpublic int getNumIterations()
public long getExecutionTime()
public double getApproxError()
public double getAvgError()
public double getApproxVelocity()
public double getAvgVelocity()
public void updateValues()
public java.util.Properties getProperties()
public double getStress()
public void resetIterations()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |