Package com.tonic.analysis.fingerprint
Class FingerprintMatch
- java.lang.Object
-
- com.tonic.analysis.fingerprint.FingerprintMatch
-
public class FingerprintMatch extends Object
The result of comparing two method fingerprints: an overall score, a confidence, and per-level scores.
-
-
Constructor Summary
Constructors Constructor Description FingerprintMatch(String sourceId, String targetId, double score, double confidence, double[] levelScores)Creates a match result.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetConfidence()doublegetLevelScore(FingerprintLevel level)double[]getLevelScores()doublegetScore()StringgetSourceId()StringgetTargetId()StringtoString()
-
-
-
Constructor Detail
-
FingerprintMatch
public FingerprintMatch(String sourceId, String targetId, double score, double confidence, double[] levelScores)
Creates a match result.- Parameters:
sourceId- the queried method idtargetId- the matched method idscore- the weighted overall similarity scoreconfidence- the confidence in the scorelevelScores- the per-level similarity scores, copied; null becomes all zeros
-
-
Method Detail
-
getSourceId
public String getSourceId()
- Returns:
- the source id
-
getTargetId
public String getTargetId()
- Returns:
- the target id
-
getScore
public double getScore()
- Returns:
- the score
-
getConfidence
public double getConfidence()
- Returns:
- the confidence
-
getLevelScores
public double[] getLevelScores()
- Returns:
- a copy of the per-level similarity scores, indexed by level
-
getLevelScore
public double getLevelScore(FingerprintLevel level)
- Parameters:
level- the fingerprint level to read- Returns:
- the similarity score at that level
-
-