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 class
SMCollectionMappingImpl.AStarMap
represents a mapping from a queryItem to a caseItemclass
SMCollectionMappingImpl.AStarSolution
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
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 Similarity
compute(DataObject queryObject, DataObject caseObject, SimilarityValuator valuator)
int
getMaxQueueSize()
Gets the queue size of the A* measureString
getSystemName()
The system name can be used to distinguish the similarity measures.protected void
initializeBasedOn(SimilarityMeasure base)
Initialize measure based on existing instanceboolean
isReusable()
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
-
-
-
-
Method Detail
-
getSystemName
public String 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
public boolean isSimilarityFor(DataClass dataclass, String orderName)
- 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
protected void initializeBasedOn(SimilarityMeasure base)
Description copied from class:SimilarityMeasureImpl
Initialize measure based on existing instance- Overrides:
initializeBasedOn
in classSMCollectionImpl
- Parameters:
base
- similarity measure to base on
-
-