Interface AStarPathFactory<GP extends GraphPath<GP,​ST,​PT>,​ST extends GraphSegment<ST,​PT>,​PT extends GraphPoint<PT,​ST>>

  • Type Parameters:
    GP - is the type of the path to create.
    ST - is the type of the segments in the path.
    PT - is the type of the nodes in the path.
    All Known Implementing Classes:
    RoadAStarPathFactory

    public interface AStarPathFactory<GP extends GraphPath<GP,​ST,​PT>,​ST extends GraphSegment<ST,​PT>,​PT extends GraphPoint<PT,​ST>>
    This interface provides a mean to create a path factory for the A* algorithm.
    Since:
    13.0
    Version:
    17.0 2020-01-04 14:41:42
    Author:
    Stéphane GALLAND
    See Also:
    AStar
    Maven Group Id:
    org.arakhne.afc.core
    Maven Artifact Id:
    mathgraph
    • Method Detail

      • newPath

        @Pure
        GP newPath​(PT startPoint,
                   ST segment)
        Create an empty path.
        Parameters:
        startPoint - is the first point in the path.
        segment - is the first connection to follow.
        Returns:
        the path instance.
      • addToPath

        default boolean addToPath​(GP path,
                                  ST segment)
        Add the given segment into the given path.
        Parameters:
        path - is the path to build.
        segment - is the segment to add.
        Returns:
        true if the segment was added; otherwise false.