Class AbstractSimilarityAdapter.Instance<O>

    • Field Detail

      • similarityQuery

        private SimilarityQuery<? super O> similarityQuery
        The similarity query we use.
    • Constructor Detail

      • Instance

        public Instance​(Relation<O> database,
                        Distance<? super O> parent,
                        SimilarityQuery<? super O> similarityQuery)
        Constructor.
        Parameters:
        database - Database to use
        parent - Parent distance function
        similarityQuery - Similarity query
    • Method Detail

      • transform

        public abstract double transform​(double similarity)
        Transformation function.
        Parameters:
        similarity - Similarity value
        Returns:
        Distance value
      • distance

        public double distance​(DBIDRef id1,
                               DBIDRef id2)
        Description copied from interface: DistanceQuery
        Returns the distance between the two objects specified by their object ids.
        Parameters:
        id1 - first object id
        id2 - second object id
        Returns:
        the distance between the two objects specified by their object ids