Class 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 for DataObjects. 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 more DataObjects until all objects are mapped or some objects cannot be mapped.
    Author:
    Maximilian Hoffmann
    • 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 AStarResult object 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 first DataObject to compare
        d2 - the second DataObject to compare
        Returns:
        the initial state