622 lines
34 KiB
HTML
622 lines
34 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<!-- NewPage -->
|
|
<html lang="en">
|
|
<head>
|
|
<!-- Generated by javadoc (1.8.0_101) on Wed Apr 12 16:32:15 CEST 2017 -->
|
|
<title>mxGraphAnalysis (mxGraph 3.7.2 API Specification)</title>
|
|
<meta name="date" content="2017-04-12">
|
|
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
|
<script type="text/javascript" src="../../../script.js"></script>
|
|
</head>
|
|
<body>
|
|
<script type="text/javascript"><!--
|
|
try {
|
|
if (location.href.indexOf('is-external=true') == -1) {
|
|
parent.document.title="mxGraphAnalysis (mxGraph 3.7.2 API Specification)";
|
|
}
|
|
}
|
|
catch(err) {
|
|
}
|
|
//-->
|
|
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";
|
|
</script>
|
|
<noscript>
|
|
<div>JavaScript is disabled on your browser.</div>
|
|
</noscript>
|
|
<!-- ========= START OF TOP NAVBAR ======= -->
|
|
<div class="topNav"><a name="navbar.top">
|
|
<!-- -->
|
|
</a>
|
|
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
|
|
<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>
|
|
<div class="aboutLanguage"><p><b>mxGraph 3.7.2</b></p></div>
|
|
</div>
|
|
<div class="subNav">
|
|
<ul class="navList">
|
|
<li><a href="../../../com/mxgraph/analysis/mxFibonacciHeap.Node.html" title="class in com.mxgraph.analysis"><span class="typeNameLink">Prev Class</span></a></li>
|
|
<li><a href="../../../com/mxgraph/analysis/mxGraphGenerator.html" title="class in com.mxgraph.analysis"><span class="typeNameLink">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");
|
|
if(window==top) {
|
|
allClassesLink.style.display = "block";
|
|
}
|
|
else {
|
|
allClassesLink.style.display = "none";
|
|
}
|
|
//-->
|
|
</script>
|
|
</div>
|
|
<div>
|
|
<ul class="subNavList">
|
|
<li>Summary: </li>
|
|
<li>Nested | </li>
|
|
<li><a href="#field.summary">Field</a> | </li>
|
|
<li><a href="#constructor.summary">Constr</a> | </li>
|
|
<li><a href="#method.summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li><a href="#field.detail">Field</a> | </li>
|
|
<li><a href="#constructor.detail">Constr</a> | </li>
|
|
<li><a href="#method.detail">Method</a></li>
|
|
</ul>
|
|
</div>
|
|
<a name="skip.navbar.top">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ========= END OF TOP NAVBAR ========= -->
|
|
<!-- ======== START OF CLASS DATA ======== -->
|
|
<div class="header">
|
|
<div class="subTitle">com.mxgraph.analysis</div>
|
|
<h2 title="Class mxGraphAnalysis" class="title">Class mxGraphAnalysis</h2>
|
|
</div>
|
|
<div class="contentContainer">
|
|
<ul class="inheritance">
|
|
<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>
|
|
<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="typeNameLabel">mxGraphAnalysis</span>
|
|
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>
|
|
<div class="block">A singleton class that provides algorithms for graphs. Assume these
|
|
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
|
|
connected: <code>boolean connected = uf.differ(vertex1, vertex2)</code>.</div>
|
|
<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>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="summary">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- =========== FIELD SUMMARY =========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="field.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Field Summary</h3>
|
|
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
|
|
<caption><span>Fields</span><span class="tabEnd"> </span></caption>
|
|
<tr>
|
|
<th class="colFirst" scope="col">Modifier and Type</th>
|
|
<th class="colLast" scope="col">Field and Description</th>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>protected static <a href="../../../com/mxgraph/analysis/mxGraphAnalysis.html" title="class in com.mxgraph.analysis">mxGraphAnalysis</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/mxgraph/analysis/mxGraphAnalysis.html#instance">instance</a></span></code>
|
|
<div class="block">Holds the shared instance of this class.</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</li>
|
|
</ul>
|
|
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="constructor.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Constructor Summary</h3>
|
|
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
|
|
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
|
|
<tr>
|
|
<th class="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><span class="memberNameLink"><a href="../../../com/mxgraph/analysis/mxGraphAnalysis.html#mxGraphAnalysis--">mxGraphAnalysis</a></span>()</code> </td>
|
|
</tr>
|
|
</table>
|
|
</li>
|
|
</ul>
|
|
<!-- ========== METHOD SUMMARY =========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="method.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Summary</h3>
|
|
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
|
|
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption>
|
|
<tr>
|
|
<th class="colFirst" scope="col">Modifier and Type</th>
|
|
<th class="colLast" scope="col">Method and Description</th>
|
|
</tr>
|
|
<tr id="i0" 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><span class="memberNameLink"><a href="../../../com/mxgraph/analysis/mxGraphAnalysis.html#createPriorityQueue--">createPriorityQueue</a></span>()</code>
|
|
<div class="block">Hook for subclassers to provide a custom fibonacci heap.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i1" class="rowColor">
|
|
<td class="colFirst"><code>protected <a href="../../../com/mxgraph/analysis/mxUnionFind.html" title="class in com.mxgraph.analysis">mxUnionFind</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/mxgraph/analysis/mxGraphAnalysis.html#createUnionFind-java.lang.Object:A-">createUnionFind</a></span>(<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>[] v)</code>
|
|
<div class="block">Hook for subclassers to provide a custom union find structure.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i2" 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><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>(<a href="../../../com/mxgraph/view/mxGraph.html" title="class in com.mxgraph.view">mxGraph</a> 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>[] 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>[] e)</code>
|
|
<div class="block">Returns a union find structure representing the connection components of
|
|
G=(E,V).</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i3" 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><span class="memberNameLink"><a href="../../../com/mxgraph/analysis/mxGraphAnalysis.html#getInstance--">getInstance</a></span>()</code> </td>
|
|
</tr>
|
|
<tr id="i4" class="altColor">
|
|
<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>
|
|
<td class="colLast"><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>(<a href="../../../com/mxgraph/view/mxGraph.html" title="class in com.mxgraph.view">mxGraph</a> 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>[] v,
|
|
<a href="../../../com/mxgraph/analysis/mxICostFunction.html" title="interface in com.mxgraph.analysis">mxICostFunction</a> cf,
|
|
boolean directed)</code>
|
|
<div class="block">Returns the minimum spanning tree (MST) for the graph defined by G=(E,V).</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i5" class="rowColor">
|
|
<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>
|
|
<td class="colLast"><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>(<a href="../../../com/mxgraph/view/mxGraph.html" title="class in com.mxgraph.view">mxGraph</a> 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>[] 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>[] e,
|
|
<a href="../../../com/mxgraph/analysis/mxICostFunction.html" title="interface in com.mxgraph.analysis">mxICostFunction</a> cf)</code>
|
|
<div class="block">Returns the minimum spanning tree (MST) for the graph defined by G=(E,V).</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i6" class="altColor">
|
|
<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>
|
|
<td class="colLast"><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>(<a href="../../../com/mxgraph/view/mxGraph.html" title="class in com.mxgraph.view">mxGraph</a> 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> 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> to,
|
|
<a href="../../../com/mxgraph/analysis/mxICostFunction.html" title="interface in com.mxgraph.analysis">mxICostFunction</a> cf,
|
|
int steps,
|
|
boolean 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 id="i7" class="rowColor">
|
|
<td class="colFirst"><code>static void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/mxgraph/analysis/mxGraphAnalysis.html#setInstance-com.mxgraph.analysis.mxGraphAnalysis-">setInstance</a></span>(<a href="../../../com/mxgraph/analysis/mxGraphAnalysis.html" title="class in com.mxgraph.analysis">mxGraphAnalysis</a> instance)</code>
|
|
<div class="block">Sets the shared instance of this class.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i8" 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><span class="memberNameLink"><a href="../../../com/mxgraph/analysis/mxGraphAnalysis.html#sort-com.mxgraph.view.mxCellState:A-com.mxgraph.analysis.mxICostFunction-">sort</a></span>(<a href="../../../com/mxgraph/view/mxCellState.html" title="class in com.mxgraph.view">mxCellState</a>[] states,
|
|
<a href="../../../com/mxgraph/analysis/mxICostFunction.html" title="interface in com.mxgraph.analysis">mxICostFunction</a> cf)</code>
|
|
<div class="block">Returns a sorted set for <code>cells</code> with respect to
|
|
<code>cf</code>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i9" class="rowColor">
|
|
<td class="colFirst"><code>double</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/mxgraph/analysis/mxGraphAnalysis.html#sum-com.mxgraph.view.mxCellState:A-com.mxgraph.analysis.mxICostFunction-">sum</a></span>(<a href="../../../com/mxgraph/view/mxCellState.html" title="class in com.mxgraph.view">mxCellState</a>[] states,
|
|
<a href="../../../com/mxgraph/analysis/mxICostFunction.html" title="interface in com.mxgraph.analysis">mxICostFunction</a> 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>
|
|
<h3>Methods inherited from class 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>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="details">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- ============ FIELD DETAIL =========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="field.detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Field Detail</h3>
|
|
<a name="instance">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>instance</h4>
|
|
<pre>protected static <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>
|
|
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
|
<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 mxGraphAnalysis()</pre>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<!-- ============ METHOD DETAIL ========== -->
|
|
<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 <a href="../../../com/mxgraph/analysis/mxGraphAnalysis.html" title="class in com.mxgraph.analysis">mxGraphAnalysis</a> getInstance()</pre>
|
|
<dl>
|
|
<dt><span class="returnLabel">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 void setInstance(<a href="../../../com/mxgraph/analysis/mxGraphAnalysis.html" title="class in com.mxgraph.analysis">mxGraphAnalysis</a> instance)</pre>
|
|
<div class="block">Sets the shared instance of this class.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">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>
|
|
<pre>public <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>[] getShortestPath(<a href="../../../com/mxgraph/view/mxGraph.html" title="class in com.mxgraph.view">mxGraph</a> 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> 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> to,
|
|
<a href="../../../com/mxgraph/analysis/mxICostFunction.html" title="interface in com.mxgraph.analysis">mxICostFunction</a> cf,
|
|
int steps,
|
|
boolean directed)</pre>
|
|
<div class="block">Returns the shortest path between two cells or their descendants
|
|
represented as an array of edges in order of traversal. <br>
|
|
This implementation is based on the Dijkstra algorithm.</div>
|
|
<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
|
|
and edges, starting with <code>from</code> and ending with
|
|
<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>
|
|
</li>
|
|
</ul>
|
|
<a name="getMinimumSpanningTree-com.mxgraph.view.mxGraph-java.lang.Object:A-com.mxgraph.analysis.mxICostFunction-boolean-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getMinimumSpanningTree</h4>
|
|
<pre>public <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>[] getMinimumSpanningTree(<a href="../../../com/mxgraph/view/mxGraph.html" title="class in com.mxgraph.view">mxGraph</a> 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>[] v,
|
|
<a href="../../../com/mxgraph/analysis/mxICostFunction.html" title="interface in com.mxgraph.analysis">mxICostFunction</a> cf,
|
|
boolean directed)</pre>
|
|
<div class="block">Returns the minimum spanning tree (MST) for the graph defined by G=(E,V).
|
|
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
|
|
implementation.</div>
|
|
<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>
|
|
</li>
|
|
</ul>
|
|
<a name="getMinimumSpanningTree-com.mxgraph.view.mxGraph-java.lang.Object:A-java.lang.Object:A-com.mxgraph.analysis.mxICostFunction-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getMinimumSpanningTree</h4>
|
|
<pre>public <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>[] getMinimumSpanningTree(<a href="../../../com/mxgraph/view/mxGraph.html" title="class in com.mxgraph.view">mxGraph</a> 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>[] 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>[] e,
|
|
<a href="../../../com/mxgraph/analysis/mxICostFunction.html" title="interface in com.mxgraph.analysis">mxICostFunction</a> cf)</pre>
|
|
<div class="block">Returns the minimum spanning tree (MST) for the graph defined by G=(E,V).
|
|
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
|
|
yielding no more than O(|E|log|V|) steps. For a faster implementatin</div>
|
|
<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,
|
|
boolean)</code></a>,
|
|
<a href="../../../com/mxgraph/analysis/mxGraphAnalysis.html#createUnionFind-java.lang.Object:A-"><code>createUnionFind(Object[])</code></a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getConnectionComponents-com.mxgraph.view.mxGraph-java.lang.Object:A-java.lang.Object:A-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getConnectionComponents</h4>
|
|
<pre>public <a href="../../../com/mxgraph/analysis/mxUnionFind.html" title="class in com.mxgraph.analysis">mxUnionFind</a> getConnectionComponents(<a href="../../../com/mxgraph/view/mxGraph.html" title="class in com.mxgraph.view">mxGraph</a> 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>[] 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>[] e)</pre>
|
|
<div class="block">Returns a union find structure representing the connection components of
|
|
G=(E,V).</div>
|
|
<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>
|
|
</li>
|
|
</ul>
|
|
<a name="sort-com.mxgraph.view.mxCellState:A-com.mxgraph.analysis.mxICostFunction-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>sort</h4>
|
|
<pre>public <a href="../../../com/mxgraph/view/mxCellState.html" title="class in com.mxgraph.view">mxCellState</a>[] sort(<a href="../../../com/mxgraph/view/mxCellState.html" title="class in com.mxgraph.view">mxCellState</a>[] states,
|
|
<a href="../../../com/mxgraph/analysis/mxICostFunction.html" title="interface in com.mxgraph.analysis">mxICostFunction</a> cf)</pre>
|
|
<div class="block">Returns a sorted set for <code>cells</code> with respect to
|
|
<code>cf</code>.</div>
|
|
<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>
|
|
</li>
|
|
</ul>
|
|
<a name="sum-com.mxgraph.view.mxCellState:A-com.mxgraph.analysis.mxICostFunction-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>sum</h4>
|
|
<pre>public double sum(<a href="../../../com/mxgraph/view/mxCellState.html" title="class in com.mxgraph.view">mxCellState</a>[] states,
|
|
<a href="../../../com/mxgraph/analysis/mxICostFunction.html" title="interface in com.mxgraph.analysis">mxICostFunction</a> 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="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>
|
|
</li>
|
|
</ul>
|
|
<a name="createUnionFind-java.lang.Object:A-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>createUnionFind</h4>
|
|
<pre>protected <a href="../../../com/mxgraph/analysis/mxUnionFind.html" title="class in com.mxgraph.analysis">mxUnionFind</a> 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>[] v)</pre>
|
|
<div class="block">Hook for subclassers to provide a custom union find structure.</div>
|
|
<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>
|
|
</li>
|
|
</ul>
|
|
<a name="createPriorityQueue--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>createPriorityQueue</h4>
|
|
<pre>protected <a href="../../../com/mxgraph/analysis/mxFibonacciHeap.html" title="class in com.mxgraph.analysis">mxFibonacciHeap</a> createPriorityQueue()</pre>
|
|
<div class="block">Hook for subclassers to provide a custom fibonacci heap.</div>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<!-- ========= END OF CLASS DATA ========= -->
|
|
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
|
<div class="bottomNav"><a name="navbar.bottom">
|
|
<!-- -->
|
|
</a>
|
|
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
|
<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>
|
|
<div class="aboutLanguage"><p><b>mxGraph 3.7.2</b></p></div>
|
|
</div>
|
|
<div class="subNav">
|
|
<ul class="navList">
|
|
<li><a href="../../../com/mxgraph/analysis/mxFibonacciHeap.Node.html" title="class in com.mxgraph.analysis"><span class="typeNameLink">Prev Class</span></a></li>
|
|
<li><a href="../../../com/mxgraph/analysis/mxGraphGenerator.html" title="class in com.mxgraph.analysis"><span class="typeNameLink">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");
|
|
if(window==top) {
|
|
allClassesLink.style.display = "block";
|
|
}
|
|
else {
|
|
allClassesLink.style.display = "none";
|
|
}
|
|
//-->
|
|
</script>
|
|
</div>
|
|
<div>
|
|
<ul class="subNavList">
|
|
<li>Summary: </li>
|
|
<li>Nested | </li>
|
|
<li><a href="#field.summary">Field</a> | </li>
|
|
<li><a href="#constructor.summary">Constr</a> | </li>
|
|
<li><a href="#method.summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li><a href="#field.detail">Field</a> | </li>
|
|
<li><a href="#constructor.detail">Constr</a> | </li>
|
|
<li><a href="#method.detail">Method</a></li>
|
|
</ul>
|
|
</div>
|
|
<a name="skip.navbar.bottom">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
|
<p class="legalCopy"><small><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>
|