Class DetectionKey
java.lang.Object
likelihoodDetectionModule.thresholdDetector.DetectionKey
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 Summary
Modifier and TypeMethodDescriptionint
int
boolean
equals operator.int
hashCode()
Overload the hashCode operator.
-
Method Details
-
equals
equals operator. Two DetectionKey's are equal if both their channelMask and bandIndex members are equal. -
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. -
bandIndex
public int bandIndex()
-