Class DetectionKey

java.lang.Object
likelihoodDetectionModule.thresholdDetector.DetectionKey

public class DetectionKey extends Object
This class is used to uniquely identify detections. The channelMask and bandIndex is ample to do this. The equals and hashCode() operators have been overloaded so that they may be compared, and placed in HashMaps.
Author:
Dave Flogeras
  • Method Details

    • equals

      public boolean equals(Object o)
      equals operator. Two DetectionKey's are equal if both their channelMask and bandIndex members are equal.
      Overrides:
      equals in class Object
    • channelMask

      public int channelMask()
    • hashCode

      public int hashCode()
      Overload the hashCode operator. The thinking here is that bandIndex will always be far invalid input: '<' 64k. ChannelMask can be converted to a channel number between 1-32. If we bit-pack there into the upper and lower words of an int, we have a unique, deterministic hashCode.
      Overrides:
      hashCode in class Object
    • bandIndex

      public int bandIndex()