Du kannst nicht mehr als 25 Themen auswählen
Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
429 Zeilen
23 KiB
HTML
429 Zeilen
23 KiB
HTML
vor 8 Jahren
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||
|
<!-- NewPage -->
|
||
|
<html lang="en">
|
||
|
<head>
|
||
|
<!-- Generated by javadoc (version 1.7.0_79) on Sun Apr 03 00:28:30 PDT 2016 -->
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||
|
<title>AStarShortestPath (JGraphT : a free Java graph library)</title>
|
||
|
<meta name="date" content="2016-04-03">
|
||
|
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||
|
</head>
|
||
|
<body>
|
||
|
<script type="text/javascript"><!--
|
||
|
if (location.href.indexOf('is-external=true') == -1) {
|
||
|
parent.document.title="AStarShortestPath (JGraphT : a free Java graph library)";
|
||
|
}
|
||
|
//-->
|
||
|
</script>
|
||
|
<noscript>
|
||
|
<div>JavaScript is disabled on your browser.</div>
|
||
|
</noscript>
|
||
|
<!-- ========= START OF TOP NAVBAR ======= -->
|
||
|
<div class="topNav"><a name="navbar_top">
|
||
|
<!-- -->
|
||
|
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
|
||
|
<!-- -->
|
||
|
</a>
|
||
|
<ul class="navList" title="Navigation">
|
||
|
<li><a href="../../../overview-summary.html">Overview</a></li>
|
||
|
<li><a href="package-summary.html">Package</a></li>
|
||
|
<li class="navBarCell1Rev">Class</li>
|
||
|
<li><a href="class-use/AStarShortestPath.html">Use</a></li>
|
||
|
<li><a href="package-tree.html">Tree</a></li>
|
||
|
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||
|
<li><a href="../../../index-all.html">Index</a></li>
|
||
|
<li><a href="../../../help-doc.html">Help</a></li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div class="subNav">
|
||
|
<ul class="navList">
|
||
|
<li><a href="../../../org/jgrapht/alg/AllDirectedPaths.html" title="class in org.jgrapht.alg"><span class="strong">Prev Class</span></a></li>
|
||
|
<li><a href="../../../org/jgrapht/alg/BellmanFordShortestPath.html" title="class in org.jgrapht.alg"><span class="strong">Next Class</span></a></li>
|
||
|
</ul>
|
||
|
<ul class="navList">
|
||
|
<li><a href="../../../index.html?org/jgrapht/alg/AStarShortestPath.html" target="_top">Frames</a></li>
|
||
|
<li><a href="AStarShortestPath.html" target="_top">No Frames</a></li>
|
||
|
</ul>
|
||
|
<ul class="navList" id="allclasses_navbar_top">
|
||
|
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
|
||
|
</ul>
|
||
|
<div>
|
||
|
<script type="text/javascript"><!--
|
||
|
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||
|
if(window==top) {
|
||
|
allClassesLink.style.display = "block";
|
||
|
}
|
||
|
else {
|
||
|
allClassesLink.style.display = "none";
|
||
|
}
|
||
|
//-->
|
||
|
</script>
|
||
|
</div>
|
||
|
<div>
|
||
|
<ul class="subNavList">
|
||
|
<li>Summary: </li>
|
||
|
<li>Nested | </li>
|
||
|
<li><a href="#field_summary">Field</a> | </li>
|
||
|
<li><a href="#constructor_summary">Constr</a> | </li>
|
||
|
<li><a href="#method_summary">Method</a></li>
|
||
|
</ul>
|
||
|
<ul class="subNavList">
|
||
|
<li>Detail: </li>
|
||
|
<li><a href="#field_detail">Field</a> | </li>
|
||
|
<li><a href="#constructor_detail">Constr</a> | </li>
|
||
|
<li><a href="#method_detail">Method</a></li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<a name="skip-navbar_top">
|
||
|
<!-- -->
|
||
|
</a></div>
|
||
|
<!-- ========= END OF TOP NAVBAR ========= -->
|
||
|
<!-- ======== START OF CLASS DATA ======== -->
|
||
|
<div class="header">
|
||
|
<div class="subTitle">org.jgrapht.alg</div>
|
||
|
<h2 title="Class AStarShortestPath" class="title">Class AStarShortestPath<V,E></h2>
|
||
|
</div>
|
||
|
<div class="contentContainer">
|
||
|
<ul class="inheritance">
|
||
|
<li><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
|
||
|
<li>
|
||
|
<ul class="inheritance">
|
||
|
<li>org.jgrapht.alg.AStarShortestPath<V,E></li>
|
||
|
</ul>
|
||
|
</li>
|
||
|
</ul>
|
||
|
<div class="description">
|
||
|
<ul class="blockList">
|
||
|
<li class="blockList">
|
||
|
<hr>
|
||
|
<br>
|
||
|
<pre>public class <span class="strong">AStarShortestPath<V,E></span>
|
||
|
extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre>
|
||
|
<div class="block">An implementation of <a
|
||
|
href="http://en.wikipedia.org/wiki/A*_search_algorithm">A* shortest path
|
||
|
algorithm</a>. <a href="http://de.wikipedia.org/wiki/A*-Algorithmus">A*
|
||
|
shortest path algorithm german Wiki</a> . This class works for Directed and
|
||
|
Undirected graphs, as well as Multi-Graphs and Mixed-Graphs. It's ok if the
|
||
|
graph changes in between invocations of the <a href="../../../org/jgrapht/alg/AStarShortestPath.html#getShortestPath(V,%20V,%20org.jgrapht.alg.interfaces.AStarAdmissibleHeuristic)"><code>getShortestPath(Object,
|
||
|
Object, AStarAdmissibleHeuristic)</code></a> getShortestPath} method; no new instance
|
||
|
of this class has to be created. The heuristic is implemented using a
|
||
|
FibonacciHeap data structure to maintain the set of open nodes. However,
|
||
|
there still exist several approaches in literature to improve the performance
|
||
|
of this heuristic which one could consider to implement. Another issue to
|
||
|
take into consideration is the following: given to candidate nodes, i, j to
|
||
|
expand, where f(i)=f(j), g(i)>g(j), h(i)<g(j), f(i)=g(i)+h(i), g(i) is
|
||
|
the actual distance from the source node to i, h(i) is the estimated distance
|
||
|
from i to the target node. Usually a depth-first search is desired, so
|
||
|
ideally we would expand node i first. Using the FibonacciHeap, this is not
|
||
|
necessarily the case though. This could be improved in a later version.</div>
|
||
|
<dl><dt><span class="strong">Since:</span></dt>
|
||
|
<dd>Aug, 2015</dd>
|
||
|
<dt><span class="strong">Author:</span></dt>
|
||
|
<dd>Joris Kinable, Jon Robison, Thomas Breitbart</dd></dl>
|
||
|
</li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div class="summary">
|
||
|
<ul class="blockList">
|
||
|
<li class="blockList">
|
||
|
<!-- =========== FIELD SUMMARY =========== -->
|
||
|
<ul class="blockList">
|
||
|
<li class="blockList"><a name="field_summary">
|
||
|
<!-- -->
|
||
|
</a>
|
||
|
<h3>Field Summary</h3>
|
||
|
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
|
||
|
<caption><span>Fields</span><span class="tabEnd"> </span></caption>
|
||
|
<tr>
|
||
|
<th class="colFirst" scope="col">Modifier and Type</th>
|
||
|
<th class="colLast" scope="col">Field and Description</th>
|
||
|
</tr>
|
||
|
<tr class="altColor">
|
||
|
<td class="colFirst"><code>protected <a href="../../../org/jgrapht/alg/interfaces/AStarAdmissibleHeuristic.html" title="interface in org.jgrapht.alg.interfaces">AStarAdmissibleHeuristic</a><<a href="../../../org/jgrapht/alg/AStarShortestPath.html" title="type parameter in AStarShortestPath">V</a>></code></td>
|
||
|
<td class="colLast"><code><strong><a href="../../../org/jgrapht/alg/AStarShortestPath.html#admissibleHeuristic">admissibleHeuristic</a></strong></code> </td>
|
||
|
</tr>
|
||
|
<tr class="rowColor">
|
||
|
<td class="colFirst"><code>protected <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="../../../org/jgrapht/alg/AStarShortestPath.html" title="type parameter in AStarShortestPath">V</a>,<a href="../../../org/jgrapht/alg/AStarShortestPath.html" title="type parameter in AStarShortestPath">E</a>></code></td>
|
||
|
<td class="colLast"><code><strong><a href="../../../org/jgrapht/alg/AStarShortestPath.html#cameFrom">cameFrom</a></strong></code> </td>
|
||
|
</tr>
|
||
|
<tr class="altColor">
|
||
|
<td class="colFirst"><code>protected <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a><<a href="../../../org/jgrapht/alg/AStarShortestPath.html" title="type parameter in AStarShortestPath">V</a>></code></td>
|
||
|
<td class="colLast"><code><strong><a href="../../../org/jgrapht/alg/AStarShortestPath.html#closedList">closedList</a></strong></code> </td>
|
||
|
</tr>
|
||
|
<tr class="rowColor">
|
||
|
<td class="colFirst"><code>protected <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="../../../org/jgrapht/alg/AStarShortestPath.html" title="type parameter in AStarShortestPath">V</a>,<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Double.html?is-external=true" title="class or interface in java.lang">Double</a>></code></td>
|
||
|
<td class="colLast"><code><strong><a href="../../../org/jgrapht/alg/AStarShortestPath.html#gScoreMap">gScoreMap</a></strong></code> </td>
|
||
|
</tr>
|
||
|
<tr class="altColor">
|
||
|
<td class="colFirst"><code>protected int</code></td>
|
||
|
<td class="colLast"><code><strong><a href="../../../org/jgrapht/alg/AStarShortestPath.html#numberOfExpandedNodes">numberOfExpandedNodes</a></strong></code> </td>
|
||
|
</tr>
|
||
|
<tr class="rowColor">
|
||
|
<td class="colFirst"><code>protected <a href="../../../org/jgrapht/util/FibonacciHeap.html" title="class in org.jgrapht.util">FibonacciHeap</a><<a href="../../../org/jgrapht/alg/AStarShortestPath.html" title="type parameter in AStarShortestPath">V</a>></code></td>
|
||
|
<td class="colLast"><code><strong><a href="../../../org/jgrapht/alg/AStarShortestPath.html#openList">openList</a></strong></code> </td>
|
||
|
</tr>
|
||
|
<tr class="altColor">
|
||
|
<td class="colFirst"><code>protected <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="../../../org/jgrapht/alg/AStarShortestPath.html" title="type parameter in AStarShortestPath">V</a>,<a href="../../../org/jgrapht/util/FibonacciHeapNode.html" title="class in org.jgrapht.util">FibonacciHeapNode</a><<a href="../../../org/jgrapht/alg/AStarShortestPath.html" title="type parameter in AStarShortestPath">V</a>>></code></td>
|
||
|
<td class="colLast"><code><strong><a href="../../../org/jgrapht/alg/AStarShortestPath.html#vertexToHeapNodeMap">vertexToHeapNodeMap</a></strong></code> </td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</li>
|
||
|
</ul>
|
||
|
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||
|
<ul class="blockList">
|
||
|
<li class="blockList"><a name="constructor_summary">
|
||
|
<!-- -->
|
||
|
</a>
|
||
|
<h3>Constructor Summary</h3>
|
||
|
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
|
||
|
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
|
||
|
<tr>
|
||
|
<th class="colOne" scope="col">Constructor and Description</th>
|
||
|
</tr>
|
||
|
<tr class="altColor">
|
||
|
<td class="colOne"><code><strong><a href="../../../org/jgrapht/alg/AStarShortestPath.html#AStarShortestPath(org.jgrapht.Graph)">AStarShortestPath</a></strong>(<a href="../../../org/jgrapht/Graph.html" title="interface in org.jgrapht">Graph</a><<a href="../../../org/jgrapht/alg/AStarShortestPath.html" title="type parameter in AStarShortestPath">V</a>,<a href="../../../org/jgrapht/alg/AStarShortestPath.html" title="type parameter in AStarShortestPath">E</a>> graph)</code> </td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</li>
|
||
|
</ul>
|
||
|
<!-- ========== METHOD SUMMARY =========== -->
|
||
|
<ul class="blockList">
|
||
|
<li class="blockList"><a name="method_summary">
|
||
|
<!-- -->
|
||
|
</a>
|
||
|
<h3>Method Summary</h3>
|
||
|
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
|
||
|
<caption><span>Methods</span><span class="tabEnd"> </span></caption>
|
||
|
<tr>
|
||
|
<th class="colFirst" scope="col">Modifier and Type</th>
|
||
|
<th class="colLast" scope="col">Method and Description</th>
|
||
|
</tr>
|
||
|
<tr class="altColor">
|
||
|
<td class="colFirst"><code>int</code></td>
|
||
|
<td class="colLast"><code><strong><a href="../../../org/jgrapht/alg/AStarShortestPath.html#getNumberOfExpandedNodes()">getNumberOfExpandedNodes</a></strong>()</code>
|
||
|
<div class="block">Returns how many nodes have been expanded in the A* search procedure in
|
||
|
its last invocation.</div>
|
||
|
</td>
|
||
|
</tr>
|
||
|
<tr class="rowColor">
|
||
|
<td class="colFirst"><code><a href="../../../org/jgrapht/GraphPath.html" title="interface in org.jgrapht">GraphPath</a><<a href="../../../org/jgrapht/alg/AStarShortestPath.html" title="type parameter in AStarShortestPath">V</a>,<a href="../../../org/jgrapht/alg/AStarShortestPath.html" title="type parameter in AStarShortestPath">E</a>></code></td>
|
||
|
<td class="colLast"><code><strong><a href="../../../org/jgrapht/alg/AStarShortestPath.html#getShortestPath(V,%20V,%20org.jgrapht.alg.interfaces.AStarAdmissibleHeuristic)">getShortestPath</a></strong>(<a href="../../../org/jgrapht/alg/AStarShortestPath.html" title="type parameter in AStarShortestPath">V</a> sourceVertex,
|
||
|
<a href="../../../org/jgrapht/alg/AStarShortestPath.html" title="type parameter in AStarShortestPath">V</a> targetVertex,
|
||
|
<a href="../../../org/jgrapht/alg/interfaces/AStarAdmissibleHeuristic.html" title="interface in org.jgrapht.alg.interfaces">AStarAdmissibleHeuristic</a><<a href="../../../org/jgrapht/alg/AStarShortestPath.html" title="type parameter in AStarShortestPath">V</a>> admissibleHeuristic)</code>
|
||
|
<div class="block">Calculates (and returns) the shortest path from the sourceVertex to the
|
||
|
targetVertex.</div>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
<ul class="blockList">
|
||
|
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
|
||
|
<!-- -->
|
||
|
</a>
|
||
|
<h3>Methods inherited from class java.lang.<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
|
||
|
<code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long,%20int)" title="class or interface in java.lang">wait</a></code></li>
|
||
|
</ul>
|
||
|
</li>
|
||
|
</ul>
|
||
|
</li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div class="details">
|
||
|
<ul class="blockList">
|
||
|
<li class="blockList">
|
||
|
<!-- ============ FIELD DETAIL =========== -->
|
||
|
<ul class="blockList">
|
||
|
<li class="blockList"><a name="field_detail">
|
||
|
<!-- -->
|
||
|
</a>
|
||
|
<h3>Field Detail</h3>
|
||
|
<a name="openList">
|
||
|
<!-- -->
|
||
|
</a>
|
||
|
<ul class="blockList">
|
||
|
<li class="blockList">
|
||
|
<h4>openList</h4>
|
||
|
<pre>protected <a href="../../../org/jgrapht/util/FibonacciHeap.html" title="class in org.jgrapht.util">FibonacciHeap</a><<a href="../../../org/jgrapht/alg/AStarShortestPath.html" title="type parameter in AStarShortestPath">V</a>> openList</pre>
|
||
|
</li>
|
||
|
</ul>
|
||
|
<a name="vertexToHeapNodeMap">
|
||
|
<!-- -->
|
||
|
</a>
|
||
|
<ul class="blockList">
|
||
|
<li class="blockList">
|
||
|
<h4>vertexToHeapNodeMap</h4>
|
||
|
<pre>protected <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="../../../org/jgrapht/alg/AStarShortestPath.html" title="type parameter in AStarShortestPath">V</a>,<a href="../../../org/jgrapht/util/FibonacciHeapNode.html" title="class in org.jgrapht.util">FibonacciHeapNode</a><<a href="../../../org/jgrapht/alg/AStarShortestPath.html" title="type parameter in AStarShortestPath">V</a>>> vertexToHeapNodeMap</pre>
|
||
|
</li>
|
||
|
</ul>
|
||
|
<a name="closedList">
|
||
|
<!-- -->
|
||
|
</a>
|
||
|
<ul class="blockList">
|
||
|
<li class="blockList">
|
||
|
<h4>closedList</h4>
|
||
|
<pre>protected <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a><<a href="../../../org/jgrapht/alg/AStarShortestPath.html" title="type parameter in AStarShortestPath">V</a>> closedList</pre>
|
||
|
</li>
|
||
|
</ul>
|
||
|
<a name="gScoreMap">
|
||
|
<!-- -->
|
||
|
</a>
|
||
|
<ul class="blockList">
|
||
|
<li class="blockList">
|
||
|
<h4>gScoreMap</h4>
|
||
|
<pre>protected <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="../../../org/jgrapht/alg/AStarShortestPath.html" title="type parameter in AStarShortestPath">V</a>,<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Double.html?is-external=true" title="class or interface in java.lang">Double</a>> gScoreMap</pre>
|
||
|
</li>
|
||
|
</ul>
|
||
|
<a name="cameFrom">
|
||
|
<!-- -->
|
||
|
</a>
|
||
|
<ul class="blockList">
|
||
|
<li class="blockList">
|
||
|
<h4>cameFrom</h4>
|
||
|
<pre>protected <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="../../../org/jgrapht/alg/AStarShortestPath.html" title="type parameter in AStarShortestPath">V</a>,<a href="../../../org/jgrapht/alg/AStarShortestPath.html" title="type parameter in AStarShortestPath">E</a>> cameFrom</pre>
|
||
|
</li>
|
||
|
</ul>
|
||
|
<a name="admissibleHeuristic">
|
||
|
<!-- -->
|
||
|
</a>
|
||
|
<ul class="blockList">
|
||
|
<li class="blockList">
|
||
|
<h4>admissibleHeuristic</h4>
|
||
|
<pre>protected <a href="../../../org/jgrapht/alg/interfaces/AStarAdmissibleHeuristic.html" title="interface in org.jgrapht.alg.interfaces">AStarAdmissibleHeuristic</a><<a href="../../../org/jgrapht/alg/AStarShortestPath.html" title="type parameter in AStarShortestPath">V</a>> admissibleHeuristic</pre>
|
||
|
</li>
|
||
|
</ul>
|
||
|
<a name="numberOfExpandedNodes">
|
||
|
<!-- -->
|
||
|
</a>
|
||
|
<ul class="blockListLast">
|
||
|
<li class="blockList">
|
||
|
<h4>numberOfExpandedNodes</h4>
|
||
|
<pre>protected int numberOfExpandedNodes</pre>
|
||
|
</li>
|
||
|
</ul>
|
||
|
</li>
|
||
|
</ul>
|
||
|
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
||
|
<ul class="blockList">
|
||
|
<li class="blockList"><a name="constructor_detail">
|
||
|
<!-- -->
|
||
|
</a>
|
||
|
<h3>Constructor Detail</h3>
|
||
|
<a name="AStarShortestPath(org.jgrapht.Graph)">
|
||
|
<!-- -->
|
||
|
</a>
|
||
|
<ul class="blockListLast">
|
||
|
<li class="blockList">
|
||
|
<h4>AStarShortestPath</h4>
|
||
|
<pre>public AStarShortestPath(<a href="../../../org/jgrapht/Graph.html" title="interface in org.jgrapht">Graph</a><<a href="../../../org/jgrapht/alg/AStarShortestPath.html" title="type parameter in AStarShortestPath">V</a>,<a href="../../../org/jgrapht/alg/AStarShortestPath.html" title="type parameter in AStarShortestPath">E</a>> graph)</pre>
|
||
|
</li>
|
||
|
</ul>
|
||
|
</li>
|
||
|
</ul>
|
||
|
<!-- ============ METHOD DETAIL ========== -->
|
||
|
<ul class="blockList">
|
||
|
<li class="blockList"><a name="method_detail">
|
||
|
<!-- -->
|
||
|
</a>
|
||
|
<h3>Method Detail</h3>
|
||
|
<a name="getShortestPath(java.lang.Object,java.lang.Object,org.jgrapht.alg.interfaces.AStarAdmissibleHeuristic)">
|
||
|
<!-- -->
|
||
|
</a><a name="getShortestPath(V, V, org.jgrapht.alg.interfaces.AStarAdmissibleHeuristic)">
|
||
|
<!-- -->
|
||
|
</a>
|
||
|
<ul class="blockList">
|
||
|
<li class="blockList">
|
||
|
<h4>getShortestPath</h4>
|
||
|
<pre>public <a href="../../../org/jgrapht/GraphPath.html" title="interface in org.jgrapht">GraphPath</a><<a href="../../../org/jgrapht/alg/AStarShortestPath.html" title="type parameter in AStarShortestPath">V</a>,<a href="../../../org/jgrapht/alg/AStarShortestPath.html" title="type parameter in AStarShortestPath">E</a>> getShortestPath(<a href="../../../org/jgrapht/alg/AStarShortestPath.html" title="type parameter in AStarShortestPath">V</a> sourceVertex,
|
||
|
<a href="../../../org/jgrapht/alg/AStarShortestPath.html" title="type parameter in AStarShortestPath">V</a> targetVertex,
|
||
|
<a href="../../../org/jgrapht/alg/interfaces/AStarAdmissibleHeuristic.html" title="interface in org.jgrapht.alg.interfaces">AStarAdmissibleHeuristic</a><<a href="../../../org/jgrapht/alg/AStarShortestPath.html" title="type parameter in AStarShortestPath">V</a>> admissibleHeuristic)</pre>
|
||
|
<div class="block">Calculates (and returns) the shortest path from the sourceVertex to the
|
||
|
targetVertex. Note: each time you invoke this method, the path gets
|
||
|
recomputed.</div>
|
||
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>sourceVertex</code> - source vertex</dd><dd><code>targetVertex</code> - target vertex</dd><dd><code>admissibleHeuristic</code> - admissible heuristic which estimates the
|
||
|
distance from a node to the target node.</dd>
|
||
|
<dt><span class="strong">Returns:</span></dt><dd>the shortest path from sourceVertex to targetVertex</dd></dl>
|
||
|
</li>
|
||
|
</ul>
|
||
|
<a name="getNumberOfExpandedNodes()">
|
||
|
<!-- -->
|
||
|
</a>
|
||
|
<ul class="blockListLast">
|
||
|
<li class="blockList">
|
||
|
<h4>getNumberOfExpandedNodes</h4>
|
||
|
<pre>public int getNumberOfExpandedNodes()</pre>
|
||
|
<div class="block">Returns how many nodes have been expanded in the A* search procedure in
|
||
|
its last invocation. A node is expanded if it is removed from the open
|
||
|
list.</div>
|
||
|
<dl><dt><span class="strong">Returns:</span></dt><dd>number of expanded nodes</dd></dl>
|
||
|
</li>
|
||
|
</ul>
|
||
|
</li>
|
||
|
</ul>
|
||
|
</li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
</div>
|
||
|
<!-- ========= END OF CLASS DATA ========= -->
|
||
|
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||
|
<div class="bottomNav"><a name="navbar_bottom">
|
||
|
<!-- -->
|
||
|
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
|
||
|
<!-- -->
|
||
|
</a>
|
||
|
<ul class="navList" title="Navigation">
|
||
|
<li><a href="../../../overview-summary.html">Overview</a></li>
|
||
|
<li><a href="package-summary.html">Package</a></li>
|
||
|
<li class="navBarCell1Rev">Class</li>
|
||
|
<li><a href="class-use/AStarShortestPath.html">Use</a></li>
|
||
|
<li><a href="package-tree.html">Tree</a></li>
|
||
|
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||
|
<li><a href="../../../index-all.html">Index</a></li>
|
||
|
<li><a href="../../../help-doc.html">Help</a></li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div class="subNav">
|
||
|
<ul class="navList">
|
||
|
<li><a href="../../../org/jgrapht/alg/AllDirectedPaths.html" title="class in org.jgrapht.alg"><span class="strong">Prev Class</span></a></li>
|
||
|
<li><a href="../../../org/jgrapht/alg/BellmanFordShortestPath.html" title="class in org.jgrapht.alg"><span class="strong">Next Class</span></a></li>
|
||
|
</ul>
|
||
|
<ul class="navList">
|
||
|
<li><a href="../../../index.html?org/jgrapht/alg/AStarShortestPath.html" target="_top">Frames</a></li>
|
||
|
<li><a href="AStarShortestPath.html" target="_top">No Frames</a></li>
|
||
|
</ul>
|
||
|
<ul class="navList" id="allclasses_navbar_bottom">
|
||
|
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
|
||
|
</ul>
|
||
|
<div>
|
||
|
<script type="text/javascript"><!--
|
||
|
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||
|
if(window==top) {
|
||
|
allClassesLink.style.display = "block";
|
||
|
}
|
||
|
else {
|
||
|
allClassesLink.style.display = "none";
|
||
|
}
|
||
|
//-->
|
||
|
</script>
|
||
|
</div>
|
||
|
<div>
|
||
|
<ul class="subNavList">
|
||
|
<li>Summary: </li>
|
||
|
<li>Nested | </li>
|
||
|
<li><a href="#field_summary">Field</a> | </li>
|
||
|
<li><a href="#constructor_summary">Constr</a> | </li>
|
||
|
<li><a href="#method_summary">Method</a></li>
|
||
|
</ul>
|
||
|
<ul class="subNavList">
|
||
|
<li>Detail: </li>
|
||
|
<li><a href="#field_detail">Field</a> | </li>
|
||
|
<li><a href="#constructor_detail">Constr</a> | </li>
|
||
|
<li><a href="#method_detail">Method</a></li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<a name="skip-navbar_bottom">
|
||
|
<!-- -->
|
||
|
</a></div>
|
||
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||
|
<p class="legalCopy"><small>Copyright © 2016. All rights reserved.</small></p>
|
||
|
</body>
|
||
|
</html>
|