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
public class SMCollectionMappingImpl extends SMCollectionImpl implements SMCollectionMapping
A* - algorithm - implementation of a Collection-mapping-similarity measure- Author:
- Alexander Stromer, Alexander Schultheis
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classSMCollectionMappingImpl.AStarMaprepresents a mapping from a queryItem to a caseItemclassSMCollectionMappingImpl.AStarSolutionrepresents 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
COMPONENT, COMPONENT_KEY, 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
Constructors Constructor Description SMCollectionMappingImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Similaritycompute(DataObject queryObject, DataObject caseObject, SimilarityValuator valuator)intgetMaxQueueSize()Gets the queue size of the A* measureStringgetSystemName()The system name can be used to distinguish the similarity measures.protected voidinitializeBasedOn(SimilarityMeasure base)Initialize measure based on existing instancebooleanisReusable()booleanisSimilarityFor(DataClass dataclass, String orderName)voidsetMaxQueueSize(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
-
-
-
-
Method Detail
-
getSystemName
public String getSystemName()
Description copied from interface:SimilarityMeasureThe 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).- Specified by:
getSystemNamein interfaceSimilarityMeasure- Returns:
- The system name of the similarity measure. This is equal to SimilarityMeasure.NAME.
-
isSimilarityFor
public boolean isSimilarityFor(DataClass dataclass, String orderName)
- Overrides:
isSimilarityForin classSMCollectionImpl
-
getMaxQueueSize
public int getMaxQueueSize()
Description copied from interface:SMCollectionMappingGets the queue size of the A* measure- Specified by:
getMaxQueueSizein interfaceSMCollectionMapping- Returns:
- The maximum queue size
-
setMaxQueueSize
public void setMaxQueueSize(int qSize)
Description copied from interface:SMCollectionMappingSets 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:
setMaxQueueSizein interfaceSMCollectionMapping- Parameters:
qSize- The maximum queue size
-
compute
public Similarity compute(DataObject queryObject, DataObject caseObject, SimilarityValuator valuator)
- Specified by:
computein interfaceSimilarityMeasure- Returns:
-
isReusable
public boolean isReusable()
- Specified by:
isReusablein interfaceSimilarityMeasure- Overrides:
isReusablein classSimilarityMeasureImpl- Returns:
- true if the measure is reusable
-
initializeBasedOn
protected void initializeBasedOn(SimilarityMeasure base)
Description copied from class:SimilarityMeasureImplInitialize measure based on existing instance- Overrides:
initializeBasedOnin classSMCollectionImpl- Parameters:
base- similarity measure to base on
-
-