<li><ahref="../../../com/mxgraph/analysis/mxFibonacciHeap.Node.html"title="class in com.mxgraph.analysis"><spanclass="strong">Prev Class</span></a></li>
<li><ahref="../../../com/mxgraph/analysis/mxGraphGenerator.html"title="class in com.mxgraph.analysis"><spanclass="strong">Next Class</span></a></li>
<li><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></li>
<li>
<ulclass="inheritance">
<li>com.mxgraph.analysis.mxGraphAnalysis</li>
</ul>
</li>
</ul>
<divclass="description">
<ulclass="blockList">
<liclass="blockList">
<hr>
<br>
<pre>public class <spanclass="strong">mxGraphAnalysis</span>
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></pre>
<divclass="block">A singleton class that provides algorithms for graphs. Assume these
<dl><dt><spanclass="strong">See Also:</span></dt><dd><ahref="../../../com/mxgraph/analysis/mxICostFunction.html"title="interface in com.mxgraph.analysis"><code>mxICostFunction</code></a></dd></dl>
<thclass="colFirst"scope="col">Modifier and Type</th>
<thclass="colLast"scope="col">Field and Description</th>
</tr>
<trclass="altColor">
<tdclass="colFirst"><code>protected static <ahref="../../../com/mxgraph/analysis/mxGraphAnalysis.html"title="class in com.mxgraph.analysis">mxGraphAnalysis</a></code></td>
<thclass="colFirst"scope="col">Modifier and Type</th>
<thclass="colLast"scope="col">Method and Description</th>
</tr>
<trclass="altColor">
<tdclass="colFirst"><code>protected <ahref="../../../com/mxgraph/analysis/mxFibonacciHeap.html"title="class in com.mxgraph.analysis">mxFibonacciHeap</a></code></td>
<divclass="block">Hook for subclassers to provide a custom fibonacci heap.</div>
</td>
</tr>
<trclass="rowColor">
<tdclass="colFirst"><code>protected <ahref="../../../com/mxgraph/analysis/mxUnionFind.html"title="class in com.mxgraph.analysis">mxUnionFind</a></code></td>
<tdclass="colLast"><code><strong><ahref="../../../com/mxgraph/analysis/mxGraphAnalysis.html#createUnionFind(java.lang.Object[])">createUnionFind</a></strong>(<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>[] v)</code>
<divclass="block">Hook for subclassers to provide a custom union find structure.</div>
</td>
</tr>
<trclass="altColor">
<tdclass="colFirst"><code><ahref="../../../com/mxgraph/analysis/mxUnionFind.html"title="class in com.mxgraph.analysis">mxUnionFind</a></code></td>
<tdclass="colLast"><code><strong><ahref="../../../com/mxgraph/analysis/mxGraphAnalysis.html#getConnectionComponents(com.mxgraph.view.mxGraph, java.lang.Object[], java.lang.Object[])">getConnectionComponents</a></strong>(<ahref="../../../com/mxgraph/view/mxGraph.html"title="class in com.mxgraph.view">mxGraph</a> graph,
<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>[] v,
<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>[] e)</code>
<divclass="block">Returns a union find structure representing the connection components of
G=(E,V).</div>
</td>
</tr>
<trclass="rowColor">
<tdclass="colFirst"><code>static <ahref="../../../com/mxgraph/analysis/mxGraphAnalysis.html"title="class in com.mxgraph.analysis">mxGraphAnalysis</a></code></td>
<tdclass="colFirst"><code><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></td>
<tdclass="colLast"><code><strong><ahref="../../../com/mxgraph/analysis/mxGraphAnalysis.html#getMinimumSpanningTree(com.mxgraph.view.mxGraph, java.lang.Object[], com.mxgraph.analysis.mxICostFunction, boolean)">getMinimumSpanningTree</a></strong>(<ahref="../../../com/mxgraph/view/mxGraph.html"title="class in com.mxgraph.view">mxGraph</a> graph,
<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>[] v,
<ahref="../../../com/mxgraph/analysis/mxICostFunction.html"title="interface in com.mxgraph.analysis">mxICostFunction</a> cf,
boolean directed)</code>
<divclass="block">Returns the minimum spanning tree (MST) for the graph defined by G=(E,V).</div>
</td>
</tr>
<trclass="rowColor">
<tdclass="colFirst"><code><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></td>
<tdclass="colLast"><code><strong><ahref="../../../com/mxgraph/analysis/mxGraphAnalysis.html#getMinimumSpanningTree(com.mxgraph.view.mxGraph, java.lang.Object[], java.lang.Object[], com.mxgraph.analysis.mxICostFunction)">getMinimumSpanningTree</a></strong>(<ahref="../../../com/mxgraph/view/mxGraph.html"title="class in com.mxgraph.view">mxGraph</a> graph,
<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>[] v,
<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>[] e,
<ahref="../../../com/mxgraph/analysis/mxICostFunction.html"title="interface in com.mxgraph.analysis">mxICostFunction</a> cf)</code>
<divclass="block">Returns the minimum spanning tree (MST) for the graph defined by G=(E,V).</div>
</td>
</tr>
<trclass="altColor">
<tdclass="colFirst"><code><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></td>
<tdclass="colLast"><code><strong><ahref="../../../com/mxgraph/analysis/mxGraphAnalysis.html#getShortestPath(com.mxgraph.view.mxGraph, java.lang.Object, java.lang.Object, com.mxgraph.analysis.mxICostFunction, int, boolean)">getShortestPath</a></strong>(<ahref="../../../com/mxgraph/view/mxGraph.html"title="class in com.mxgraph.view">mxGraph</a> graph,
<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> from,
<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> to,
<ahref="../../../com/mxgraph/analysis/mxICostFunction.html"title="interface in com.mxgraph.analysis">mxICostFunction</a> cf,
int steps,
boolean directed)</code>
<divclass="block">Returns the shortest path between two cells or their descendants
represented as an array of edges in order of traversal.</div>
</td>
</tr>
<trclass="rowColor">
<tdclass="colFirst"><code>static void</code></td>
<tdclass="colLast"><code><strong><ahref="../../../com/mxgraph/analysis/mxGraphAnalysis.html#setInstance(com.mxgraph.analysis.mxGraphAnalysis)">setInstance</a></strong>(<ahref="../../../com/mxgraph/analysis/mxGraphAnalysis.html"title="class in com.mxgraph.analysis">mxGraphAnalysis</a> instance)</code>
<divclass="block">Sets the shared instance of this class.</div>
</td>
</tr>
<trclass="altColor">
<tdclass="colFirst"><code><ahref="../../../com/mxgraph/view/mxCellState.html"title="class in com.mxgraph.view">mxCellState</a>[]</code></td>
<tdclass="colLast"><code><strong><ahref="../../../com/mxgraph/analysis/mxGraphAnalysis.html#sort(com.mxgraph.view.mxCellState[], com.mxgraph.analysis.mxICostFunction)">sort</a></strong>(<ahref="../../../com/mxgraph/view/mxCellState.html"title="class in com.mxgraph.view">mxCellState</a>[] states,
<ahref="../../../com/mxgraph/analysis/mxICostFunction.html"title="interface in com.mxgraph.analysis">mxICostFunction</a> cf)</code>
<divclass="block">Returns a sorted set for <code>cells</code> with respect to
<code>cf</code>.</div>
</td>
</tr>
<trclass="rowColor">
<tdclass="colFirst"><code>double</code></td>
<tdclass="colLast"><code><strong><ahref="../../../com/mxgraph/analysis/mxGraphAnalysis.html#sum(com.mxgraph.view.mxCellState[], com.mxgraph.analysis.mxICostFunction)">sum</a></strong>(<ahref="../../../com/mxgraph/view/mxCellState.html"title="class in com.mxgraph.view">mxCellState</a>[] states,
<ahref="../../../com/mxgraph/analysis/mxICostFunction.html"title="interface in com.mxgraph.analysis">mxICostFunction</a> cf)</code>
<divclass="block">Returns the sum of all cost for <code>cells</code> with respect to
<h3>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></h3>
<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></li>
<pre>protected static <ahref="../../../com/mxgraph/analysis/mxGraphAnalysis.html"title="class in com.mxgraph.analysis">mxGraphAnalysis</a> instance</pre>
<divclass="block">Holds the shared instance of this class.</div>
<pre>public static <ahref="../../../com/mxgraph/analysis/mxGraphAnalysis.html"title="class in com.mxgraph.analysis">mxGraphAnalysis</a> getInstance()</pre>
<dl><dt><spanclass="strong">Returns:</span></dt><dd>Returns the sharedInstance.</dd></dl>
<pre>public static void setInstance(<ahref="../../../com/mxgraph/analysis/mxGraphAnalysis.html"title="class in com.mxgraph.analysis">mxGraphAnalysis</a> instance)</pre>
<divclass="block">Sets the shared instance of this class.</div>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>instance</code> - The instance to set.</dd></dl>
<pre>public <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>[] getShortestPath(<ahref="../../../com/mxgraph/view/mxGraph.html"title="class in com.mxgraph.view">mxGraph</a> graph,
<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> from,
<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> to,
<ahref="../../../com/mxgraph/analysis/mxICostFunction.html"title="interface in com.mxgraph.analysis">mxICostFunction</a> cf,
int steps,
boolean directed)</pre>
<divclass="block">Returns the shortest path between two cells or their descendants
This implementation is based on the Dijkstra algorithm.</div>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>graph</code> - The object that defines the graph structure</dd><dd><code>from</code> - The source cell.</dd><dd><code>to</code> - The target cell (aka sink).</dd><dd><code>cf</code> - The cost function that defines the edge length.</dd><dd><code>steps</code> - The maximum number of edges to traverse.</dd><dd><code>directed</code> - If edge directions should be taken into account.</dd>
<dt><spanclass="strong">Returns:</span></dt><dd>Returns the shortest path as an alternating array of vertices
<pre>public <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>[] getMinimumSpanningTree(<ahref="../../../com/mxgraph/view/mxGraph.html"title="class in com.mxgraph.view">mxGraph</a> graph,
<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>[] v,
<ahref="../../../com/mxgraph/analysis/mxICostFunction.html"title="interface in com.mxgraph.analysis">mxICostFunction</a> cf,
boolean directed)</pre>
<divclass="block">Returns the minimum spanning tree (MST) for the graph defined by G=(E,V).
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>graph</code> - the object that describes the graph</dd><dd><code>v</code> - the vertices of the graph</dd><dd><code>cf</code> - the cost function that defines the edge length</dd>
<dt><spanclass="strong">Returns:</span></dt><dd>Returns the MST as an array of edges</dd><dt><spanclass="strong">See Also:</span></dt><dd><ahref="../../../com/mxgraph/analysis/mxGraphAnalysis.html#createPriorityQueue()"><code>createPriorityQueue()</code></a></dd></dl>
<pre>public <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>[] getMinimumSpanningTree(<ahref="../../../com/mxgraph/view/mxGraph.html"title="class in com.mxgraph.view">mxGraph</a> graph,
<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>[] v,
<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>[] e,
<ahref="../../../com/mxgraph/analysis/mxICostFunction.html"title="interface in com.mxgraph.analysis">mxICostFunction</a> cf)</pre>
<divclass="block">Returns the minimum spanning tree (MST) for the graph defined by G=(E,V).
yielding no more than O(|E|log|V|) steps. For a faster implementatin</div>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>graph</code> - The object that contains the graph.</dd><dd><code>v</code> - The vertices of the graph.</dd><dd><code>e</code> - The edges of the graph.</dd><dd><code>cf</code> - The cost function that defines the edge length.</dd>
<dt><spanclass="strong">Returns:</span></dt><dd>Returns the MST as an array of edges.</dd><dt><spanclass="strong">See Also:</span></dt><dd><ahref="../../../com/mxgraph/analysis/mxGraphAnalysis.html#getMinimumSpanningTree(com.mxgraph.view.mxGraph, java.lang.Object[], com.mxgraph.analysis.mxICostFunction, boolean)"><code>getMinimumSpanningTree(mxGraph, Object[], mxICostFunction,
<pre>public <ahref="../../../com/mxgraph/analysis/mxUnionFind.html"title="class in com.mxgraph.analysis">mxUnionFind</a> getConnectionComponents(<ahref="../../../com/mxgraph/view/mxGraph.html"title="class in com.mxgraph.view">mxGraph</a> graph,
<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>[] v,
<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>[] e)</pre>
<divclass="block">Returns a union find structure representing the connection components of
G=(E,V).</div>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>graph</code> - The object that contains the graph.</dd><dd><code>v</code> - The vertices of the graph.</dd><dd><code>e</code> - The edges of the graph.</dd>
<dt><spanclass="strong">Returns:</span></dt><dd>Returns the connection components in G=(E,V)</dd><dt><spanclass="strong">See Also:</span></dt><dd><ahref="../../../com/mxgraph/analysis/mxGraphAnalysis.html#createUnionFind(java.lang.Object[])"><code>createUnionFind(Object[])</code></a></dd></dl>
<pre>public <ahref="../../../com/mxgraph/view/mxCellState.html"title="class in com.mxgraph.view">mxCellState</a>[] sort(<ahref="../../../com/mxgraph/view/mxCellState.html"title="class in com.mxgraph.view">mxCellState</a>[] states,
<ahref="../../../com/mxgraph/analysis/mxICostFunction.html"title="interface in com.mxgraph.analysis">mxICostFunction</a> cf)</pre>
<divclass="block">Returns a sorted set for <code>cells</code> with respect to
<code>cf</code>.</div>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>states</code> - the cell states to sort</dd><dd><code>cf</code> - the cost function that defines the order</dd>
<dt><spanclass="strong">Returns:</span></dt><dd>Returns an ordered set of <code>cells</code> wrt.
<pre>public double sum(<ahref="../../../com/mxgraph/view/mxCellState.html"title="class in com.mxgraph.view">mxCellState</a>[] states,
<ahref="../../../com/mxgraph/analysis/mxICostFunction.html"title="interface in com.mxgraph.analysis">mxICostFunction</a> cf)</pre>
<divclass="block">Returns the sum of all cost for <code>cells</code> with respect to
<code>cf</code>.</div>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>states</code> - the cell states to use for the sum</dd><dd><code>cf</code> - the cost function that defines the costs</dd>
<dt><spanclass="strong">Returns:</span></dt><dd>Returns the sum of all cell cost</dd></dl>
</li>
</ul>
<aname="createUnionFind(java.lang.Object[])">
<!---->
</a>
<ulclass="blockList">
<liclass="blockList">
<h4>createUnionFind</h4>
<pre>protected <ahref="../../../com/mxgraph/analysis/mxUnionFind.html"title="class in com.mxgraph.analysis">mxUnionFind</a> createUnionFind(<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>[] v)</pre>
<divclass="block">Hook for subclassers to provide a custom union find structure.</div>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>v</code> - the array of all elements</dd>
<dt><spanclass="strong">Returns:</span></dt><dd>Returns a union find structure for <code>v</code></dd></dl>
</li>
</ul>
<aname="createPriorityQueue()">
<!---->
</a>
<ulclass="blockListLast">
<liclass="blockList">
<h4>createPriorityQueue</h4>
<pre>protected <ahref="../../../com/mxgraph/analysis/mxFibonacciHeap.html"title="class in com.mxgraph.analysis">mxFibonacciHeap</a> createPriorityQueue()</pre>
<divclass="block">Hook for subclassers to provide a custom fibonacci heap.</div>
<li><ahref="../../../com/mxgraph/analysis/mxFibonacciHeap.Node.html"title="class in com.mxgraph.analysis"><spanclass="strong">Prev Class</span></a></li>
<li><ahref="../../../com/mxgraph/analysis/mxGraphGenerator.html"title="class in com.mxgraph.analysis"><spanclass="strong">Next Class</span></a></li>