Interface DependencySimilarity

  • All Superinterfaces:
    Comparable<Similarity>, Similarity
    All Known Implementing Classes:
    DependencySimilarityImpl

    public interface DependencySimilarity
    extends Similarity
    Interface for dependency specific similarities. These describe similarities between multiple query and case objects. From the similarities between the objects, the average value is calculated as dependency similarity.
    Author:
    Rahol Kumar, Alexander Schultheis
    • Method Detail

      • getQueryObjects

        List<DataObject> getQueryObjects()
        Method, that returns all query objects of the similarity.
        Returns:
        A list of all query objects.
      • getCaseObjects

        List<DataObject> getCaseObjects()
        Method, that returns all case objects of the similarity.
        Returns:
        A list of all case objects.
      • addQueryObject

        void addQueryObject​(DataObject queryObject)
        Method, that adds a query objects to the similarity. Note that in the norm case it's better to store query and case directly with the similarity through the addSimilarity(DataObject, DataObject, Similarity) method.
        Parameters:
        queryObject - The query object to be added.
      • addCaseObject

        void addCaseObject​(DataObject caseObject)
        Method, that adds a case objects to the similarity. Note that in the norm case it's better to store query and case directly with the similarity through the addSimilarity(DataObject, DataObject, Similarity) method.
        Parameters:
        caseObject - The case object to be added.
      • addSimilarity

        void addSimilarity​(Similarity similarity)
        Method, that adds a similarity between one query and one case object to the dependency similarity. Note that in the norm case it's better to store query and case directly with the similarity through the addSimilarity(DataObject, DataObject, Similarity) method.
        Parameters:
        similarity - The similarity to be added.
      • getValue

        double getValue()
        Computes average similarity value
        Specified by:
        getValue in interface Similarity
        Returns:
        The average value of the similarities between all query and case objects.
      • addSimilarity

        void addSimilarity​(DataObject queryObject,
                           DataObject caseObject,
                           Similarity similarity)
        Method, that adds a similarity between two data objects.
        Parameters:
        queryObject - The query object.
        caseObject - The case object.
        similarity - The similarity between query and case object.
      • isValidValue

        boolean isValidValue()
        Checks, if every similarity is a valid value
        Specified by:
        isValidValue in interface Similarity
        Returns:
        True, if all similarities are valid values.
      • getSingleCaseObjectSimilarity

        Similarity getSingleCaseObjectSimilarity​(DataObject caseObject)
        Method, that returns a single similarity for a case object.
        Parameters:
        caseObject - The case object, the similarity for is desired.
        Returns:
        Similarity between given case object and query object at the same position.
      • setDependencySimilarityWeight

        void setDependencySimilarityWeight​(double weight)
        Method, that sets the weight for the dependency similarity. This value is set if the combined case is not a full match, but the combined case has similar dependencies.
        Parameters:
        weight - Weight for the dependency. If not set, this weight is 1.0.