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

664 lines
31 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>
2018-11-06 11:46:01 +00:00
<!-- Generated by javadoc (10.0.2) on Tue Nov 06 11:32:18 UTC 2018 -->
<title>mxGraphAnalysis (mxGraph 3.9.11 API Specification)</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="date" content="2018-11-06">
2014-04-01 11:30:48 +00:00
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
2018-11-06 11:46:01 +00:00
<link rel="stylesheet" type="text/css" href="../../../jquery/jquery-ui.css" title="Style">
2016-06-02 09:57:18 +00:00
<script type="text/javascript" src="../../../script.js"></script>
2018-11-06 11:46:01 +00:00
<script type="text/javascript" src="../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../jquery/jquery-1.10.2.js"></script>
<script type="text/javascript" src="../../../jquery/jquery-ui.js"></script>
2014-04-01 11:30:48 +00:00
</head>
<body>
<script type="text/javascript"><!--
2016-06-02 09:57:18 +00:00
try {
if (location.href.indexOf('is-external=true') == -1) {
2018-11-06 11:46:01 +00:00
parent.document.title="mxGraphAnalysis (mxGraph 3.9.11 API Specification)";
2016-06-02 09:57:18 +00:00
}
}
catch(err) {
2012-05-21 20:32:26 +00:00
}
2014-04-01 11:30:48 +00:00
//-->
2016-06-02 09:57:18 +00:00
var methods = {"i0":10,"i1":10,"i2":10,"i3":9,"i4":10,"i5":10,"i6":10,"i7":9,"i8":10,"i9":10};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
2018-11-06 11:46:01 +00:00
var pathtoroot = "../../../";loadScripts(document, 'script');</script>
2014-04-01 11:30:48 +00:00
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
2018-11-06 11:46:01 +00:00
<div class="fixedNav">
2012-05-21 20:32:26 +00:00
<!-- ========= START OF TOP NAVBAR ======= -->
2016-06-02 09:57:18 +00:00
<div class="topNav"><a name="navbar.top">
2014-04-01 11:30:48 +00:00
<!-- -->
2016-06-02 09:57:18 +00:00
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
2014-04-01 11:30:48 +00:00
<!-- -->
</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>
2018-11-06 11:46:01 +00:00
<div class="aboutLanguage"><p><b>mxGraph 3.9.11</b></p></div>
2014-04-01 11:30:48 +00:00
</div>
<div class="subNav">
<ul class="navList">
2016-06-02 09:57:18 +00:00
<li><a href="../../../com/mxgraph/analysis/mxFibonacciHeap.Node.html" title="class in com.mxgraph.analysis"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../com/mxgraph/analysis/mxGraphGenerator.html" title="class in com.mxgraph.analysis"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
2014-04-01 11:30:48 +00:00
</ul>
<ul class="navList">
<li><a href="../../../index.html?com/mxgraph/analysis/mxGraphAnalysis.html" target="_top">Frames</a></li>
2016-06-02 09:57:18 +00:00
<li><a href="mxGraphAnalysis.html" target="_top">No&nbsp;Frames</a></li>
2014-04-01 11:30:48 +00:00
</ul>
<ul class="navList" id="allclasses_navbar_top">
2016-06-02 09:57:18 +00:00
<li><a href="../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
2014-04-01 11:30:48 +00:00
</ul>
2018-11-06 11:46:01 +00:00
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</li>
</ul>
2014-04-01 11:30:48 +00:00
<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>
2018-11-06 11:46:01 +00:00
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
2014-04-01 11:30:48 +00:00
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
2016-06-02 09:57:18 +00:00
<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>
2014-04-01 11:30:48 +00:00
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
2016-06-02 09:57:18 +00:00
<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>
2014-04-01 11:30:48 +00:00
</ul>
</div>
2016-06-02 09:57:18 +00:00
<a name="skip.navbar.top">
2014-04-01 11:30:48 +00:00
<!-- -->
</a></div>
2012-05-21 20:32:26 +00:00
<!-- ========= END OF TOP NAVBAR ========= -->
2018-11-06 11:46:01 +00:00
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
2012-05-21 20:32:26 +00:00
<!-- ======== START OF CLASS DATA ======== -->
2014-04-01 11:30:48 +00:00
<div class="header">
2018-11-06 11:46:01 +00:00
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="../../../com/mxgraph/analysis/package-summary.html">com.mxgraph.analysis</a></div>
2014-04-01 11:30:48 +00:00
<h2 title="Class mxGraphAnalysis" class="title">Class mxGraphAnalysis</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
2017-11-24 16:16:54 +00:00
<li>java.lang.Object</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>
2016-06-02 09:57:18 +00:00
<pre>public class <span class="typeNameLabel">mxGraphAnalysis</span>
2017-11-24 16:16:54 +00:00
extends java.lang.Object</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>
2016-06-02 09:57:18 +00:00
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../com/mxgraph/analysis/mxICostFunction.html" title="interface in com.mxgraph.analysis"><code>mxICostFunction</code></a></dd>
</dl>
2014-04-01 11:30:48 +00:00
</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">
2016-06-02 09:57:18 +00:00
<li class="blockList"><a name="field.summary">
2014-04-01 11:30:48 +00:00
<!-- -->
</a>
<h3>Field Summary</h3>
2018-11-06 11:46:01 +00:00
<table class="memberSummary" summary="Field Summary table, listing fields, and an explanation">
2014-04-01 11:30:48 +00:00
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
2018-11-06 11:46:01 +00:00
<th class="colSecond" scope="col">Field</th>
<th class="colLast" scope="col">Description</th>
2014-04-01 11:30:48 +00:00
</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>
2018-11-06 11:46:01 +00:00
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../com/mxgraph/analysis/mxGraphAnalysis.html#instance">instance</a></span></code></th>
<td class="colLast">
2014-04-01 11:30:48 +00:00
<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">
2016-06-02 09:57:18 +00:00
<li class="blockList"><a name="constructor.summary">
2014-04-01 11:30:48 +00:00
<!-- -->
</a>
<h3>Constructor Summary</h3>
2018-11-06 11:46:01 +00:00
<table class="memberSummary" summary="Constructor Summary table, listing constructors, and an explanation">
2014-04-01 11:30:48 +00:00
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier</th>
2018-11-06 11:46:01 +00:00
<th class="colSecond" scope="col">Constructor</th>
<th class="colLast" scope="col">Description</th>
2014-04-01 11:30:48 +00:00
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected </code></td>
2018-11-06 11:46:01 +00:00
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="../../../com/mxgraph/analysis/mxGraphAnalysis.html#mxGraphAnalysis--">mxGraphAnalysis</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
2014-04-01 11:30:48 +00:00
</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">
2016-06-02 09:57:18 +00:00
<li class="blockList"><a name="method.summary">
2014-04-01 11:30:48 +00:00
<!-- -->
</a>
<h3>Method Summary</h3>
2018-11-06 11:46:01 +00:00
<table class="memberSummary" summary="Method Summary table, listing methods, and an explanation">
2016-06-02 09:57:18 +00:00
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
2014-04-01 11:30:48 +00:00
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
2018-11-06 11:46:01 +00:00
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
2014-04-01 11:30:48 +00:00
</tr>
2016-06-02 09:57:18 +00:00
<tr id="i0" class="altColor">
2014-04-01 11:30:48 +00:00
<td class="colFirst"><code>protected <a href="../../../com/mxgraph/analysis/mxFibonacciHeap.html" title="class in com.mxgraph.analysis">mxFibonacciHeap</a></code></td>
2018-11-06 11:46:01 +00:00
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../com/mxgraph/analysis/mxGraphAnalysis.html#createPriorityQueue--">createPriorityQueue</a></span>()</code></th>
<td class="colLast">
2014-04-01 11:30:48 +00:00
<div class="block">Hook for subclassers to provide a custom fibonacci heap.</div>
</td>
</tr>
2016-06-02 09:57:18 +00:00
<tr id="i1" class="rowColor">
2014-04-01 11:30:48 +00:00
<td class="colFirst"><code>protected <a href="../../../com/mxgraph/analysis/mxUnionFind.html" title="class in com.mxgraph.analysis">mxUnionFind</a></code></td>
2018-11-06 11:46:01 +00:00
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../com/mxgraph/analysis/mxGraphAnalysis.html#createUnionFind-java.lang.Object:A-">createUnionFind</a></span>&#8203;(java.lang.Object[]&nbsp;v)</code></th>
<td class="colLast">
2014-04-01 11:30:48 +00:00
<div class="block">Hook for subclassers to provide a custom union find structure.</div>
</td>
</tr>
2016-06-02 09:57:18 +00:00
<tr id="i2" class="altColor">
2014-04-01 11:30:48 +00:00
<td class="colFirst"><code><a href="../../../com/mxgraph/analysis/mxUnionFind.html" title="class in com.mxgraph.analysis">mxUnionFind</a></code></td>
2018-11-06 11:46:01 +00:00
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../com/mxgraph/analysis/mxGraphAnalysis.html#getConnectionComponents-com.mxgraph.view.mxGraph-java.lang.Object:A-java.lang.Object:A-">getConnectionComponents</a></span>&#8203;(<a href="../../../com/mxgraph/view/mxGraph.html" title="class in com.mxgraph.view">mxGraph</a>&nbsp;graph,
2017-11-24 16:16:54 +00:00
java.lang.Object[]&nbsp;v,
2018-11-06 11:46:01 +00:00
java.lang.Object[]&nbsp;e)</code></th>
<td class="colLast">
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>
2016-06-02 09:57:18 +00:00
<tr id="i3" class="rowColor">
2014-04-01 11:30:48 +00:00
<td class="colFirst"><code>static <a href="../../../com/mxgraph/analysis/mxGraphAnalysis.html" title="class in com.mxgraph.analysis">mxGraphAnalysis</a></code></td>
2018-11-06 11:46:01 +00:00
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../com/mxgraph/analysis/mxGraphAnalysis.html#getInstance--">getInstance</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
2014-04-01 11:30:48 +00:00
</tr>
2016-06-02 09:57:18 +00:00
<tr id="i4" class="altColor">
2017-11-24 16:16:54 +00:00
<td class="colFirst"><code>java.lang.Object[]</code></td>
2018-11-06 11:46:01 +00:00
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../com/mxgraph/analysis/mxGraphAnalysis.html#getMinimumSpanningTree-com.mxgraph.view.mxGraph-java.lang.Object:A-com.mxgraph.analysis.mxICostFunction-boolean-">getMinimumSpanningTree</a></span>&#8203;(<a href="../../../com/mxgraph/view/mxGraph.html" title="class in com.mxgraph.view">mxGraph</a>&nbsp;graph,
2017-11-24 16:16:54 +00:00
java.lang.Object[]&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,
2018-11-06 11:46:01 +00:00
boolean&nbsp;directed)</code></th>
<td class="colLast">
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).</div>
</td>
</tr>
2016-06-02 09:57:18 +00:00
<tr id="i5" class="rowColor">
2017-11-24 16:16:54 +00:00
<td class="colFirst"><code>java.lang.Object[]</code></td>
2018-11-06 11:46:01 +00:00
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../com/mxgraph/analysis/mxGraphAnalysis.html#getMinimumSpanningTree-com.mxgraph.view.mxGraph-java.lang.Object:A-java.lang.Object:A-com.mxgraph.analysis.mxICostFunction-">getMinimumSpanningTree</a></span>&#8203;(<a href="../../../com/mxgraph/view/mxGraph.html" title="class in com.mxgraph.view">mxGraph</a>&nbsp;graph,
2017-11-24 16:16:54 +00:00
java.lang.Object[]&nbsp;v,
java.lang.Object[]&nbsp;e,
2018-11-06 11:46:01 +00:00
<a href="../../../com/mxgraph/analysis/mxICostFunction.html" title="interface in com.mxgraph.analysis">mxICostFunction</a>&nbsp;cf)</code></th>
<td class="colLast">
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).</div>
</td>
</tr>
2016-06-02 09:57:18 +00:00
<tr id="i6" class="altColor">
2017-11-24 16:16:54 +00:00
<td class="colFirst"><code>java.lang.Object[]</code></td>
2018-11-06 11:46:01 +00:00
<th class="colSecond" scope="row"><code><span class="memberNameLink"><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></span>&#8203;(<a href="../../../com/mxgraph/view/mxGraph.html" title="class in com.mxgraph.view">mxGraph</a>&nbsp;graph,
2017-11-24 16:16:54 +00:00
java.lang.Object&nbsp;from,
java.lang.Object&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,
2018-11-06 11:46:01 +00:00
boolean&nbsp;directed)</code></th>
<td class="colLast">
2014-04-01 11:30:48 +00:00
<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>
2016-06-02 09:57:18 +00:00
<tr id="i7" class="rowColor">
2014-04-01 11:30:48 +00:00
<td class="colFirst"><code>static void</code></td>
2018-11-06 11:46:01 +00:00
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../com/mxgraph/analysis/mxGraphAnalysis.html#setInstance-com.mxgraph.analysis.mxGraphAnalysis-">setInstance</a></span>&#8203;(<a href="../../../com/mxgraph/analysis/mxGraphAnalysis.html" title="class in com.mxgraph.analysis">mxGraphAnalysis</a>&nbsp;instance)</code></th>
<td class="colLast">
2014-04-01 11:30:48 +00:00
<div class="block">Sets the shared instance of this class.</div>
</td>
</tr>
2016-06-02 09:57:18 +00:00
<tr id="i8" class="altColor">
2014-04-01 11:30:48 +00:00
<td class="colFirst"><code><a href="../../../com/mxgraph/view/mxCellState.html" title="class in com.mxgraph.view">mxCellState</a>[]</code></td>
2018-11-06 11:46:01 +00:00
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../com/mxgraph/analysis/mxGraphAnalysis.html#sort-com.mxgraph.view.mxCellState:A-com.mxgraph.analysis.mxICostFunction-">sort</a></span>&#8203;(<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></th>
<td class="colLast">
2014-04-01 11:30:48 +00:00
<div class="block">Returns a sorted set for <code>cells</code> with respect to
<code>cf</code>.</div>
</td>
</tr>
2016-06-02 09:57:18 +00:00
<tr id="i9" class="rowColor">
2014-04-01 11:30:48 +00:00
<td class="colFirst"><code>double</code></td>
2018-11-06 11:46:01 +00:00
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../com/mxgraph/analysis/mxGraphAnalysis.html#sum-com.mxgraph.view.mxCellState:A-com.mxgraph.analysis.mxICostFunction-">sum</a></span>&#8203;(<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></th>
<td class="colLast">
2014-04-01 11:30:48 +00:00
<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">
2016-06-02 09:57:18 +00:00
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
2014-04-01 11:30:48 +00:00
<!-- -->
</a>
2017-11-24 16:16:54 +00:00
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</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">
2016-06-02 09:57:18 +00:00
<li class="blockList"><a name="field.detail">
2014-04-01 11:30:48 +00:00
<!-- -->
</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">
2016-06-02 09:57:18 +00:00
<li class="blockList"><a name="constructor.detail">
2014-04-01 11:30:48 +00:00
<!-- -->
</a>
<h3>Constructor Detail</h3>
2016-06-02 09:57:18 +00:00
<a name="mxGraphAnalysis--">
2014-04-01 11:30:48 +00:00
<!-- -->
</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">
2016-06-02 09:57:18 +00:00
<li class="blockList"><a name="method.detail">
2014-04-01 11:30:48 +00:00
<!-- -->
</a>
<h3>Method Detail</h3>
2016-06-02 09:57:18 +00:00
<a name="getInstance--">
2014-04-01 11:30:48 +00:00
<!-- -->
</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>
2016-06-02 09:57:18 +00:00
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Returns the sharedInstance.</dd>
</dl>
2014-04-01 11:30:48 +00:00
</li>
</ul>
2016-06-02 09:57:18 +00:00
<a name="setInstance-com.mxgraph.analysis.mxGraphAnalysis-">
2014-04-01 11:30:48 +00:00
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setInstance</h4>
2018-11-06 11:46:01 +00:00
<pre>public static&nbsp;void&nbsp;setInstance&#8203;(<a href="../../../com/mxgraph/analysis/mxGraphAnalysis.html" title="class in com.mxgraph.analysis">mxGraphAnalysis</a>&nbsp;instance)</pre>
2014-04-01 11:30:48 +00:00
<div class="block">Sets the shared instance of this class.</div>
2016-06-02 09:57:18 +00:00
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>instance</code> - The instance to set.</dd>
</dl>
2014-04-01 11:30:48 +00:00
</li>
</ul>
2016-06-02 09:57:18 +00:00
<a name="getShortestPath-com.mxgraph.view.mxGraph-java.lang.Object-java.lang.Object-com.mxgraph.analysis.mxICostFunction-int-boolean-">
2014-04-01 11:30:48 +00:00
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getShortestPath</h4>
2018-11-06 11:46:01 +00:00
<pre>public&nbsp;java.lang.Object[]&nbsp;getShortestPath&#8203;(<a href="../../../com/mxgraph/view/mxGraph.html" title="class in com.mxgraph.view">mxGraph</a>&nbsp;graph,
2017-11-24 16:16:54 +00:00
java.lang.Object&nbsp;from,
java.lang.Object&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>
2016-06-02 09:57:18 +00:00
<dl>
<dt><span class="paramLabel">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="returnLabel">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
2016-06-02 09:57:18 +00:00
<code>to</code>.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../com/mxgraph/analysis/mxGraphAnalysis.html#createPriorityQueue--"><code>createPriorityQueue()</code></a></dd>
</dl>
2014-04-01 11:30:48 +00:00
</li>
</ul>
2016-06-02 09:57:18 +00:00
<a name="getMinimumSpanningTree-com.mxgraph.view.mxGraph-java.lang.Object:A-com.mxgraph.analysis.mxICostFunction-boolean-">
2014-04-01 11:30:48 +00:00
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMinimumSpanningTree</h4>
2018-11-06 11:46:01 +00:00
<pre>public&nbsp;java.lang.Object[]&nbsp;getMinimumSpanningTree&#8203;(<a href="../../../com/mxgraph/view/mxGraph.html" title="class in com.mxgraph.view">mxGraph</a>&nbsp;graph,
2017-11-24 16:16:54 +00:00
java.lang.Object[]&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>
2016-06-02 09:57:18 +00:00
<dl>
<dt><span class="paramLabel">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="returnLabel">Returns:</span></dt>
<dd>Returns the MST as an array of edges</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../com/mxgraph/analysis/mxGraphAnalysis.html#createPriorityQueue--"><code>createPriorityQueue()</code></a></dd>
</dl>
2014-04-01 11:30:48 +00:00
</li>
</ul>
2016-06-02 09:57:18 +00:00
<a name="getMinimumSpanningTree-com.mxgraph.view.mxGraph-java.lang.Object:A-java.lang.Object:A-com.mxgraph.analysis.mxICostFunction-">
2014-04-01 11:30:48 +00:00
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMinimumSpanningTree</h4>
2018-11-06 11:46:01 +00:00
<pre>public&nbsp;java.lang.Object[]&nbsp;getMinimumSpanningTree&#8203;(<a href="../../../com/mxgraph/view/mxGraph.html" title="class in com.mxgraph.view">mxGraph</a>&nbsp;graph,
2017-11-24 16:16:54 +00:00
java.lang.Object[]&nbsp;v,
java.lang.Object[]&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>
2016-06-02 09:57:18 +00:00
<dl>
<dt><span class="paramLabel">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="returnLabel">Returns:</span></dt>
<dd>Returns the MST as an array of edges.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../com/mxgraph/analysis/mxGraphAnalysis.html#getMinimumSpanningTree-com.mxgraph.view.mxGraph-java.lang.Object:A-com.mxgraph.analysis.mxICostFunction-boolean-"><code>getMinimumSpanningTree(mxGraph, Object[], mxICostFunction,
2014-04-01 11:30:48 +00:00
boolean)</code></a>,
2016-06-02 09:57:18 +00:00
<a href="../../../com/mxgraph/analysis/mxGraphAnalysis.html#createUnionFind-java.lang.Object:A-"><code>createUnionFind(Object[])</code></a></dd>
</dl>
2014-04-01 11:30:48 +00:00
</li>
</ul>
2016-06-02 09:57:18 +00:00
<a name="getConnectionComponents-com.mxgraph.view.mxGraph-java.lang.Object:A-java.lang.Object:A-">
2014-04-01 11:30:48 +00:00
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getConnectionComponents</h4>
2018-11-06 11:46:01 +00:00
<pre>public&nbsp;<a href="../../../com/mxgraph/analysis/mxUnionFind.html" title="class in com.mxgraph.analysis">mxUnionFind</a>&nbsp;getConnectionComponents&#8203;(<a href="../../../com/mxgraph/view/mxGraph.html" title="class in com.mxgraph.view">mxGraph</a>&nbsp;graph,
2017-11-24 16:16:54 +00:00
java.lang.Object[]&nbsp;v,
java.lang.Object[]&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>
2016-06-02 09:57:18 +00:00
<dl>
<dt><span class="paramLabel">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="returnLabel">Returns:</span></dt>
<dd>Returns the connection components in G=(E,V)</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../com/mxgraph/analysis/mxGraphAnalysis.html#createUnionFind-java.lang.Object:A-"><code>createUnionFind(Object[])</code></a></dd>
</dl>
2014-04-01 11:30:48 +00:00
</li>
</ul>
2016-06-02 09:57:18 +00:00
<a name="sort-com.mxgraph.view.mxCellState:A-com.mxgraph.analysis.mxICostFunction-">
2014-04-01 11:30:48 +00:00
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>sort</h4>
2018-11-06 11:46:01 +00:00
<pre>public&nbsp;<a href="../../../com/mxgraph/view/mxCellState.html" title="class in com.mxgraph.view">mxCellState</a>[]&nbsp;sort&#8203;(<a href="../../../com/mxgraph/view/mxCellState.html" title="class in com.mxgraph.view">mxCellState</a>[]&nbsp;states,
2016-06-02 09:57:18 +00:00
<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 a sorted set for <code>cells</code> with respect to
<code>cf</code>.</div>
2016-06-02 09:57:18 +00:00
<dl>
<dt><span class="paramLabel">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="returnLabel">Returns:</span></dt>
<dd>Returns an ordered set of <code>cells</code> wrt.
<code>cf</code></dd>
</dl>
2014-04-01 11:30:48 +00:00
</li>
</ul>
2016-06-02 09:57:18 +00:00
<a name="sum-com.mxgraph.view.mxCellState:A-com.mxgraph.analysis.mxICostFunction-">
2014-04-01 11:30:48 +00:00
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>sum</h4>
2018-11-06 11:46:01 +00:00
<pre>public&nbsp;double&nbsp;sum&#8203;(<a href="../../../com/mxgraph/view/mxCellState.html" title="class in com.mxgraph.view">mxCellState</a>[]&nbsp;states,
2016-06-02 09:57:18 +00:00
<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 sum of all cost for <code>cells</code> with respect to
<code>cf</code>.</div>
2016-06-02 09:57:18 +00:00
<dl>
<dt><span class="paramLabel">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="returnLabel">Returns:</span></dt>
<dd>Returns the sum of all cell cost</dd>
</dl>
2014-04-01 11:30:48 +00:00
</li>
</ul>
2016-06-02 09:57:18 +00:00
<a name="createUnionFind-java.lang.Object:A-">
2014-04-01 11:30:48 +00:00
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createUnionFind</h4>
2018-11-06 11:46:01 +00:00
<pre>protected&nbsp;<a href="../../../com/mxgraph/analysis/mxUnionFind.html" title="class in com.mxgraph.analysis">mxUnionFind</a>&nbsp;createUnionFind&#8203;(java.lang.Object[]&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>
2016-06-02 09:57:18 +00:00
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>v</code> - the array of all elements</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Returns a union find structure for <code>v</code></dd>
</dl>
2014-04-01 11:30:48 +00:00
</li>
</ul>
2016-06-02 09:57:18 +00:00
<a name="createPriorityQueue--">
2014-04-01 11:30:48 +00:00
<!-- -->
</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 ====== -->
2016-06-02 09:57:18 +00:00
<div class="bottomNav"><a name="navbar.bottom">
2014-04-01 11:30:48 +00:00
<!-- -->
2016-06-02 09:57:18 +00:00
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
2014-04-01 11:30:48 +00:00
<!-- -->
</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>
2018-11-06 11:46:01 +00:00
<div class="aboutLanguage"><p><b>mxGraph 3.9.11</b></p></div>
2014-04-01 11:30:48 +00:00
</div>
<div class="subNav">
<ul class="navList">
2016-06-02 09:57:18 +00:00
<li><a href="../../../com/mxgraph/analysis/mxFibonacciHeap.Node.html" title="class in com.mxgraph.analysis"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../com/mxgraph/analysis/mxGraphGenerator.html" title="class in com.mxgraph.analysis"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
2014-04-01 11:30:48 +00:00
</ul>
<ul class="navList">
<li><a href="../../../index.html?com/mxgraph/analysis/mxGraphAnalysis.html" target="_top">Frames</a></li>
2016-06-02 09:57:18 +00:00
<li><a href="mxGraphAnalysis.html" target="_top">No&nbsp;Frames</a></li>
2014-04-01 11:30:48 +00:00
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
2016-06-02 09:57:18 +00:00
<li><a href="../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
2014-04-01 11:30:48 +00:00
</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>
2018-11-06 11:46:01 +00:00
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
2014-04-01 11:30:48 +00:00
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
2016-06-02 09:57:18 +00:00
<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>
2014-04-01 11:30:48 +00:00
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
2016-06-02 09:57:18 +00:00
<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>
2014-04-01 11:30:48 +00:00
</ul>
</div>
2016-06-02 09:57:18 +00:00
<a name="skip.navbar.bottom">
2014-04-01 11:30:48 +00:00
<!-- -->
</a></div>
2012-05-21 20:32:26 +00:00
<!-- ======== END OF BOTTOM NAVBAR ======= -->
2017-06-27 11:43:19 +00:00
<p class="legalCopy"><small><font size=1>Copyright (c) 2010-2017 <a href="http://www.jgraph.com/"
target="_blank">Gaudenz Alder, JGraph Ltd</a>. All rights reserved.</font></small></p>
2014-04-01 11:30:48 +00:00
</body>
</html>