Package com.chemaxon.clustering.common
Interface DissimilarityInput
- All Known Subinterfaces:
MolInput
DissimilarityInput represents an input set for similarity based clustering algorithm.
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.
-
Method Summary
Modifier and TypeMethodDescriptiondouble
dissimilarity
(int targetIndex, int queryIndex) Dissimilarity/distance between an ordered pair of input items.default MetricMetadata
Deprecated, for removal: This API element is subject to removal in a future version.No longer used and will be removed.int
size()
Item count to be considered.
-
Method Details
-
size
int size()Item count to be considered.- Returns:
- Item count
-
dissimilarity
double dissimilarity(int targetIndex, int queryIndex) Dissimilarity/distance between an ordered pair of input items.Please note that the represented input is not necessarily a metric space.
Note that parameter naming discriminates query and target indexes to be consistent with the usage of non symmetric underlying comparison metrics.
- Parameters:
targetIndex
- Index of first item to be comparedqueryIndex
- Index of second item to be compared- Returns:
- Dissimilarity of the two compared items
- Throws:
IllegalArgumentException
- when either of the idem indexes passed is negative or greater or equal to item count returned bysize()
-
getMetricMetadata
@Deprecated(forRemoval=true) @SubjectToRemoval(date=JAN_01_2025) default MetricMetadata getMetricMetadata()Deprecated, for removal: This API element is subject to removal in a future version.No longer used and will be removed.Metadata about the underlying metric.- Returns:
- Metadata of the comparison of dissimilarity calculations
- Throws:
UnsupportedOperationException
- Thrown by the default implementation.
-