shortestPAlgorithms
Class JumpPointSearch

java.lang.Object
  extended by shortestPAlgorithms.JumpPointSearch

public class JumpPointSearch
extends java.lang.Object

Jump point search for finding shortest path between two points.


Constructor Summary
JumpPointSearch()
           
 
Method Summary
 Stack get_shortest_path(int s_x, int s_y, int t_x, int t_y, int[][] grid)
          Shortest path between two points.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JumpPointSearch

public JumpPointSearch()
Method Detail

get_shortest_path

public Stack get_shortest_path(int s_x,
                               int s_y,
                               int t_x,
                               int t_y,
                               int[][] grid)
Shortest path between two points.

Parameters:
s_x - start x coordinate
s_y - start y coordinate
t_x - target x coordinate
t_y - target y coordinate
grid - integer array representation of map. 0 is a node.
Returns:
Stack of nodes representing optimal path. Top node first step.