maxGraph/java/docs/com/mxgraph/analysis/mxGraphAnalysis.html

548 lines
32 KiB
HTML
Raw Normal View History

2012-05-21 20:32:26 +00:00
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2014-04-01 11:30:48 +00:00
<!-- NewPage -->
<html lang="en">
<head>
2015-03-05 09:43:42 +00:00
<!-- Generated by javadoc (version 1.7.0_51) on Thu Mar 05 04:25:05 EST 2015 -->
<title>mxGraphAnalysis (mxGraph 3.1.3.0 API Specification)</title>
<meta name="date" content="2015-03-05">
2014-04-01 11:30:48 +00:00
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
2012-05-21 20:32:26 +00:00
if (location.href.indexOf('is-external=true') == -1) {
2015-03-05 09:43:42 +00:00
parent.document.title="mxGraphAnalysis (mxGraph 3.1.3.0 API Specification)";
2012-05-21 20:32:26 +00:00
}
2014-04-01 11:30:48 +00:00
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
2012-05-21 20:32:26 +00:00
<!-- ========= START OF TOP NAVBAR ======= -->
2014-04-01 11:30:48 +00:00
<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/mxGraphAnalysis.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>
2015-03-05 09:43:42 +00:00
<div class="aboutLanguage"><em><p><b>mxGraph 3.1.3.0</b></p></em></div>
2014-04-01 11:30:48 +00:00
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../com/mxgraph/analysis/mxFibonacciHeap.Node.html" title="class in com.mxgraph.analysis"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../com/mxgraph/analysis/mxGraphGenerator.html" title="class in com.mxgraph.analysis"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?com/mxgraph/analysis/mxGraphAnalysis.html" target="_top">Frames</a></li>
<li><a href="mxGraphAnalysis.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");
2012-05-21 20:32:26 +00:00
if(window==top) {
2014-04-01 11:30:48 +00:00
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
2012-05-21 20:32:26 +00:00
}
//-->
2014-04-01 11:30:48 +00:00
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
2012-05-21 20:32:26 +00:00
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
2014-04-01 11:30:48 +00:00
<div class="header">
<div class="subTitle">com.mxgraph.analysis</div>
<h2 title="Class mxGraphAnalysis" class="title">Class mxGraphAnalysis</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
2014-11-28 08:55:09 +00:00
<li><a href="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>
2014-04-01 11:30:48 +00:00
<li>
<ul class="inheritance">
<li>com.mxgraph.analysis.mxGraphAnalysis</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class <span class="strong">mxGraphAnalysis</span>
2014-11-28 08:55:09 +00:00
extends <a href="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>
2014-04-01 11:30:48 +00:00
<div class="block">A singleton class that provides algorithms for graphs. Assume these
2012-05-21 20:32:26 +00:00
variables for the following examples:<br>
<code>
mxICostFunction cf = mxDistanceCostFunction();
Object[] v = graph.getChildVertices(graph.getDefaultParent());
Object[] e = graph.getChildEdges(graph.getDefaultParent());
mxGraphAnalysis mga = mxGraphAnalysis.getInstance();
</code>
<h3>Shortest Path (Dijkstra)</h3>
For example, to find the shortest path between the first and the second
selected cell in a graph use the following code: <br>
<br>
<code>Object[] path = mga.getShortestPath(graph, from, to, cf, v.length, true);</code>
<h3>Minimum Spanning Tree</h3>
This algorithm finds the set of edges with the minimal length that connect
all vertices. This algorithm can be used as follows:
<h5>Prim</h5>
<code>mga.getMinimumSpanningTree(graph, v, cf, true))</code>
<h5>Kruskal</h5>
<code>mga.getMinimumSpanningTree(graph, v, e, cf))</code>
<h3>Connection Components</h3>
The union find may be used as follows to determine whether two cells are
2014-04-01 11:30:48 +00:00
connected: <code>boolean connected = uf.differ(vertex1, vertex2)</code>.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../com/mxgraph/analysis/mxICostFunction.html" title="interface in com.mxgraph.analysis"><code>mxICostFunction</code></a></dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
2012-05-21 20:32:26 +00:00
<!-- =========== FIELD SUMMARY =========== -->
2014-04-01 11:30:48 +00:00
<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">&nbsp;</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 static <a href="../../../com/mxgraph/analysis/mxGraphAnalysis.html" title="class in com.mxgraph.analysis">mxGraphAnalysis</a></code></td>
<td class="colLast"><code><strong><a href="../../../com/mxgraph/analysis/mxGraphAnalysis.html#instance">instance</a></strong></code>
<div class="block">Holds the shared instance of this class.</div>
</td>
</tr>
</table>
</li>
</ul>
2012-05-21 20:32:26 +00:00
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
2014-04-01 11:30:48 +00:00
<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">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier</th>
<th class="colLast" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected </code></td>
<td class="colLast"><code><strong><a href="../../../com/mxgraph/analysis/mxGraphAnalysis.html#mxGraphAnalysis()">mxGraphAnalysis</a></strong>()</code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
2012-05-21 20:32:26 +00:00
<!-- ========== METHOD SUMMARY =========== -->
2014-04-01 11:30:48 +00:00
<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">&nbsp;</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>protected <a href="../../../com/mxgraph/analysis/mxFibonacciHeap.html" title="class in com.mxgraph.analysis">mxFibonacciHeap</a></code></td>
<td class="colLast"><code><strong><a href="../../../com/mxgraph/analysis/mxGraphAnalysis.html#createPriorityQueue()">createPriorityQueue</a></strong>()</code>
<div class="block">Hook for subclassers to provide a custom fibonacci heap.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected <a href="../../../com/mxgraph/analysis/mxUnionFind.html" title="class in com.mxgraph.analysis">mxUnionFind</a></code></td>
2014-11-28 08:55:09 +00:00
<td class="colLast"><code><strong><a href="../../../com/mxgraph/analysis/mxGraphAnalysis.html#createUnionFind(java.lang.Object[])">createUnionFind</a></strong>(<a href="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>[]&nbsp;v)</code>
2014-04-01 11:30:48 +00:00
<div class="block">Hook for subclassers to provide a custom union find structure.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../com/mxgraph/analysis/mxUnionFind.html" title="class in com.mxgraph.analysis">mxUnionFind</a></code></td>
<td class="colLast"><code><strong><a href="../../../com/mxgraph/analysis/mxGraphAnalysis.html#getConnectionComponents(com.mxgraph.view.mxGraph, java.lang.Object[], java.lang.Object[])">getConnectionComponents</a></strong>(<a href="../../../com/mxgraph/view/mxGraph.html" title="class in com.mxgraph.view">mxGraph</a>&nbsp;graph,
2014-11-28 08:55:09 +00:00
<a href="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>[]&nbsp;v,
<a href="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>[]&nbsp;e)</code>
2014-04-01 11:30:48 +00:00
<div class="block">Returns a union find structure representing the connection components of
G=(E,V).</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../../../com/mxgraph/analysis/mxGraphAnalysis.html" title="class in com.mxgraph.analysis">mxGraphAnalysis</a></code></td>
<td class="colLast"><code><strong><a href="../../../com/mxgraph/analysis/mxGraphAnalysis.html#getInstance()">getInstance</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="altColor">
2014-11-28 08:55:09 +00:00
<td class="colFirst"><code><a href="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>
2014-04-01 11:30:48 +00:00
<td class="colLast"><code><strong><a href="../../../com/mxgraph/analysis/mxGraphAnalysis.html#getMinimumSpanningTree(com.mxgraph.view.mxGraph, java.lang.Object[], com.mxgraph.analysis.mxICostFunction, boolean)">getMinimumSpanningTree</a></strong>(<a href="../../../com/mxgraph/view/mxGraph.html" title="class in com.mxgraph.view">mxGraph</a>&nbsp;graph,
2014-11-28 08:55:09 +00:00
<a href="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>[]&nbsp;v,
2014-04-01 11:30:48 +00:00
<a href="../../../com/mxgraph/analysis/mxICostFunction.html" title="interface in com.mxgraph.analysis">mxICostFunction</a>&nbsp;cf,
boolean&nbsp;directed)</code>
<div class="block">Returns the minimum spanning tree (MST) for the graph defined by G=(E,V).</div>
</td>
</tr>
<tr class="rowColor">
2014-11-28 08:55:09 +00:00
<td class="colFirst"><code><a href="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>
2014-04-01 11:30:48 +00:00
<td class="colLast"><code><strong><a href="../../../com/mxgraph/analysis/mxGraphAnalysis.html#getMinimumSpanningTree(com.mxgraph.view.mxGraph, java.lang.Object[], java.lang.Object[], com.mxgraph.analysis.mxICostFunction)">getMinimumSpanningTree</a></strong>(<a href="../../../com/mxgraph/view/mxGraph.html" title="class in com.mxgraph.view">mxGraph</a>&nbsp;graph,
2014-11-28 08:55:09 +00:00
<a href="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>[]&nbsp;v,
<a href="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>[]&nbsp;e,
2014-04-01 11:30:48 +00:00
<a href="../../../com/mxgraph/analysis/mxICostFunction.html" title="interface in com.mxgraph.analysis">mxICostFunction</a>&nbsp;cf)</code>
<div class="block">Returns the minimum spanning tree (MST) for the graph defined by G=(E,V).</div>
</td>
</tr>
<tr class="altColor">
2014-11-28 08:55:09 +00:00
<td class="colFirst"><code><a href="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>
2014-04-01 11:30:48 +00:00
<td class="colLast"><code><strong><a href="../../../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>(<a href="../../../com/mxgraph/view/mxGraph.html" title="class in com.mxgraph.view">mxGraph</a>&nbsp;graph,
2014-11-28 08:55:09 +00:00
<a href="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>&nbsp;from,
<a href="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>&nbsp;to,
2014-04-01 11:30:48 +00:00
<a href="../../../com/mxgraph/analysis/mxICostFunction.html" title="interface in com.mxgraph.analysis">mxICostFunction</a>&nbsp;cf,
int&nbsp;steps,
boolean&nbsp;directed)</code>
<div class="block">Returns the shortest path between two cells or their descendants
represented as an array of edges in order of traversal.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><strong><a href="../../../com/mxgraph/analysis/mxGraphAnalysis.html#setInstance(com.mxgraph.analysis.mxGraphAnalysis)">setInstance</a></strong>(<a href="../../../com/mxgraph/analysis/mxGraphAnalysis.html" title="class in com.mxgraph.analysis">mxGraphAnalysis</a>&nbsp;instance)</code>
<div class="block">Sets the shared instance of this class.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../com/mxgraph/view/mxCellState.html" title="class in com.mxgraph.view">mxCellState</a>[]</code></td>
<td class="colLast"><code><strong><a href="../../../com/mxgraph/analysis/mxGraphAnalysis.html#sort(com.mxgraph.view.mxCellState[], com.mxgraph.analysis.mxICostFunction)">sort</a></strong>(<a href="../../../com/mxgraph/view/mxCellState.html" title="class in com.mxgraph.view">mxCellState</a>[]&nbsp;states,
<a href="../../../com/mxgraph/analysis/mxICostFunction.html" title="interface in com.mxgraph.analysis">mxICostFunction</a>&nbsp;cf)</code>
<div class="block">Returns a sorted set for <code>cells</code> with respect to
<code>cf</code>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>double</code></td>
<td class="colLast"><code><strong><a href="../../../com/mxgraph/analysis/mxGraphAnalysis.html#sum(com.mxgraph.view.mxCellState[], com.mxgraph.analysis.mxICostFunction)">sum</a></strong>(<a href="../../../com/mxgraph/view/mxCellState.html" title="class in com.mxgraph.view">mxCellState</a>[]&nbsp;states,
<a href="../../../com/mxgraph/analysis/mxICostFunction.html" title="interface in com.mxgraph.analysis">mxICostFunction</a>&nbsp;cf)</code>
<div class="block">Returns the sum of all cost for <code>cells</code> with respect to
<code>cf</code>.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!-- -->
</a>
2014-11-28 08:55:09 +00:00
<h3>Methods inherited from class&nbsp;java.lang.<a href="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><a href="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>, <a href="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>, <a href="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>, <a href="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>, <a href="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>, <a href="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>, <a href="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>, <a href="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>, <a href="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>, <a href="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>, <a href="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>
2014-04-01 11:30:48 +00:00
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
2012-05-21 20:32:26 +00:00
<!-- ============ FIELD DETAIL =========== -->
2014-04-01 11:30:48 +00:00
<ul class="blockList">
<li class="blockList"><a name="field_detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="instance">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>instance</h4>
<pre>protected static&nbsp;<a href="../../../com/mxgraph/analysis/mxGraphAnalysis.html" title="class in com.mxgraph.analysis">mxGraphAnalysis</a> instance</pre>
<div class="block">Holds the shared instance of this class.</div>
</li>
</ul>
</li>
</ul>
2012-05-21 20:32:26 +00:00
<!-- ========= CONSTRUCTOR DETAIL ======== -->
2014-04-01 11:30:48 +00:00
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="mxGraphAnalysis()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>mxGraphAnalysis</h4>
<pre>protected&nbsp;mxGraphAnalysis()</pre>
</li>
</ul>
</li>
</ul>
2012-05-21 20:32:26 +00:00
<!-- ============ METHOD DETAIL ========== -->
2014-04-01 11:30:48 +00:00
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="getInstance()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getInstance</h4>
<pre>public static&nbsp;<a href="../../../com/mxgraph/analysis/mxGraphAnalysis.html" title="class in com.mxgraph.analysis">mxGraphAnalysis</a>&nbsp;getInstance()</pre>
<dl><dt><span class="strong">Returns:</span></dt><dd>Returns the sharedInstance.</dd></dl>
</li>
</ul>
<a name="setInstance(com.mxgraph.analysis.mxGraphAnalysis)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setInstance</h4>
<pre>public static&nbsp;void&nbsp;setInstance(<a href="../../../com/mxgraph/analysis/mxGraphAnalysis.html" title="class in com.mxgraph.analysis">mxGraphAnalysis</a>&nbsp;instance)</pre>
<div class="block">Sets the shared instance of this class.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>instance</code> - The instance to set.</dd></dl>
</li>
</ul>
<a name="getShortestPath(com.mxgraph.view.mxGraph, java.lang.Object, java.lang.Object, com.mxgraph.analysis.mxICostFunction, int, boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getShortestPath</h4>
2014-11-28 08:55:09 +00:00
<pre>public&nbsp;<a href="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>[]&nbsp;getShortestPath(<a href="../../../com/mxgraph/view/mxGraph.html" title="class in com.mxgraph.view">mxGraph</a>&nbsp;graph,
<a href="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>&nbsp;from,
<a href="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>&nbsp;to,
<a href="../../../com/mxgraph/analysis/mxICostFunction.html" title="interface in com.mxgraph.analysis">mxICostFunction</a>&nbsp;cf,
int&nbsp;steps,
boolean&nbsp;directed)</pre>
2014-04-01 11:30:48 +00:00
<div class="block">Returns the shortest path between two cells or their descendants
2012-05-21 20:32:26 +00:00
represented as an array of edges in order of traversal. <br>
2014-04-01 11:30:48 +00:00
This implementation is based on the Dijkstra algorithm.</div>
<dl><dt><span class="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><span class="strong">Returns:</span></dt><dd>Returns the shortest path as an alternating array of vertices
2012-05-21 20:32:26 +00:00
and edges, starting with <code>from</code> and ending with
2014-04-01 11:30:48 +00:00
<code>to</code>.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../com/mxgraph/analysis/mxGraphAnalysis.html#createPriorityQueue()"><code>createPriorityQueue()</code></a></dd></dl>
</li>
</ul>
<a name="getMinimumSpanningTree(com.mxgraph.view.mxGraph, java.lang.Object[], com.mxgraph.analysis.mxICostFunction, boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMinimumSpanningTree</h4>
2014-11-28 08:55:09 +00:00
<pre>public&nbsp;<a href="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>[]&nbsp;getMinimumSpanningTree(<a href="../../../com/mxgraph/view/mxGraph.html" title="class in com.mxgraph.view">mxGraph</a>&nbsp;graph,
<a href="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>[]&nbsp;v,
<a href="../../../com/mxgraph/analysis/mxICostFunction.html" title="interface in com.mxgraph.analysis">mxICostFunction</a>&nbsp;cf,
boolean&nbsp;directed)</pre>
2014-04-01 11:30:48 +00:00
<div class="block">Returns the minimum spanning tree (MST) for the graph defined by G=(E,V).
2012-05-21 20:32:26 +00:00
The MST is defined as the set of all vertices with minimal lengths that
forms no cycles in G.<br>
This implementation is based on the algorihm by Prim-Jarnik. It uses
O(|E|+|V|log|V|) time when used with a Fibonacci heap and a graph whith a
double linked-list datastructure, as is the case with the default
2014-04-01 11:30:48 +00:00
implementation.</div>
<dl><dt><span class="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><span class="strong">Returns:</span></dt><dd>Returns the MST as an array of edges</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../com/mxgraph/analysis/mxGraphAnalysis.html#createPriorityQueue()"><code>createPriorityQueue()</code></a></dd></dl>
</li>
</ul>
<a name="getMinimumSpanningTree(com.mxgraph.view.mxGraph, java.lang.Object[], java.lang.Object[], com.mxgraph.analysis.mxICostFunction)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMinimumSpanningTree</h4>
2014-11-28 08:55:09 +00:00
<pre>public&nbsp;<a href="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>[]&nbsp;getMinimumSpanningTree(<a href="../../../com/mxgraph/view/mxGraph.html" title="class in com.mxgraph.view">mxGraph</a>&nbsp;graph,
<a href="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>[]&nbsp;v,
<a href="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>[]&nbsp;e,
<a href="../../../com/mxgraph/analysis/mxICostFunction.html" title="interface in com.mxgraph.analysis">mxICostFunction</a>&nbsp;cf)</pre>
2014-04-01 11:30:48 +00:00
<div class="block">Returns the minimum spanning tree (MST) for the graph defined by G=(E,V).
2012-05-21 20:32:26 +00:00
The MST is defined as the set of all vertices with minimal lenths that
forms no cycles in G.<br>
This implementation is based on the algorihm by Kruskal. It uses
O(|E|log|E|)=O(|E|log|V|) time for sorting the edges, O(|V|) create sets,
O(|E|) find and O(|V|) union calls on the union find structure, thus
2014-04-01 11:30:48 +00:00
yielding no more than O(|E|log|V|) steps. For a faster implementatin</div>
<dl><dt><span class="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><span class="strong">Returns:</span></dt><dd>Returns the MST as an array of edges.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../com/mxgraph/analysis/mxGraphAnalysis.html#getMinimumSpanningTree(com.mxgraph.view.mxGraph, java.lang.Object[], com.mxgraph.analysis.mxICostFunction, boolean)"><code>getMinimumSpanningTree(mxGraph, Object[], mxICostFunction,
boolean)</code></a>,
<a href="../../../com/mxgraph/analysis/mxGraphAnalysis.html#createUnionFind(java.lang.Object[])"><code>createUnionFind(Object[])</code></a></dd></dl>
</li>
</ul>
<a name="getConnectionComponents(com.mxgraph.view.mxGraph, java.lang.Object[], java.lang.Object[])">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getConnectionComponents</h4>
<pre>public&nbsp;<a href="../../../com/mxgraph/analysis/mxUnionFind.html" title="class in com.mxgraph.analysis">mxUnionFind</a>&nbsp;getConnectionComponents(<a href="../../../com/mxgraph/view/mxGraph.html" title="class in com.mxgraph.view">mxGraph</a>&nbsp;graph,
2014-11-28 08:55:09 +00:00
<a href="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>[]&nbsp;v,
<a href="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>[]&nbsp;e)</pre>
2014-04-01 11:30:48 +00:00
<div class="block">Returns a union find structure representing the connection components of
G=(E,V).</div>
<dl><dt><span class="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><span class="strong">Returns:</span></dt><dd>Returns the connection components in G=(E,V)</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../com/mxgraph/analysis/mxGraphAnalysis.html#createUnionFind(java.lang.Object[])"><code>createUnionFind(Object[])</code></a></dd></dl>
</li>
</ul>
<a name="sort(com.mxgraph.view.mxCellState[], com.mxgraph.analysis.mxICostFunction)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>sort</h4>
<pre>public&nbsp;<a href="../../../com/mxgraph/view/mxCellState.html" title="class in com.mxgraph.view">mxCellState</a>[]&nbsp;sort(<a href="../../../com/mxgraph/view/mxCellState.html" title="class in com.mxgraph.view">mxCellState</a>[]&nbsp;states,
<a href="../../../com/mxgraph/analysis/mxICostFunction.html" title="interface in com.mxgraph.analysis">mxICostFunction</a>&nbsp;cf)</pre>
<div class="block">Returns a sorted set for <code>cells</code> with respect to
<code>cf</code>.</div>
<dl><dt><span class="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><span class="strong">Returns:</span></dt><dd>Returns an ordered set of <code>cells</code> wrt.
<code>cf</code></dd></dl>
</li>
</ul>
<a name="sum(com.mxgraph.view.mxCellState[], com.mxgraph.analysis.mxICostFunction)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>sum</h4>
<pre>public&nbsp;double&nbsp;sum(<a href="../../../com/mxgraph/view/mxCellState.html" title="class in com.mxgraph.view">mxCellState</a>[]&nbsp;states,
<a href="../../../com/mxgraph/analysis/mxICostFunction.html" title="interface in com.mxgraph.analysis">mxICostFunction</a>&nbsp;cf)</pre>
<div class="block">Returns the sum of all cost for <code>cells</code> with respect to
<code>cf</code>.</div>
<dl><dt><span class="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><span class="strong">Returns:</span></dt><dd>Returns the sum of all cell cost</dd></dl>
</li>
</ul>
<a name="createUnionFind(java.lang.Object[])">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createUnionFind</h4>
2014-11-28 08:55:09 +00:00
<pre>protected&nbsp;<a href="../../../com/mxgraph/analysis/mxUnionFind.html" title="class in com.mxgraph.analysis">mxUnionFind</a>&nbsp;createUnionFind(<a href="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>[]&nbsp;v)</pre>
2014-04-01 11:30:48 +00:00
<div class="block">Hook for subclassers to provide a custom union find structure.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>v</code> - the array of all elements</dd>
<dt><span class="strong">Returns:</span></dt><dd>Returns a union find structure for <code>v</code></dd></dl>
</li>
</ul>
<a name="createPriorityQueue()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>createPriorityQueue</h4>
<pre>protected&nbsp;<a href="../../../com/mxgraph/analysis/mxFibonacciHeap.html" title="class in com.mxgraph.analysis">mxFibonacciHeap</a>&nbsp;createPriorityQueue()</pre>
<div class="block">Hook for subclassers to provide a custom fibonacci heap.</div>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
2012-05-21 20:32:26 +00:00
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
2014-04-01 11:30:48 +00:00
<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/mxGraphAnalysis.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>
2015-03-05 09:43:42 +00:00
<div class="aboutLanguage"><em><p><b>mxGraph 3.1.3.0</b></p></em></div>
2014-04-01 11:30:48 +00:00
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../com/mxgraph/analysis/mxFibonacciHeap.Node.html" title="class in com.mxgraph.analysis"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../com/mxgraph/analysis/mxGraphGenerator.html" title="class in com.mxgraph.analysis"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?com/mxgraph/analysis/mxGraphAnalysis.html" target="_top">Frames</a></li>
<li><a href="mxGraphAnalysis.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");
2012-05-21 20:32:26 +00:00
if(window==top) {
2014-04-01 11:30:48 +00:00
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
2012-05-21 20:32:26 +00:00
}
//-->
2014-04-01 11:30:48 +00:00
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
2012-05-21 20:32:26 +00:00
<!-- ======== END OF BOTTOM NAVBAR ======= -->
2014-04-01 11:30:48 +00:00
<p class="legalCopy"><small><font size=1>Copyright (c) 2010 <a href="http://www.mxgraph.com/"
target="_blank">Gaudenz Alder, David Benson</a>. All rights reserved.</font></small></p>
</body>
</html>