Class FractionalSharedNearestNeighborSimilarity.Instance<T>

    • Method Detail

      • countSharedNeighbors

        protected static int countSharedNeighbors​(DBIDs neighbors1,
                                                  DBIDs neighbors2)
        Compute the intersection size.
        Parameters:
        neighbors1 - SORTED neighbor ids of first
        neighbors2 - SORTED neighbor ids of second
        Returns:
        Intersection size
      • similarity

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

        public Similarity<? super T> getSimilarity()
        Description copied from interface: SimilarityQuery
        Get the inner similarity function.
        Returns:
        Similarity function