Path planning for Java and Matlab

I've written a simple Java implementation of Dijkstra's algorithm and A* search for path planning, along with a Matlab interface to the code.  The Java planning code is much faster than the same thing would be in straight Matlab, and only slightly slower than it would be in C.  Examples of how to use the code are included both in Java and in Matlab; see the file 00readme.txt in the distribution.

Here is a zip file of the source (revision 1728, 8 Sep 2008). And, here is some sample output from the Matlab demo:

This false-color plot shows, for all pixels (X,Y), the length of the shortest path from (X,Y) to a goal location near the bottom center of the image.  Blue pixels mean short paths, red ones mean long paths, and other colors are in between (in the same order as in a spectrum).  A path can move from a pixel to any of its eight neighbors; the cost of doing so is proportional to the distance traveled (1 or 1.414) and to the base cost of the pixel.  The base cost matrix is an input of the code.  In this case it was set to be some low-pass-filtered white noise, scaled so that the minimum cost was 0 and the maximum cost was 1, except that an additional cost of 2 was added to pixels in a square just above and to the right of the goal.

For reference, it takes about 0.2 seconds to compute the path costs for the above image (176 by 276 pixels) on a 1.6 GHz Pentium M laptop running Red Hat Linux 9, calling Java 1.4.1 from Matlab 6.5 (R13), and assuming the base-cost matrix is already computed.