Class SpatialPrimitiveDistanceSimilarityQuery<O extends SpatialComparable>

    • Field Detail

      • similarityFunction

        private PrimitiveSimilarity<? super O extends SpatialComparable> similarityFunction
        Typed reference to the similarity function (usually the same as the distance function!)
    • Constructor Detail

      • SpatialPrimitiveDistanceSimilarityQuery

        public SpatialPrimitiveDistanceSimilarityQuery​(Relation<? extends O> relation,
                                                       SpatialPrimitiveDistance<? super O> distanceFunction,
                                                       PrimitiveSimilarity<? super O> similarityFunction)
        Constructor.
        Parameters:
        relation - Representation
        distanceFunction - distance function
        similarityFunction - similarity function (usually the same as the distance function!)
    • Method Detail

      • similarity

        public final double similarity​(DBIDRef id1,
                                       DBIDRef id2)
        Description copied from interface: SimilarityQuery
        Returns the similarity between the two objects specified by their object ids.
        Specified by:
        similarity in interface SimilarityQuery<O extends SpatialComparable>
        Parameters:
        id1 - first object id
        id2 - second object id
        Returns:
        the similarity between the two objects specified by their object ids
      • similarity

        public final double similarity​(O o1,
                                       DBIDRef id2)
        Description copied from interface: SimilarityQuery
        Returns the similarity between the two objects specified by their object ids.
        Specified by:
        similarity in interface SimilarityQuery<O extends SpatialComparable>
        Parameters:
        o1 - first object
        id2 - second object id
        Returns:
        the similarity between the two objects specified by their object ids
      • similarity

        public final double similarity​(DBIDRef id1,
                                       O o2)
        Description copied from interface: SimilarityQuery
        Returns the similarity between the two objects specified by their object ids.
        Specified by:
        similarity in interface SimilarityQuery<O extends SpatialComparable>
        Parameters:
        id1 - first object id
        o2 - second object
        Returns:
        the similarity between the two objects specified by their object ids
      • similarity

        public double similarity​(O o1,
                                 O o2)
        Description copied from interface: SimilarityQuery
        Returns the similarity between the two objects specified by their object ids.
        Specified by:
        similarity in interface SimilarityQuery<O extends SpatialComparable>
        Parameters:
        o1 - first object
        o2 - second object
        Returns:
        the similarity between the two objects specified by their object ids