@Beta public final class SimilarityResultsImpl extends Object implements SimilarityResults
SimilarityResults
.Constructor and Description |
---|
SimilarityResultsImpl(int[] queries,
int[] targets,
double[] dissimilarities)
Construct.
|
Modifier and Type | Method and Description |
---|---|
double |
getDissimilarity(int index)
Dissimilarity.
|
int |
getQuery(int index)
ID of stored query.
|
int |
getTarget(int index)
ID of the stored target.
|
int |
getTripletCount()
Number of stored query-target-dissimilarity triplets.
|
String |
toString() |
public SimilarityResultsImpl(int[] queries, int[] targets, double[] dissimilarities)
queries
- Queries to storetargets
- Targets to storedissimilarities
- Dissimilarities to storeIllegalArgumentException
- when array sizes mismatch or dissimilarities array contains NaN or INF valuepublic int getTripletCount()
SimilarityResults
getTripletCount
in interface SimilarityResults
public int getQuery(int index)
SimilarityResults
getQuery
in interface SimilarityResults
index
- Index of the tripletpublic int getTarget(int index)
SimilarityResults
getTarget
in interface SimilarityResults
index
- Index of the tripletpublic double getDissimilarity(int index)
SimilarityResults
getDissimilarity
in interface SimilarityResults
index
- Index of the triplet