Interface SimilarityMeasure
-
- All Known Subinterfaces:
SMAggregate,SMAggregateAverage,SMAggregateEuclidian,SMAggregateKMaximum,SMAggregateKMinimum,SMAggregateMaximum,SMAggregateMinimum,SMAggregateMinkowski,SMAggregateWeighted,SMCollection,SMCollectionIsolatedMapping,SMCollectionMapping,SMGraphAStar,SMGraphAStarOne,SMGraphAStarThree,SMGraphAStarTwo,SMGraphDTW,SMGraphSWA,SMInterval,SMListCorrectness,SMListDP,SMListDTW,SMListMapping,SMListSWA,SMNESTGraphItem,SMNumeric,SMNumericExponential,SMNumericFuzzy,SMNumericLinear,SMNumericSigmoid,SMNumericThreshold,SMObjectEqual,SMOntology,SMOntologyAggAvg,SMOntologyDirectGroup,SMOntologyFbMS,SMOntologyFbSanchez,SMOntologyIndirectGroup,SMOntologyIsEquivalent,SMOntologyPath,SMOntologySpRada,SMOntologySpSlimani,SMOntologySpWuPalmer,SMSimpleTask,SMSimpleWorkflow,SMString,SMStringCosine,SMStringEqual,SMStringJaroWinkler,SMStringLevenshtein,SMStringNGram,SMStringRegexp,SMStringTermCount,SMStringWildcard,SMTableDataClass,SMTableDataObject,SMTaxonomy,SMTaxonomyClassic,SMTaxonomyClassicUserWeights,SMTaxonomyNodeHeight,SMTaxonomyPath,SMWorkflowEqual,SMWorkflowLevenshtein
- All Known Implementing Classes:
SimilarityMeasureImpl,SMAggregateAverageImpl,SMAggregateEuclidianImpl,SMAggregateImpl,SMAggregateKMaximumImpl,SMAggregateKMinimumImpl,SMAggregateMaximumImpl,SMAggregateMinimumImpl,SMAggregateMinkowskiImpl,SMAggregateWeightedImpl,SMCollectionImpl,SMCollectionIsolatedMappingImpl,SMCollectionMappingImpl,SMGraphAStarImpl,SMGraphAStarOneImpl,SMGraphAStarThreeImpl,SMGraphAStarTwoImpl,SMGraphDTWImpl,SMGraphSWAImpl,SMIntervalImpl,SMListCorrectnessImpl,SMListDPImpl,SMListDTWImpl,SMListMappingImpl,SMListSWAImpl,SMNESTGraphItemImpl,SMNumericExponentialImpl,SMNumericFuzzyImpl,SMNumericImpl,SMNumericLinearImpl,SMNumericSigmoidImpl,SMNumericThresholdImpl,SMObjectEqualImpl,SMOntologyAggAvgImpl,SMOntologyDirectGroupImpl,SMOntologyFbMSImpl,SMOntologyFbSanchezImpl,SMOntologyImpl,SMOntologyIndirectGroupImpl,SMOntologyIsEquivalentImpl,SMOntologyPathImpl,SMOntologySpRadaImpl,SMOntologySpSlimaniImpl,SMOntologySpWuPalmerImpl,SMSimpleTaskImpl,SMSimpleWorkflowImpl,SMStringCosineImpl,SMStringEqualImpl,SMStringImpl,SMStringJaroWinklerImpl,SMStringLevenshteinImpl,SMStringNGramImpl,SMStringRegexpImpl,SMStringTermCountImpl,SMStringWildcardImpl,SMTableDataClassImpl,SMTableDataObjectImpl,SMTaxonomyClassicImpl,SMTaxonomyClassicUserWeightsImpl,SMTaxonomyImpl,SMTaxonomyNodeHeightImpl,SMTaxonomyPathImpl,SMTaxonomyWeightedNodes,SMWorkflowEqualImpl,SMWorkflowLevenshteinImpl
public interface SimilarityMeasureMain interface for all similarity measures.All similarity measures are implementing this interface. It provides some common methods that are required for all similarity measure.
- Author:
- Rainer Maximini
-
-
Field Summary
Fields Modifier and Type Field Description static StringCOMPONENTComponent: "cake.data.similarity" (LogComponentIdentifier.COMPONENT)static StringCOMPONENT_KEYComponent-Key: "03" (LogComponentIdentifier.COMPONENT_KEY_SIMILARITYMEASURE)static StringLOG_ORDER_NAME_NOT_FOUNDThe order name could not be found within this measure.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Similaritycompute(DataObject queryObject, DataObject caseObject, SimilarityValuator valuator)DataClassgetDataClass()Each similarity measure is defined for oneDataClass.StringgetName()Each similarity measure has an unique name for the definedDataClass.StringgetSystemName()The system name can be used to distinguish the similarity measures.booleanisForceOverride()booleanisReusable()voidsetForceOverride(boolean forceOverride)set if this measure should override an existing measure of same name
-
-
-
Field Detail
-
COMPONENT
static final String COMPONENT
Component: "cake.data.similarity" (LogComponentIdentifier.COMPONENT)- See Also:
- Constant Field Values
-
COMPONENT_KEY
static final String COMPONENT_KEY
Component-Key: "03" (LogComponentIdentifier.COMPONENT_KEY_SIMILARITYMEASURE)- See Also:
- Constant Field Values
-
LOG_ORDER_NAME_NOT_FOUND
static final String LOG_ORDER_NAME_NOT_FOUND
The order name could not be found within this measure.- Component:
COMPONENT - Key: "0300"
- this
- Numeric-class
- Ordername
- See Also:
- Constant Field Values
- Component:
-
-
Method Detail
-
compute
Similarity compute(DataObject queryObject, DataObject caseObject, SimilarityValuator valuator)
- Parameters:
queryObject-caseObject-valuator-- Returns:
-
getDataClass
DataClass getDataClass()
Each similarity measure is defined for oneDataClass. TheDataClassmust be set during initialisation withSimilarityModel.createSimilarityMeasure(String, DataClass).- Returns:
- The
DataClassfor wich this similarity measure is defined.
-
getName
String getName()
Each similarity measure has an unique name for the definedDataClass. The name must be given during registration, seeSimilarityModel.addSimilarityMeasure(SimilarityMeasure, String).- Returns:
- The current name of the similarity measure
-
getSystemName
String getSystemName()
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.NAMEThe system name must also be given during initialization, see
SimilarityModel.createSimilarityMeasure(String, DataClass).- Returns:
- The system name of the similarity measure. This is equal to SimilarityMeasure.NAME.
-
isForceOverride
boolean isForceOverride()
- Returns:
- true if this measure should override an existing measure of same name
-
setForceOverride
void setForceOverride(boolean forceOverride)
set if this measure should override an existing measure of same name
-
isReusable
boolean isReusable()
- Returns:
- true if the measure is reusable
-
-