Class BatchDistanceTask
- All Implemented Interfaces:
Runnable
,Future<Void>
,RunnableFuture<Void>
- Direct Known Subclasses:
NearestNeighborsDistanceTask
,PairwiseDistanceTask
,RayCastingDistanceTask
A task that computes distance-based similarity of the set of faces.
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.SwingWorker
SwingWorker.StateValue
Nested classes/interfaces inherited from interface java.util.concurrent.Future
Future.State
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
BatchDistanceTask
(ProgressDialog<Void, Integer> progressDialog, BatchDistancePanel controlPanel) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
done()
final BatchDistancePanel
double[][]
Returns computed 2D matrix of sample standard deviations ornull
double[][]
Returns computed 2D matrix of distance similarities ornull
protected HumanFace
getFaceFromFaceFactory
(int faceIndex) protected HumanFace
protected void
setDistDeviation
(int i, int j, double val) protected void
setDistSimilarity
(int i, int j, double val) Methods inherited from class javax.swing.SwingWorker
addPropertyChangeListener, cancel, doInBackground, execute, firePropertyChange, get, get, getProgress, getPropertyChangeSupport, getState, isCancelled, isDone, process, publish, removePropertyChangeListener, run, setProgress
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.concurrent.Future
exceptionNow, resultNow, state
-
Constructor Details
-
BatchDistanceTask
protected BatchDistanceTask(ProgressDialog<Void, Integer> progressDialog, BatchDistancePanel controlPanel) Constructor.- Parameters:
progressDialog
- A window that show the progress of the computation. Must not benull
controlPanel
- A control panel with computation parameters. Must not benull
The average face is skipped from the similarity measurement (i.e., we do not measure its distance to other distances)
-
-
Method Details
-
done
protected void done()- Overrides:
done
in classSwingWorker<Void,
Integer>
-
getDistSimilarities
public double[][] getDistSimilarities()Returns computed 2D matrix of distance similarities ornull
- Returns:
- computed 2D matrix of distance similarities or
null
-
getDistDeviations
public double[][] getDistDeviations()Returns computed 2D matrix of sample standard deviations ornull
- Returns:
- computed 2D matrix of sample standard deviations or
null
-
getProgressDialog
-
getControlPanel
-
getFaceFromFaceFactory
-
getSelectedFace
-
setDistSimilarity
protected void setDistSimilarity(int i, int j, double val) -
setDistDeviation
protected void setDistDeviation(int i, int j, double val)
-