Class Result


  • public class Result
    extends java.lang.Object
    A result of a search.
    • Constructor Summary

      Constructors 
      Constructor Description
      Result​(int[][] map, float distance, boolean pathFound)
      The result of a pathfinding algorithm.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      float getDistance()
      Returns the length of the path found.
      int[][] getMap()
      Returns the map with the path and visited nodes marked.
      boolean isPathFound()
      Check if a path was found of not.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Result

        public Result​(int[][] map,
                      float distance,
                      boolean pathFound)
        The result of a pathfinding algorithm.
        Parameters:
        map - the map with the path and visited nodes marked
        distance - the length of the path found
        pathFound - a boolean representing whether a path was found of not
    • Method Detail

      • getMap

        public int[][] getMap()
        Returns the map with the path and visited nodes marked.
        Returns:
        the map
      • getDistance

        public float getDistance()
        Returns the length of the path found.
        Returns:
        the length of the path
      • isPathFound

        public boolean isPathFound()
        Check if a path was found of not.
        Returns:
        true if a path was found and false if path was not found