Class AStarGenericSearch
- java.lang.Object
-
- de.uni_trier.wi2.procake.utils.astar.generic.AStarGenericSearch
-
- Direct Known Subclasses:
AStarNESTGraph,AStarSet
public abstract class AStarGenericSearch extends Object
This class provides a generic search with an implementation of the A-Star-Algorithm in the context of mappings forDataObjects. Each extension of this generic class at least has to define an initial state for the search. Starting with the initial state, the algorithm always tries to map moreDataObjects until all objects are mapped or some objects cannot be mapped.- Author:
- Maximilian Hoffmann
-
-
Constructor Summary
Constructors Constructor Description AStarGenericSearch(DataObject dataObject1, DataObject dataObject2)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract AStarStatecreateInitialState(DataObject d1, DataObject d2)The initial state is the very first state that is expanded by the A-Star algorithm.protected List<AStarState>getSuccessors(AStarState state)AStarResultstartSearch()This method has to be called in order to start the search.
-
-
-
Constructor Detail
-
AStarGenericSearch
public AStarGenericSearch(DataObject dataObject1, DataObject dataObject2)
-
-
Method Detail
-
startSearch
public AStarResult startSearch()
This method has to be called in order to start the search.- Returns:
- a
AStarResultobject that contains the best found mapping and an exception if the mapping is incomplete
-
createInitialState
protected abstract AStarState createInitialState(DataObject d1, DataObject d2)
The initial state is the very first state that is expanded by the A-Star algorithm.- Parameters:
d1- the firstDataObjectto compared2- the secondDataObjectto compare- Returns:
- the initial state
-
getSuccessors
protected List<AStarState> getSuccessors(AStarState state)
-
-