Class SMOntologyPathImpl
java.lang.Object
de.uni_trier.wi2.procake.similarity.impl.SimilarityMeasureImpl
de.uni_trier.wi2.procake.similarity.base.ontology.impl.SMOntologyImpl
de.uni_trier.wi2.procake.similarity.base.ontology.impl.SMOntologyPathImpl
- All Implemented Interfaces:
SMOntology
,SMOntologyPath
,SimilarityMeasure
This similarity measure calculates the path length between two classes in a ontology. A
description of the measure can be found in
SMOntologyPath
.- Author:
- Tobias Dahlem
-
Field Summary
Fields inherited from interface de.uni_trier.wi2.procake.similarity.SimilarityMeasure
LOG_ORDER_NAME_NOT_FOUND
Fields inherited from interface de.uni_trier.wi2.procake.similarity.base.ontology.SMOntologyPath
NAME
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncompute
(DataObject queryObject, DataObject caseObject, SimilarityValuator valuator) The system name can be used to distinguish the similarity measures.double
double
void
setWeightDown
(double weight) Sets the weight for a step down.void
setWeightUp
(double weight) Sets the weight for a step up.Methods inherited from class de.uni_trier.wi2.procake.similarity.base.ontology.impl.SMOntologyImpl
checkArgumentApplicability, checkInstanceOntologyOrderPredicate, isSimilarityFor, validateNonNull, validateOntologyMatching, validateOntologyResource
Methods inherited from class de.uni_trier.wi2.procake.similarity.impl.SimilarityMeasureImpl
getDataClass, getName, initialize, initializeBasedOn, isAggregate, isForceOverride, isInterval, isNumeric, isObject, isReusable, isSet, isTable, isTaxonomy, isText, setDataClass, setForceOverride, setName, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface de.uni_trier.wi2.procake.similarity.SimilarityMeasure
getDataClass, getName, isForceOverride, isReusable, setForceOverride
Methods inherited from interface de.uni_trier.wi2.procake.similarity.base.ontology.SMOntology
checkArgumentApplicability, checkInstanceOntologyOrderPredicate
-
Constructor Details
-
SMOntologyPathImpl
public SMOntologyPathImpl()
-
-
Method Details
-
compute
public Similarity compute(DataObject queryObject, DataObject caseObject, SimilarityValuator valuator) - Specified by:
compute
in interfaceSimilarityMeasure
- Returns:
-
getSystemName
Description copied from interface:SimilarityMeasure
The system name can be used to distinguish the similarity measures. Each similarity measure that can be instantiated contains a static final field called NAME representing the system name, e.g.,SMAggregateEuclidian.NAME
The system name must also be given during initialization, see
SimilarityModel.createSimilarityMeasure(String, DataClass)
.- Specified by:
getSystemName
in interfaceSimilarityMeasure
- Returns:
- The system name of the similarity measure. This is equal to SimilarityMeasure.NAME.
-
getWeightDown
public double getWeightDown()- Specified by:
getWeightDown
in interfaceSMOntologyPath
- Returns:
- The weight for a step down.
-
setWeightDown
public void setWeightDown(double weight) Description copied from interface:SMOntologyPath
Sets the weight for a step down.- Specified by:
setWeightDown
in interfaceSMOntologyPath
- Parameters:
weight
- must be between 0 an 1. Other values will be rounded automatically.
-
getWeightUp
public double getWeightUp()- Specified by:
getWeightUp
in interfaceSMOntologyPath
- Returns:
- The weight for a step up.
-
setWeightUp
public void setWeightUp(double weight) Description copied from interface:SMOntologyPath
Sets the weight for a step up.- Specified by:
setWeightUp
in interfaceSMOntologyPath
- Parameters:
weight
- must be between 0 an 1. Other values will be rounded automatically.
-