@Beta @PublicAPI public interface DissimilarityInput
MolInputBuilder
for an implementation.
This abstraction is used when pairwise comparison of inputs is required by a certain algorithm.
Please note that this interface is marked with Beta
annotation, so it can be subject of incompatible
changes or removal in later releases.
Modifier and Type | Method and Description |
---|---|
double |
dissimilarity(int targetIndex,
int queryIndex)
Dissimilarity/distance between an ordered pair of input items.
|
MetricMetadata |
getMetricMetadata()
Metadata about the underlying metric.
|
int |
size()
Item count to be considered.
|
int size()
double dissimilarity(int targetIndex, int queryIndex)
Please note that the represented input is not necessarily a metric space; only the satisfactions of
criteria described by the results of getMetricMetadata()
is guaranteed.
Note that parameter naming discriminates query and target indexes to be consistent with the usage of non symmetric underlying comparison metrics.
targetIndex
- Index of first item to be comparedqueryIndex
- Index of second item to be comparedIllegalArgumentException
- when either of the idem indexes passed is negative or greater or equal to
item count returned by size()
MetricMetadata getMetricMetadata()