Class AStarManhattanEstimator

java.lang.Object
org.graph4j.shortestpath.AStarManhattanEstimator
All Implemented Interfaces:
AStarEstimator

public class AStarManhattanEstimator extends Object implements AStarEstimator
Manhattan distance.
Author:
Cristian Ivan, Cristian Frăsinaru
  • Constructor Details

    • AStarManhattanEstimator

      public AStarManhattanEstimator(int gridSize)
  • Method Details

    • estimate

      public double estimate(int vertex, int target)
      Description copied from interface: AStarEstimator
      Estimates the cost to reach the target from the given node.
      Specified by:
      estimate in interface AStarEstimator
      Parameters:
      vertex - The current vertex index.
      target - The target vertex index.
      Returns:
      The estimated cost to reach the target.