Revision 30840 trunk/extensions/extGraph/src/org/gvsig/graph/solvers/ShortestPathSolverAStar.java
ShortestPathSolverAStar.java | ||
---|---|---|
81 | 81 |
int idStart = net.creaArcosVirtuales(fFrom); |
82 | 82 |
int idStop = net.creaArcosVirtuales(fTo); |
83 | 83 |
|
84 |
long tA1= System.currentTimeMillis(); |
|
84 | 85 |
double newCost = AStar(idStart, idStop); |
85 |
|
|
86 |
long tA2= System.currentTimeMillis(); |
|
87 |
System.out.println("T Astar = " + (tA2-tA1)); |
|
88 |
|
|
86 | 89 |
elCoste1 += newCost; |
87 | 90 |
fTo.setCost(elCoste1); |
88 | 91 |
|
89 | 92 |
if (newCost != Double.MAX_VALUE) { |
90 | 93 |
try { |
94 |
long t1 = System.currentTimeMillis(); |
|
91 | 95 |
populateRoute(fFrom, fTo, idStart, idStop); |
96 |
long t2 = System.currentTimeMillis(); |
|
97 |
System.out.println("T populateRoute=" + (t2-t1)); |
|
92 | 98 |
} catch (BaseException e) { |
93 | 99 |
e.printStackTrace(); |
94 | 100 |
throw new GraphException(e); |
Also available in: Unified diff