Interface SMGraphAStar
- All Superinterfaces:
SimilarityMeasure
- All Known Subinterfaces:
SMGraphAStarOne
,SMGraphAStarThree
,SMGraphAStarTwo
- All Known Implementing Classes:
SMGraphAStarImpl
,SMGraphAStarOneImpl
,SMGraphAStarThreeImpl
,SMGraphAStarTwoImpl
Interface of the general GraphAStar-SimilarityMeasure.
- Author:
- Alexander Stromer
-
Field Summary
Modifier and TypeFieldDescriptionstatic final boolean
Default flag for allowing case-oriented mapping is truestatic final boolean
Default flag for allowing pre-initialization of initial solution is truestatic final int
Default maximum size of the solution queue is -1static final boolean
Default flag for testing only for similarity of 1.0 between query and case graph is falsestatic final boolean
Default flag for whether local edge similarities should be returned falsestatic final boolean
Default flag for whether local node similarities should be returned falsestatic final int
Default timeout in seconds for terminating the computation is -1static final boolean
Default flag for using equality instead of similarity is falsestatic final double
The default weight for aggregating the similarity of graph items is 1.0.Fields inherited from interface de.uni_trier.wi2.procake.similarity.SimilarityMeasure
LOG_ORDER_NAME_NOT_FOUND
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Clears all weights for graph item classes.double
int
Gets the queue size of the AStarSimilarityint
double
boolean
boolean
boolean
boolean
boolean
boolean
boolean
void
setAllowCaseOrientedMapping
(boolean allowCaseOrientedMapping) void
setAllowPreInitializationOfSolution
(boolean allowPreInitializationOfSolution) void
setDefaultWeight
(double weight) void
setMaxQueueSize
(int qSize) Sets the maximum size of the queue that stores the (partial) solutions of the A* algorithm.void
setOnlyTestForMaxSim
(boolean onlyTestForMaxSim) void
setOriginalQueryEdges
(Set<NESTEdgeObject> originalQueryEdges) The original set of edges of the query.void
setOriginalQueryNodes
(Set<NESTNodeObject> originalQueryNodes) The original set of nodes of the query.void
setReturnLocalEdgeSimilarities
(boolean returnLocalEdgeSimilarities) void
setReturnLocalNodeSimilarities
(boolean returnLocalNodeSimilarities) void
setReturnLocalSimilarities
(boolean returnLocalSimilarities) void
setTimeout
(int timeoutSeconds) Sets a timeout in seconds for terminating the computation.void
setUseEqualityInsteadOfSimilarity
(boolean useEqualityInsteadOfSimilarity) void
Methods inherited from interface de.uni_trier.wi2.procake.similarity.SimilarityMeasure
compute, getDataClass, getName, getSystemName, isForceOverride, isReusable, setForceOverride
-
Field Details
-
DEFAULT_MAX_QUEUE_SIZE
static final int DEFAULT_MAX_QUEUE_SIZEDefault maximum size of the solution queue is -1- See Also:
-
DEFAULT_TIMEOUT
static final int DEFAULT_TIMEOUTDefault timeout in seconds for terminating the computation is -1- See Also:
-
DEFAULT_RETURN_LOCAL_NODE_SIMILARITIES
static final boolean DEFAULT_RETURN_LOCAL_NODE_SIMILARITIESDefault flag for whether local node similarities should be returned false- See Also:
-
DEFAULT_RETURN_LOCAL_EDGE_SIMILARITIES
static final boolean DEFAULT_RETURN_LOCAL_EDGE_SIMILARITIESDefault flag for whether local edge similarities should be returned false- See Also:
-
DEFAULT_ALLOW_PRE_INITIALIZATION
static final boolean DEFAULT_ALLOW_PRE_INITIALIZATIONDefault flag for allowing pre-initialization of initial solution is true- See Also:
-
DEFAULT_ALLOW_CASE_ORIENTED_MAPPING
static final boolean DEFAULT_ALLOW_CASE_ORIENTED_MAPPINGDefault flag for allowing case-oriented mapping is true- See Also:
-
DEFAULT_ONLY_TEST_FOR_MAX_SIM
static final boolean DEFAULT_ONLY_TEST_FOR_MAX_SIMDefault flag for testing only for similarity of 1.0 between query and case graph is false- See Also:
-
DEFAULT_USE_EQUALITY_INSTEAD_OF_SIMILARITY
static final boolean DEFAULT_USE_EQUALITY_INSTEAD_OF_SIMILARITYDefault flag for using equality instead of similarity is false- See Also:
-
DEFAULT_WEIGHT
static final double DEFAULT_WEIGHTThe default weight for aggregating the similarity of graph items is 1.0.- See Also:
-
-
Method Details
-
getOriginalQueryNodes
Set<NESTNodeObject> getOriginalQueryNodes()- Returns:
- the originalQueryNodes
-
setOriginalQueryNodes
The original set of nodes of the query.- Parameters:
originalQueryNodes
- the originalQueryNodes to set
-
getOriginalQueryEdges
Set<NESTEdgeObject> getOriginalQueryEdges()- Returns:
- the originalQueryEdges
-
setOriginalQueryEdges
The original set of edges of the query.- Parameters:
originalQueryEdges
- the originalQueryEdges to set
-
getMaxQueueSize
int getMaxQueueSize()Gets the queue size of the AStarSimilarity- Returns:
- The maximum queue size
-
setMaxQueueSize
void setMaxQueueSize(int qSize) 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.- Parameters:
qSize
- The maximum queue size
-
setReturnLocalSimilarities
void setReturnLocalSimilarities(boolean returnLocalSimilarities) - Parameters:
returnLocalSimilarities
-
-
setReturnLocalNodeSimilarities
void setReturnLocalNodeSimilarities(boolean returnLocalNodeSimilarities) - Parameters:
returnLocalNodeSimilarities
-
-
setReturnLocalEdgeSimilarities
void setReturnLocalEdgeSimilarities(boolean returnLocalEdgeSimilarities) - Parameters:
returnLocalEdgeSimilarities
-
-
isReturnLocalSimilarities
boolean isReturnLocalSimilarities()- Returns:
-
isReturnLocalNodeSimilarities
boolean isReturnLocalNodeSimilarities()- Returns:
-
isReturnLocalEdgeSimilarities
boolean isReturnLocalEdgeSimilarities()- Returns:
-
isAllowPreInitializationOfSolution
boolean isAllowPreInitializationOfSolution()- Returns:
-
setAllowPreInitializationOfSolution
void setAllowPreInitializationOfSolution(boolean allowPreInitializationOfSolution) - Parameters:
allowPreInitializationOfSolution
-
-
isAllowCaseOrientedMapping
boolean isAllowCaseOrientedMapping()- Returns:
- Whether case-oriented mapping is allowed or not.
-
setAllowCaseOrientedMapping
void setAllowCaseOrientedMapping(boolean allowCaseOrientedMapping) - Parameters:
allowCaseOrientedMapping
- flag
-
isOnlyTestForMaxSim
boolean isOnlyTestForMaxSim()- Returns:
- flag
-
setOnlyTestForMaxSim
void setOnlyTestForMaxSim(boolean onlyTestForMaxSim) - Parameters:
onlyTestForMaxSim
- flag
-
isUseEqualityInsteadOfSimilarity
boolean isUseEqualityInsteadOfSimilarity()- Returns:
- flag
-
setUseEqualityInsteadOfSimilarity
void setUseEqualityInsteadOfSimilarity(boolean useEqualityInsteadOfSimilarity) - Parameters:
useEqualityInsteadOfSimilarity
- flag
-
getTimeout
int getTimeout()- Returns:
- The timeout for terminating the computation.
-
setTimeout
void setTimeout(int timeoutSeconds) Sets a timeout in seconds for terminating the computation. Setting a negative value disables timeout.- Parameters:
timeoutSeconds
- in seconds for terminating the computation
-
getWeight
- Returns:
- the weight of the given graph item class. If the weight is not set, the default weight will be returned.
- Throws:
InvalidParameterException
-
setWeight
- Parameters:
graphItemClassName
- is the name of the graph item class whose weight should be setweight
- is the weight of the attribute. The values will be normalized automatically.- Throws:
InvalidParameterException
-
clearWeights
void clearWeights()Clears all weights for graph item classes. -
getDefaultWeight
double getDefaultWeight()- Returns:
- default weight
-
setDefaultWeight
void setDefaultWeight(double weight) - Parameters:
weight
- is the default weight for each graph item class which hasn't an own weight
-