Class SMTaxonomyClassicUserWeightsImpl
java.lang.Object
de.uni_trier.wi2.procake.similarity.impl.SimilarityMeasureImpl
de.uni_trier.wi2.procake.similarity.base.taxonomy.impl.SMTaxonomyImpl
de.uni_trier.wi2.procake.similarity.base.taxonomy.impl.SMTaxonomyWeightedNodes
de.uni_trier.wi2.procake.similarity.base.taxonomy.impl.SMTaxonomyClassicImpl
de.uni_trier.wi2.procake.similarity.base.taxonomy.impl.SMTaxonomyClassicUserWeightsImpl
- All Implemented Interfaces:
SMTaxonomy
,SMTaxonomyClassic
,SMTaxonomyClassicUserWeights
,SimilarityMeasure
public class SMTaxonomyClassicUserWeightsImpl
extends SMTaxonomyClassicImpl
implements SMTaxonomyClassicUserWeights
- Author:
- Rainer Maximini
-
Field Summary
Fields inherited from class de.uni_trier.wi2.procake.similarity.base.taxonomy.impl.SMTaxonomyWeightedNodes
deepestNodeHeight
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.taxonomy.SMTaxonomyClassic
NAME, STRATEGY_DEFAULT
Fields inherited from interface de.uni_trier.wi2.procake.similarity.base.taxonomy.SMTaxonomyClassicUserWeights
NAME
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
This method checks if the weights of all nodes are descending towards the root.void
This method checks if the taxonomy contains duplicate node entries.void
This method checks if all defined inner nodes have an associated weight.getNodeWeight
(AtomicObject nodeValue) The system name can be used to distinguish the similarity measures.getWeight
(AtomicObject nodeValue) void
void
Removes all weights.void
removeWeight
(AtomicObject nodeValue) Removes the value of the node.void
setWeight
(AtomicObject nodeValue, Double weight) Methods inherited from class de.uni_trier.wi2.procake.similarity.base.taxonomy.impl.SMTaxonomyClassicImpl
compute, compute, getInnerNodeInCaseStrategy, getInnerNodeInQueryStrategy, initLeafNodeCache, initNodeWeightCache, setInnerNodeInCaseStrategy, setInnerNodeInQueryStrategy
Methods inherited from class de.uni_trier.wi2.procake.similarity.base.taxonomy.impl.SMTaxonomyWeightedNodes
addNodeWeight, clearNodeWeights, removeNodeWeight
Methods inherited from class de.uni_trier.wi2.procake.similarity.base.taxonomy.impl.SMTaxonomyImpl
getAtomicClass, getInstanceTaxonomyOrderPredicate, initialize, isSimilarityFor
Methods inherited from class de.uni_trier.wi2.procake.similarity.impl.SimilarityMeasureImpl
getDataClass, getName, 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
compute, getDataClass, getName, isForceOverride, isReusable, setForceOverride
Methods inherited from interface de.uni_trier.wi2.procake.similarity.base.taxonomy.SMTaxonomy
getInstanceTaxonomyOrderPredicate
Methods inherited from interface de.uni_trier.wi2.procake.similarity.base.taxonomy.SMTaxonomyClassic
getInnerNodeInCaseStrategy, getInnerNodeInQueryStrategy, setInnerNodeInCaseStrategy, setInnerNodeInQueryStrategy
-
Constructor Details
-
SMTaxonomyClassicUserWeightsImpl
public SMTaxonomyClassicUserWeightsImpl()
-
-
Method Details
-
getDefinedNodes
- Specified by:
getDefinedNodes
in interfaceSMTaxonomyClassicUserWeights
- Returns:
- A list of defined AtomicObjects
- See Also:
-
getNodeWeight
- Overrides:
getNodeWeight
in classSMTaxonomyWeightedNodes
-
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
- Overrides:
getSystemName
in classSMTaxonomyClassicImpl
- Returns:
- The system name of the similarity measure. This is equal to SimilarityMeasure.NAME.
-
getWeight
- Specified by:
getWeight
in interfaceSMTaxonomyClassicUserWeights
- Parameters:
nodeValue
- The value of the node.- Returns:
- The weight of the given node. If no weight is defined, null will be returned.
-
removeWeight
Description copied from interface:SMTaxonomyClassicUserWeights
Removes the value of the node. If no value exists, noting happens.- Specified by:
removeWeight
in interfaceSMTaxonomyClassicUserWeights
- Parameters:
nodeValue
- A nodes is specified by its value.
-
removeAllWeights
public void removeAllWeights()Description copied from interface:SMTaxonomyClassicUserWeights
Removes all weights.- Specified by:
removeAllWeights
in interfaceSMTaxonomyClassicUserWeights
-
setWeight
- Specified by:
setWeight
in interfaceSMTaxonomyClassicUserWeights
weight
- must be between 0 and 1
-
initClassCaches
public void initClassCaches()- Overrides:
initClassCaches
in classSMTaxonomyClassicImpl
-
checkForDuplicateNodeNames
public void checkForDuplicateNodeNames()This method checks if the taxonomy contains duplicate node entries. A duplicate in the taxonomy-structure is not allowed. A duplicate in the value-enumeration is eliminated because this value enumeration is internally stored as a set. -
checkForDescendingWeightsTowardsRoot
public void checkForDescendingWeightsTowardsRoot()This method checks if the weights of all nodes are descending towards the root. This is required by the definition of the taxonomy. -
checkForMissingWeights
public void checkForMissingWeights()This method checks if all defined inner nodes have an associated weight. Whereas the node itself is defined in the model, the similarity weight is defined in the similarity model.
-