Interface Similarity

  • All Superinterfaces:
    Comparable<Similarity>
    All Known Implementing Classes:
    SimilarityImpl

    public interface Similarity
    extends Comparable<Similarity>
    Represents a similarity value.

    The Similarity is a wrapper for a double value with two additional functionalities:

    • All values are between 0.0 and 1.0 (inclusive)
    • with isValidValue() it is possible to check if it is a valid value.

    Similarity values may result from the aggregation of several local similarities. For this purpose, this class also contains a list of local similarities that constitute the overall similarity. For instance, local similarities result from computations that involve a mapping of DataObjects (e.g., SetObject, AggregateObject, or NESTWorkflowObject).

    Author:
    Rainer Maximini
    • Method Detail

      • getSimilarityMeasure

        String getSimilarityMeasure()
        Returns:
        similarity measure
      • getInfo

        Object getInfo()
        Returns:
        further infos
      • getQueryObject

        DataObject getQueryObject()
        Returns:
        query element
      • getCaseObject

        DataObject getCaseObject()
        Returns:
        case element
      • getValue

        double getValue()
        Returns:
        a double value between 0 and 1
      • isValidValue

        boolean isValidValue()
        Returns:
        true if the computation was successful and a correct value between 0 and 1 will be returned by getValue()
      • isLessThan

        boolean isLessThan​(Similarity otherSimilarity)
        Returns:
        true if this similarity is valid, the other similarity is valid, and this similarity value is less than the other similarity value.
      • getLocalSimilarities

        List<Similarity> getLocalSimilarities()
        This method returns a list of all the local similarities that contribute to the overall similarity value.
        Returns:
        a <Similarity> of local similarities
      • filterLocalSimilarities

        void filterLocalSimilarities​(double value)
        Recursively filters all local similarities of the given value.
        Parameters:
        value -
      • sortLocalSimilarities

        void sortLocalSimilarities()
        Recursively sorts all local similarities in descending order.
      • pruneLocalSimilarities

        void pruneLocalSimilarities​(int depth)
        Prunes the tree of local similarities to the given depth.
        Parameters:
        depth -
      • toDetailedString

        String toDetailedString()
        Returns:
        deatiled string representation