Class CorrelationManager
java.lang.Object
clickTrainDetector.clickTrainAlgorithms.mht.mhtvar.CorrelationManager
- Direct Known Subclasses:
IDIChi2VarPane
Manages correlation values and ensures correlation calculation between
two data units is stored and not calculated multiple times.
- Author:
- Jamie Macaulay
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addDetection
(PamDataUnit dataUnit) Called when a new detection is added.void
clear()
Clear the correlation manager.getCorrelationValue
(PamDataUnit pamDataUnitPrev, PamDataUnit pamDataUnitNext) Get the correlation between two data units which have already been added to the data unit list using addDetection().getCorrelationValue
(PamDataUnit dataUnit1, PamDataUnit dataUnit2, FFTFilterParams filterParams) Get the correlation between two data units which have already been added to the data unit list using addDetection().
-
Field Details
-
fftFilter
The FFT filter for the correlation.
-
-
Constructor Details
-
CorrelationManager
public CorrelationManager()
-
-
Method Details
-
addDetection
Called when a new detection is added.- Parameters:
dataUnit
- - the data unit to add to the correlation index.
-
getCorrelationValue
public CorrelationValue getCorrelationValue(PamDataUnit dataUnit1, PamDataUnit dataUnit2, FFTFilterParams filterParams) Get the correlation between two data units which have already been added to the data unit list using addDetection(). The function searches for an already calculated correlation value and if one does not exist calculates one.- Parameters:
dataUnit1
- - the first data unit in time. (It is important data units are in chronological order)dataUnit2
- - the second data unit in timefilterParams
- - the filter params to use to filter data,.- Returns:
- the correlation value between the two units. The returned value is between 0 and 1.
-
clear
public void clear()Clear the correlation manager. -
getCorrelationValue
public CorrelationValue getCorrelationValue(PamDataUnit pamDataUnitPrev, PamDataUnit pamDataUnitNext) Get the correlation between two data units which have already been added to the data unit list using addDetection(). The function searches for an already calculated correlation value and if one does not exist calculates one.- Parameters:
dataUnit1
- - the first data unit in time. (It is important data units are in chronological order)dataUnit2
- - the second data unit in time- Returns:
- the correlation value between the two units. The returned value is between 0 and 1.
-