Package be.panako.strategy.panako
Class PanakoFingerprint
java.lang.Object
be.panako.strategy.panako.PanakoFingerprint
public class PanakoFingerprint
extends java.lang.Object
A fingerprint connects three event points in a spectrogram. The points are defined
by a time and frequency pair, both encoded with an integer. The frequency is defined by
the bin index in the spectrogram. The time is defined as the index of the block processed.
- Author:
- Joren Six
-
Field Summary
-
Constructor Summary
Constructors Constructor Description PanakoFingerprint(int t1, int f1, float m1, int t2, int f2, float m2, int t3, int f3, float m3)
PanakoFingerprint(long hash, int t1, int f1)
PanakoFingerprint(PanakoEventPoint e1, PanakoEventPoint e2, PanakoEventPoint e3)
-
Method Summary
Modifier and Type Method Description boolean
equals(java.lang.Object other)
long
hash()
int
hashCode()
int
robustHash()
Calculate a hash representing this fingerprint.java.lang.String
toString()
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
-
Field Details
-
t1
public final int t1 -
f1
public final int f1 -
m1
public final float m1 -
t2
public final int t2 -
f2
public final int f2 -
m2
public final float m2 -
t3
public final int t3 -
f3
public final int f3 -
m3
public final float m3
-
-
Constructor Details
-
PanakoFingerprint
public PanakoFingerprint(int t1, int f1, float m1, int t2, int f2, float m2, int t3, int f3, float m3) -
PanakoFingerprint
public PanakoFingerprint(long hash, int t1, int f1) -
PanakoFingerprint
-
-
Method Details
-
robustHash
public int robustHash()Calculate a hash representing this fingerprint.- Returns:
- a hash representing this fingerprint.
-
hash
public long hash() -
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object other)- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()- Overrides:
hashCode
in classjava.lang.Object
-