Class SMCollectionMappingImpl
java.lang.Object
de.uni_trier.wi2.procake.similarity.impl.SimilarityMeasureImpl
de.uni_trier.wi2.procake.similarity.base.collection.impl.SMCollectionImpl
de.uni_trier.wi2.procake.similarity.base.collection.impl.SMCollectionMappingImpl
- All Implemented Interfaces:
SMCollection
,SMCollectionMapping
,SimilarityMeasure
A* - algorithm - implementation of a Collection-mapping-similarity measure
- Author:
- Alexander Stromer, Alexander Schultheis
-
Nested Class Summary
Modifier and TypeClassDescriptionclass
represents a mapping from a queryItem to a caseItemclass
represents a possible solution for a mapping scenario -
Field Summary
Fields inherited from class de.uni_trier.wi2.procake.similarity.base.collection.impl.SMCollectionImpl
similarityToUse
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.collection.SMCollection
LOG_ATTRIBUTE_NAME_NOT_FOUND
Fields inherited from interface de.uni_trier.wi2.procake.similarity.base.collection.SMCollectionMapping
DEFAULT_MAX_QUEUE_SIZE, NAME
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncompute
(DataObject queryObject, DataObject caseObject, SimilarityValuator valuator) int
Gets the queue size of the A* measureThe system name can be used to distinguish the similarity measures.protected void
Initialize measure based on existing instanceboolean
boolean
isSimilarityFor
(DataClass dataclass, String orderName) void
setMaxQueueSize
(int qSize) Sets the maximum size of the queue that stores the (partial) solutions of the A* algorithm.Methods inherited from class de.uni_trier.wi2.procake.similarity.base.collection.impl.SMCollectionImpl
checkStoppingCriteria, getCollectionClass, getSimilarityToUse, setSimilarityToUse
Methods inherited from class de.uni_trier.wi2.procake.similarity.impl.SimilarityMeasureImpl
getDataClass, getName, initialize, isAggregate, isForceOverride, isInterval, isNumeric, isObject, 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, setForceOverride
Methods inherited from interface de.uni_trier.wi2.procake.similarity.base.collection.SMCollection
getSimilarityToUse, setSimilarityToUse
-
Constructor Details
-
SMCollectionMappingImpl
public SMCollectionMappingImpl()
-
-
Method Details
-
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.
-
isSimilarityFor
- Overrides:
isSimilarityFor
in classSMCollectionImpl
-
getMaxQueueSize
public int getMaxQueueSize()Description copied from interface:SMCollectionMapping
Gets the queue size of the A* measure- Specified by:
getMaxQueueSize
in interfaceSMCollectionMapping
- Returns:
- The maximum queue size
-
setMaxQueueSize
public void setMaxQueueSize(int qSize) Description copied from interface:SMCollectionMapping
Sets the maximum size of the queue that stores the (partial) solutions of the A* algorithm. If the current queue grows larger than the set maximum, the lowest ranked solutions will be removed. Setting a negative value disables pruning of the queue.- Specified by:
setMaxQueueSize
in interfaceSMCollectionMapping
- Parameters:
qSize
- The maximum queue size
-
compute
public Similarity compute(DataObject queryObject, DataObject caseObject, SimilarityValuator valuator) - Specified by:
compute
in interfaceSimilarityMeasure
- Returns:
-
isReusable
public boolean isReusable()- Specified by:
isReusable
in interfaceSimilarityMeasure
- Overrides:
isReusable
in classSimilarityMeasureImpl
- Returns:
- true if the measure is reusable
-
initializeBasedOn
Description copied from class:SimilarityMeasureImpl
Initialize measure based on existing instance- Overrides:
initializeBasedOn
in classSMCollectionImpl
- Parameters:
base
- similarity measure to base on
-