Class NearestNeighborsDistanceTask
java.lang.Object
javax.swing.SwingWorker<Void,Integer>
cz.fidentis.analyst.gui.task.batch.distance.BatchDistanceTask
cz.fidentis.analyst.gui.task.batch.distance.NearestNeighborsDistanceTask
- All Implemented Interfaces:
Runnable
,Future<Void>
,RunnableFuture<Void>
A task that computes similarity of a set of faces by computing
the distance of faces to an average face and then combining these values
to get mutual similarity for all pairs.
The computation is accelerated by using multiple CPU cores concurrently.
The exact computation parameters are taken from the BatchDistancePanel
.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
The strategy of distance measurement.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
ConstructorsConstructorDescriptionNearestNeighborsDistanceTask
(ProgressDialog<Void, Integer> progressDialog, BatchDistancePanel controlPanel, NearestNeighborsDistanceTask.DistMeasurement distMeasurement) Constructor. -
Method Summary
Methods inherited from class cz.fidentis.analyst.gui.task.batch.distance.BatchDistanceTask
done, getControlPanel, getDistDeviations, getDistSimilarities, getFaceFromFaceFactory, getProgressDialog, getSelectedFace, setDistDeviation, setDistSimilarity
Methods inherited from class javax.swing.SwingWorker
addPropertyChangeListener, cancel, 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
-
NearestNeighborsDistanceTask
public NearestNeighborsDistanceTask(ProgressDialog<Void, Integer> progressDialog, BatchDistancePanel controlPanel, NearestNeighborsDistanceTask.DistMeasurement distMeasurement) 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
distMeasurement
- A strategy of measuring indirect distance
-
-
Method Details
-
doInBackground
- Specified by:
doInBackground
in classSwingWorker<Void,
Integer> - Throws:
Exception
-
printTimeStats
protected void printTimeStats()
-