Interface Similarity

  • All Superinterfaces:
    All Known Subinterfaces:
    All Known Implementing Classes:
    DependencySimilarityImpl, 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).

    Rainer Maximini
    • Method Detail

      • getSimilarityMeasure

        String getSimilarityMeasure()
        similarity measure
      • getInfo

        Object getInfo()
        further infos
      • getQueryObject

        DataObject getQueryObject()
        query element
      • getCaseObject

        DataObject getCaseObject()
        case element
      • getValue

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

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

        boolean isLessThan​(Similarity otherSimilarity)
        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.
        a <Similarity> of local similarities
      • filterLocalSimilarities

        void filterLocalSimilarities​(double value)
        Recursively filters all local similarities of the given value.
        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.
        depth -
      • removeLocalSimilaritiesWithNullMapping

        void removeLocalSimilaritiesWithNullMapping()
        Removes all local similarities with a null mapping, i.e., where a query object could not be mapped to a case object and thus is mapped to null. Usually, the local similarity is 0.0 in this case.
      • toDetailedString

        String toDetailedString()
        detailed string representation