Class CorrelationManager

java.lang.Object
clickTrainDetector.clickTrainAlgorithms.mht.mhtvar.CorrelationManager
Direct Known Subclasses:
IDIChi2VarPane

public class CorrelationManager extends Object
Manages correlation values and ensures correlation calculation between two data units is stored and not calculated multiple times.
Author:
Jamie Macaulay
  • Field Details

    • fftFilter

      public FFTFilter fftFilter
      The FFT filter for the correlation.
  • Constructor Details

    • CorrelationManager

      public CorrelationManager()
  • Method Details

    • addDetection

      public void addDetection(PamDataUnit dataUnit)
      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 time
      filterParams - - 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.