<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true"title="class or interface in java.lang">java.lang.Object</A>
<IMGSRC="../../../resources/inherit.gif"ALT="extended by "><B>com.mxgraph.analysis.mxTraversal</B>
</PRE>
<HR>
<DL>
<DT><PRE>public class <B>mxTraversal</B><DT>extends <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true"title="class or interface in java.lang">Object</A></DL>
</PRE>
<P>
Implements a collection of utility methods for traversing the
graph structure. This does not include tree traversal methods.
<CODE>static <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/util/List.html?is-external=true"title="class or interface in java.util">List</A><<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/util/Map.html?is-external=true"title="class or interface in java.util">Map</A><<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true"title="class or interface in java.lang">Object</A>,<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true"title="class or interface in java.lang">Object</A>>></CODE></FONT></TD>
<TD><CODE><B><AHREF="../../../com/mxgraph/analysis/mxTraversal.html#bellmanFord(com.mxgraph.analysis.mxAnalysisGraph, java.lang.Object)">bellmanFord</A></B>(<AHREF="../../../com/mxgraph/analysis/mxAnalysisGraph.html"title="class in com.mxgraph.analysis">mxAnalysisGraph</A> aGraph,
<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true"title="class or interface in java.lang">Object</A> startVertex)</CODE>
<BR>
Implements the Bellman-Ford shortest path from startVertex to all vertices.</TD>
<TD><CODE><B><AHREF="../../../com/mxgraph/analysis/mxTraversal.html#bfs(com.mxgraph.analysis.mxAnalysisGraph, java.lang.Object, com.mxgraph.view.mxGraph.mxICellVisitor)">bfs</A></B>(<AHREF="../../../com/mxgraph/analysis/mxAnalysisGraph.html"title="class in com.mxgraph.analysis">mxAnalysisGraph</A> aGraph,
<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true"title="class or interface in java.lang">Object</A> startVertex,
<AHREF="../../../com/mxgraph/view/mxGraph.mxICellVisitor.html"title="interface in com.mxgraph.view">mxGraph.mxICellVisitor</A> visitor)</CODE>
<TD><CODE><B><AHREF="../../../com/mxgraph/analysis/mxTraversal.html#dfs(com.mxgraph.analysis.mxAnalysisGraph, java.lang.Object, com.mxgraph.view.mxGraph.mxICellVisitor)">dfs</A></B>(<AHREF="../../../com/mxgraph/analysis/mxAnalysisGraph.html"title="class in com.mxgraph.analysis">mxAnalysisGraph</A> aGraph,
<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true"title="class or interface in java.lang">Object</A> startVertex,
<AHREF="../../../com/mxgraph/view/mxGraph.mxICellVisitor.html"title="interface in com.mxgraph.view">mxGraph.mxICellVisitor</A> visitor)</CODE>
<TD><CODE><B><AHREF="../../../com/mxgraph/analysis/mxTraversal.html#dijkstra(com.mxgraph.analysis.mxAnalysisGraph, java.lang.Object, java.lang.Object, com.mxgraph.view.mxGraph.mxICellVisitor)">dijkstra</A></B>(<AHREF="../../../com/mxgraph/analysis/mxAnalysisGraph.html"title="class in com.mxgraph.analysis">mxAnalysisGraph</A> aGraph,
<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true"title="class or interface in java.lang">Object</A> startVertex,
<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true"title="class or interface in java.lang">Object</A> endVertex,
<AHREF="../../../com/mxgraph/view/mxGraph.mxICellVisitor.html"title="interface in com.mxgraph.view">mxGraph.mxICellVisitor</A> visitor)</CODE>
<BR>
Implements the Dijkstra's shortest path from startVertex to endVertex.</TD>
<CODE>static <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/util/ArrayList.html?is-external=true"title="class or interface in java.util">ArrayList</A><<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true"title="class or interface in java.lang">Object</A>[][]></CODE></FONT></TD>
<TD><CODE><B><AHREF="../../../com/mxgraph/analysis/mxTraversal.html#floydRoyWarshall(com.mxgraph.analysis.mxAnalysisGraph)">floydRoyWarshall</A></B>(<AHREF="../../../com/mxgraph/analysis/mxAnalysisGraph.html"title="class in com.mxgraph.analysis">mxAnalysisGraph</A> aGraph)</CODE>
<BR>
Implements the Floyd-Roy-Warshall (aka WFI) shortest path algorithm between all vertices.</TD>
<CODE>static <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true"title="class or interface in java.lang">Object</A>[]</CODE></FONT></TD>
<TD><CODE><B><AHREF="../../../com/mxgraph/analysis/mxTraversal.html#getWFIPath(com.mxgraph.analysis.mxAnalysisGraph, java.util.ArrayList, java.lang.Object, java.lang.Object)">getWFIPath</A></B>(<AHREF="../../../com/mxgraph/analysis/mxAnalysisGraph.html"title="class in com.mxgraph.analysis">mxAnalysisGraph</A> aGraph,
<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/util/ArrayList.html?is-external=true"title="class or interface in java.util">ArrayList</A><<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true"title="class or interface in java.lang">Object</A>[][]> FWIresult,
<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true"title="class or interface in java.lang">Object</A> startVertex,
<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true"title="class or interface in java.lang">Object</A> targetVertex)</CODE>
<BR>
This method helps the user to get the desired data from the result of the Floyd-Roy-Warshall algorithm.</TD>
<THALIGN="left"><B>Methods inherited from class java.lang.<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true"title="class or interface in java.lang">Object</A></B></TH>
</TR>
<TRBGCOLOR="white"CLASS="TableRowColor">
<TD><CODE><AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#clone()"title="class or interface in java.lang">clone</A>, <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)"title="class or interface in java.lang">equals</A>, <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#finalize()"title="class or interface in java.lang">finalize</A>, <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#getClass()"title="class or interface in java.lang">getClass</A>, <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#hashCode()"title="class or interface in java.lang">hashCode</A>, <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#notify()"title="class or interface in java.lang">notify</A>, <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#notifyAll()"title="class or interface in java.lang">notifyAll</A>, <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#toString()"title="class or interface in java.lang">toString</A>, <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait()"title="class or interface in java.lang">wait</A>, <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait(long)"title="class or interface in java.lang">wait</A>, <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait(long, int)"title="class or interface in java.lang">wait</A></CODE></TD>
public static void <B>dfs</B>(<AHREF="../../../com/mxgraph/analysis/mxAnalysisGraph.html"title="class in com.mxgraph.analysis">mxAnalysisGraph</A> aGraph,
<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true"title="class or interface in java.lang">Object</A> startVertex,
<AHREF="../../../com/mxgraph/view/mxGraph.mxICellVisitor.html"title="interface in com.mxgraph.view">mxGraph.mxICellVisitor</A> visitor)</PRE>
public static void <B>bfs</B>(<AHREF="../../../com/mxgraph/analysis/mxAnalysisGraph.html"title="class in com.mxgraph.analysis">mxAnalysisGraph</A> aGraph,
<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true"title="class or interface in java.lang">Object</A> startVertex,
<AHREF="../../../com/mxgraph/view/mxGraph.mxICellVisitor.html"title="interface in com.mxgraph.view">mxGraph.mxICellVisitor</A> visitor)</PRE>
public static void <B>dijkstra</B>(<AHREF="../../../com/mxgraph/analysis/mxAnalysisGraph.html"title="class in com.mxgraph.analysis">mxAnalysisGraph</A> aGraph,
<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true"title="class or interface in java.lang">Object</A> startVertex,
<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true"title="class or interface in java.lang">Object</A> endVertex,
<AHREF="../../../com/mxgraph/view/mxGraph.mxICellVisitor.html"title="interface in com.mxgraph.view">mxGraph.mxICellVisitor</A> visitor)
throws <AHREF="../../../com/mxgraph/analysis/StructuralException.html"title="class in com.mxgraph.analysis">StructuralException</A></PRE>
<DL>
<DD>Implements the Dijkstra's shortest path from startVertex to endVertex.
Process on the cell is performing by the visitor class passed in.
The visitor has access to the current cell and the edge traversed to
find this cell. Every cell is processed once only.
<pre>
mxTraversal.dijkstra(analysisGraph, startVertex, endVertex, new mxICellVisitor()
<DD><CODE><AHREF="../../../com/mxgraph/analysis/StructuralException.html"title="class in com.mxgraph.analysis">StructuralException</A></CODE> - - The current Dijkstra algorithm only works for connected graphs</DL>
public static <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/util/List.html?is-external=true"title="class or interface in java.util">List</A><<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/util/Map.html?is-external=true"title="class or interface in java.util">Map</A><<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true"title="class or interface in java.lang">Object</A>,<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true"title="class or interface in java.lang">Object</A>>><B>bellmanFord</B>(<AHREF="../../../com/mxgraph/analysis/mxAnalysisGraph.html"title="class in com.mxgraph.analysis">mxAnalysisGraph</A> aGraph,
<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true"title="class or interface in java.lang">Object</A> startVertex)
throws <AHREF="../../../com/mxgraph/analysis/StructuralException.html"title="class in com.mxgraph.analysis">StructuralException</A></PRE>
<DL>
<DD>Implements the Bellman-Ford shortest path from startVertex to all vertices.
<DT><B>Returns:</B><DD>a List where List(0) is the distance map and List(1) is the parent map. See the example in GraphConfigDialog.java
<DT><B>Throws:</B>
<DD><CODE><AHREF="../../../com/mxgraph/analysis/StructuralException.html"title="class in com.mxgraph.analysis">StructuralException</A></CODE> - - The Bellman-Ford algorithm only works for graphs without negative cycles</DL>
public static <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/util/ArrayList.html?is-external=true"title="class or interface in java.util">ArrayList</A><<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true"title="class or interface in java.lang">Object</A>[][]><B>floydRoyWarshall</B>(<AHREF="../../../com/mxgraph/analysis/mxAnalysisGraph.html"title="class in com.mxgraph.analysis">mxAnalysisGraph</A> aGraph)
throws <AHREF="../../../com/mxgraph/analysis/StructuralException.html"title="class in com.mxgraph.analysis">StructuralException</A></PRE>
<DL>
<DD>Implements the Floyd-Roy-Warshall (aka WFI) shortest path algorithm between all vertices.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>aGraph</CODE> -
<DT><B>Returns:</B><DD>an ArrayList where ArrayList(0) is the distance map and List(1) is the path map. See the example in GraphConfigDialog.java
<DT><B>Throws:</B>
<DD><CODE><AHREF="../../../com/mxgraph/analysis/StructuralException.html"title="class in com.mxgraph.analysis">StructuralException</A></CODE> - - The Floyd-Roy-Warshall algorithm only works for graphs without negative cycles</DL>
public static <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true"title="class or interface in java.lang">Object</A>[] <B>getWFIPath</B>(<AHREF="../../../com/mxgraph/analysis/mxAnalysisGraph.html"title="class in com.mxgraph.analysis">mxAnalysisGraph</A> aGraph,
<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/util/ArrayList.html?is-external=true"title="class or interface in java.util">ArrayList</A><<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true"title="class or interface in java.lang">Object</A>[][]> FWIresult,
<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true"title="class or interface in java.lang">Object</A> startVertex,
<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true"title="class or interface in java.lang">Object</A> targetVertex)
throws <AHREF="../../../com/mxgraph/analysis/StructuralException.html"title="class in com.mxgraph.analysis">StructuralException</A></PRE>
<DL>
<DD>This method helps the user to get the desired data from the result of the Floyd-Roy-Warshall algorithm.
<DT><B>Parameters:</B><DD><CODE>aGraph</CODE> - <DD><CODE>FWIresult</CODE> - - the result of the Floyd-Roy-Warhall algorithm<DD><CODE>startVertex</CODE> - <DD><CODE>targetVertex</CODE> -
<DT><B>Returns:</B><DD>returns the shortest path from <b>startVertex</b> to <b>endVertex</b>
<DT><B>Throws:</B>
<DD><CODE><AHREF="../../../com/mxgraph/analysis/StructuralException.html"title="class in com.mxgraph.analysis">StructuralException</A></CODE> - - The Floyd-Roy-Warshall algorithm only works for graphs without negative cycles</DL>