|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--fsmvis.engine.SpringModel | +--fsmvis.engine.NeighbourAndSampleModel | +--fsmvis.engine.SubsetNeighbourAndSampleModel | +--fsmvis.engine.InterpolateSampleModel
Field Summary | |
protected boolean |
bKmeans
|
protected boolean |
bKMeansInterpFinished
|
protected boolean |
bStable
|
protected static java.lang.String |
CIRCUMF_SAMPLES
|
protected int |
circumfSamples
|
protected int |
currentInterp
|
protected static java.lang.String |
DATA_SAMPLE_SIZE
|
protected int |
dataSampleSize
|
protected EndCriteria |
endC
|
protected int |
increaseInSize
|
protected int |
interpCount
|
protected java.util.ArrayList |
interpSubset
|
protected java.util.HashSet |
interpSubsetContents
|
protected java.util.ArrayList |
interpSubsetNums
|
protected int |
interpSubsetSize
|
protected boolean |
isInterpolating
|
protected int |
iterationsSubTotal
|
protected static java.lang.String |
LOW_ERROR
|
protected static java.lang.String |
LOW_VELOCITY
|
protected double |
lowError
|
protected static java.lang.String |
MAX_ITERATIONS
|
protected double |
nnDist
|
protected boolean |
notAfters
|
protected java.util.ArrayList |
origSubset
|
protected boolean |
subOfSub
|
protected java.util.ArrayList |
subsetToInterp
|
protected long |
time
|
protected static java.lang.String |
VECTOR_ITERATIONS
|
protected static java.lang.String |
VECTOR_SAMPLES
|
protected int |
vectorIterations
|
protected int |
vectorSamples
|
Fields inherited from class fsmvis.engine.SubsetNeighbourAndSampleModel |
kmeans,
numbers,
ROOT_N_FACTOR,
rootNFactor,
subset,
subsetContents,
subsetSize |
Fields inherited from class fsmvis.engine.NeighbourAndSampleModel |
NEIGHBOUR_SIZE,
neighbours,
neighbourSize,
SAMPLE_SIZE,
samples,
sampleSize |
Fields inherited from class fsmvis.engine.SpringModel |
dampingFactor,
dataItems,
dataSizeFactor,
deltaTime,
endC,
force,
freeness,
gravityDampingForce,
gravityForce,
kMeansTime,
layoutBounds,
numIterations,
position,
properties,
rangeHi,
rangeLo,
runningTime,
springForce,
startTime,
timeDampingForce,
timeForce,
unrelatedDist,
velocity,
viewParent |
Constructor Summary | |
InterpolateSampleModel(DataItemCollection dataItems,
EndCriteria ec,
Viewer v)
constructor: |
Method Summary | |
protected double |
bestForcePos(int index,
Coordinate p,
Vect fIn,
java.util.ArrayList sample)
Determine the the position along a vector (scale by [0, 1]) that minimises the distance to all other sample points. |
protected int |
binSearch(double lB,
double hB,
Coordinate pos,
double radi,
int index,
java.util.ArrayList sample)
|
protected Coordinate |
cPoint(double angleIn,
double radi,
Coordinate posIn)
Returns a coordinate of a point on the circumference of a circle. |
void |
doIteration()
Method to perform one iteration of the layout algorithm for this layout model |
void |
doNormalise()
Instruction to normalise data for spring model |
DataItem |
getDataItem(int index)
Returns the data item at index index. |
java.util.List |
getDisplayableItems()
Returns the indices of the items which are displayable. |
protected double |
getDistFromVect(double scaleValue,
int index,
Coordinate p,
Vect fIn,
java.util.ArrayList sample)
|
void |
initValues()
Initialises the values for this class, over rides the method in Spring model. |
protected void |
interpolateDataItem()
Method to interpolate all of the points not in the subset, does this by finding the closest object in the subset and placing it somewhere near it |
protected void |
interpolateToKmeans()
Method to interpolate all of the points not in the subset, does this by finding the closest kmeans centroid in the subset and placing it somewhere near it. |
boolean |
isAfters()
Has the execution finished interpolation? |
boolean |
isInterpolating()
Is the execution currently interpolating? |
void |
loadProperties()
Initialises the properties for this object to be the properties held for this object |
protected int |
nearestNeighbour(int centroidIndex,
int memberIndex)
Returns the nearest neightbour of the given point within the kMeans cluster. |
protected void |
placeDataItem(int index,
int parent,
java.util.ArrayList pdiSample)
Places the data Item index onto the layout (finds it initial coords) uses parent as the most similar object to it and tries to place it near to parent. |
protected void |
placeNearToNearestNeighbour(int index,
int parent,
java.util.ArrayList sample)
Places the point close to its nearest neighbour. |
void |
setSizes(int v,
int s)
|
protected double |
sumDistToSample(int index,
Coordinate p,
java.util.ArrayList sample)
Returns the sum of the difference between the desired distance and the actual distance from object index, to all of the points held in the arrayList sample |
protected Vect |
sumForcesToSample(int index,
java.util.ArrayList sample)
Calculates the sum of the forces from the object index to all of the points in the sample |
Methods inherited from class fsmvis.engine.SubsetNeighbourAndSampleModel |
getApproxError,
getApproxVelocity,
getAvgError,
getAvgVelocity,
getStress,
getSubsetSize,
iterateFullSet,
randomizeSample,
setSubset,
setSubsetSize |
Methods inherited from class fsmvis.engine.NeighbourAndSampleModel |
calcForces,
findNewNeighbours,
randomizeSample |
Methods inherited from class fsmvis.engine.SpringModel |
addForces,
calcGravityForce,
calcTimeForce,
getDataItemCollection,
getExecutionTime,
getNumIterations,
getPosition,
getProperties,
init,
integrateChanges,
randomizePositions,
resetIterations,
setDataItemCollection,
updateValues |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected java.util.ArrayList origSubset
protected java.util.ArrayList interpSubset
protected int interpSubsetSize
protected java.util.HashSet interpSubsetContents
protected java.util.ArrayList interpSubsetNums
protected boolean subOfSub
protected int dataSampleSize
protected int circumfSamples
protected int vectorIterations
protected int vectorSamples
protected double lowError
protected EndCriteria endC
protected long time
protected boolean bStable
protected boolean bKmeans
protected boolean notAfters
protected int interpCount
protected int increaseInSize
protected boolean isInterpolating
protected int iterationsSubTotal
protected java.util.ArrayList subsetToInterp
protected int currentInterp
protected static final java.lang.String DATA_SAMPLE_SIZE
protected static final java.lang.String CIRCUMF_SAMPLES
protected static final java.lang.String VECTOR_ITERATIONS
protected static final java.lang.String VECTOR_SAMPLES
protected static final java.lang.String MAX_ITERATIONS
protected static final java.lang.String LOW_VELOCITY
protected static final java.lang.String LOW_ERROR
protected double nnDist
protected boolean bKMeansInterpFinished
Constructor Detail |
public InterpolateSampleModel(DataItemCollection dataItems, EndCriteria ec, Viewer v)
dataItems
- The dataset to be used with this collectionMethod Detail |
public void loadProperties()
public void doNormalise()
public void initValues()
public void doIteration() throws TooManyIterationsException
protected void interpolateDataItem()
protected void placeDataItem(int index, int parent, java.util.ArrayList pdiSample)
index
- The data item that is being placedparent
- The data item that is closest to this pointprotected double sumDistToSample(int index, Coordinate p, java.util.ArrayList sample)
index
- The index of the object which all dists are measured fromp
- The new coordinate that is being evaluated for indexsample
- The arrayList of indices to measure dists toprotected Vect sumForcesToSample(int index, java.util.ArrayList sample)
index
- sample
- public java.util.List getDisplayableItems()
public DataItem getDataItem(int index)
index
- The index of the data item wantedpublic boolean isInterpolating()
public boolean isAfters()
public void setSizes(int v, int s)
protected void interpolateToKmeans()
protected int nearestNeighbour(int centroidIndex, int memberIndex)
centroidIndex
- The data item that is surrogate for the kmeans centroid.memberIndex
- The data item that is being placed.protected void placeNearToNearestNeighbour(int index, int parent, java.util.ArrayList sample)
nnIndex
- Index of the (probable) nearest neighbour.memberIndex
- Index of the item being placed.centroidIndex
- Index of the surrogate kmeans centroid.protected double bestForcePos(int index, Coordinate p, Vect fIn, java.util.ArrayList sample)
protected double getDistFromVect(double scaleValue, int index, Coordinate p, Vect fIn, java.util.ArrayList sample)
protected Coordinate cPoint(double angleIn, double radi, Coordinate posIn)
angleIn
- The angle to the circle's centre.radi
- The radius of the circle.posIn
- the position of the centre of the circle.protected int binSearch(double lB, double hB, Coordinate pos, double radi, int index, java.util.ArrayList sample)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |