Interface DependencySimilarity
- All Superinterfaces:
Comparable<Similarity>
,Similarity
- All Known Implementing Classes:
DependencySimilarityImpl
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
-
Field Summary
Fields inherited from interface de.uni_trier.wi2.procake.similarity.Similarity
VALUE_INVALID
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addCaseObject
(DataObject caseObject) Method, that adds a case objects to the similarity.void
addQueryObject
(DataObject queryObject) Method, that adds a query objects to the similarity.void
addSimilarity
(DataObject queryObject, DataObject caseObject, Similarity similarity) Method, that adds a similarity between two data objects.void
addSimilarity
(Similarity similarity) Method, that adds a similarity between one query and one case object to the dependency similarity.Method, that returns all case objects of the similarity.Method, that returns all query objects of the similarity.getSingleCaseObjectSimilarity
(DataObject caseObject) Method, that returns a single similarity for a case object.double
getValue()
Computes average similarity valueboolean
Checks, if every similarity is a valid valuevoid
setDependencySimilarityWeight
(double weight) Method, that sets the weight for the dependency similarity.Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface de.uni_trier.wi2.procake.similarity.Similarity
filterLocalSimilarities, getCaseObject, getComputationTimeNanos, getInfo, getLocalSimilarities, getLocalSimilarity, getQueryObject, getSimilarityMeasure, hasSameValueAsIn, isLessThan, pruneLocalSimilarities, removeLocalSimilaritiesWithNullMapping, sortLocalSimilarities, toDetailedString
-
Method Details
-
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
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 theaddSimilarity(DataObject, DataObject, Similarity)
method.- Parameters:
queryObject
- The query object to be added.
-
addCaseObject
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 theaddSimilarity(DataObject, DataObject, Similarity)
method.- Parameters:
caseObject
- The case object to be added.
-
addSimilarity
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 theaddSimilarity(DataObject, DataObject, Similarity)
method.- Parameters:
similarity
- The similarity to be added.
-
getValue
double getValue()Computes average similarity value- Specified by:
getValue
in interfaceSimilarity
- Returns:
- The average value of the similarities between all query and case objects.
-
addSimilarity
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 interfaceSimilarity
- Returns:
- True, if all similarities are valid values.
-
getSingleCaseObjectSimilarity
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.
-