Author: simonetripodi
Date: Tue Jun 21 20:46:40 2011
New Revision: 1138177
URL: http://svn.apache.org/viewvc?rev=1138177&view=rev
Log:
modified the A* algorithm signature, it accepts the h(x) instance
Modified:
commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/shortestpath/AStar.java
Modified:
commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/shortestpath/AStar.java
URL:
http://svn.apache.org/viewvc/commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/shortestpath/AStar.java?rev=1138177&r1=1138176&r2=1138177&view=diff
==============================================================================
---
commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/shortestpath/AStar.java
(original)
+++
commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/shortestpath/AStar.java
Tue Jun 21 20:46:40 2011
@@ -46,11 +46,13 @@ public final class AStar
* @param graph the Graph which shortest path from {@code source} to
{@code target} has to be found
* @param source the shortest path source Vertex
* @param target the shortest path target Vertex
+ * @param heuristic the <i>h(x)</i> function
* @return a path which describes the shortest path, if any, otherwise a
{@link PathNotFoundException} will be thrown
*/
public static <V extends Vertex, WE extends WeightedEdge<V>>
WeightedPath<V, WE> findShortestPath( WeightedGraph<V, WE> graph,
V source,
-
V target )
+
V target,
+
Heuristic<V> heuristic )
{
return null;
}