1
0
Fork 0
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

650 Zeilen
37 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 (version 1.7.0_79) on Sun Apr 03 00:28:29 PDT 2016 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Graphs (JGraphT : a free Java graph library)</title>
<meta name="date" content="2016-04-03">
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Graphs (JGraphT : a free Java graph library)";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<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/Graphs.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>
<div class="subNav">
<ul class="navList">
<li><a href="../../org/jgrapht/GraphPath.html" title="interface in org.jgrapht"><span class="strong">Prev Class</span></a></li>
<li><a href="../../org/jgrapht/ListenableGraph.html" title="interface in org.jgrapht"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../index.html?org/jgrapht/Graphs.html" target="_top">Frames</a></li>
<li><a href="Graphs.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:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&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>Field&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>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.jgrapht</div>
<h2 title="Class Graphs" class="title">Class Graphs</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="http://docs.oracle.com/javase/7/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>org.jgrapht.Graphs</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>Direct Known Subclasses:</dt>
<dd><a href="../../org/jgrapht/GraphHelper.html" title="class in org.jgrapht">GraphHelper</a></dd>
</dl>
<hr>
<br>
<pre>public abstract class <span class="strong">Graphs</span>
extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre>
<div class="block">A collection of utilities to assist with graph manipulation.</div>
<dl><dt><span class="strong">Since:</span></dt>
<dd>Jul 31, 2003</dd>
<dt><span class="strong">Author:</span></dt>
<dd>Barak Naveh</dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<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="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../org/jgrapht/Graphs.html#Graphs()">Graphs</a></strong>()</code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<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>static &lt;V,E&gt;&nbsp;boolean</code></td>
<td class="colLast"><code><strong><a href="../../org/jgrapht/Graphs.html#addAllEdges(org.jgrapht.Graph,%20org.jgrapht.Graph,%20java.util.Collection)">addAllEdges</a></strong>(<a href="../../org/jgrapht/Graph.html" title="interface in org.jgrapht">Graph</a>&lt;? super V,? super E&gt;&nbsp;destination,
<a href="../../org/jgrapht/Graph.html" title="interface in org.jgrapht">Graph</a>&lt;V,E&gt;&nbsp;source,
<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;? extends E&gt;&nbsp;edges)</code>
<div class="block">Adds a subset of the edges of the specified source graph to the specified
destination graph.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static &lt;V,E&gt;&nbsp;boolean</code></td>
<td class="colLast"><code><strong><a href="../../org/jgrapht/Graphs.html#addAllVertices(org.jgrapht.Graph,%20java.util.Collection)">addAllVertices</a></strong>(<a href="../../org/jgrapht/Graph.html" title="interface in org.jgrapht">Graph</a>&lt;? super V,? super E&gt;&nbsp;destination,
<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;? extends V&gt;&nbsp;vertices)</code>
<div class="block">Adds all of the specified vertices to the destination graph.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static &lt;V,E&gt;&nbsp;E</code></td>
<td class="colLast"><code><strong><a href="../../org/jgrapht/Graphs.html#addEdge(org.jgrapht.Graph,%20V,%20V,%20double)">addEdge</a></strong>(<a href="../../org/jgrapht/Graph.html" title="interface in org.jgrapht">Graph</a>&lt;V,E&gt;&nbsp;g,
V&nbsp;sourceVertex,
V&nbsp;targetVertex,
double&nbsp;weight)</code>
<div class="block">Creates a new edge and adds it to the specified graph similarly to the
<a href="../../org/jgrapht/Graph.html#addEdge(V,%20V)"><code>Graph.addEdge(Object, Object)</code></a> method.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static &lt;V,E&gt;&nbsp;boolean</code></td>
<td class="colLast"><code><strong><a href="../../org/jgrapht/Graphs.html#addEdgeWithVertices(org.jgrapht.Graph,%20org.jgrapht.Graph,%20E)">addEdgeWithVertices</a></strong>(<a href="../../org/jgrapht/Graph.html" title="interface in org.jgrapht">Graph</a>&lt;V,E&gt;&nbsp;targetGraph,
<a href="../../org/jgrapht/Graph.html" title="interface in org.jgrapht">Graph</a>&lt;V,E&gt;&nbsp;sourceGraph,
E&nbsp;edge)</code>
<div class="block">Adds the specified edge to the graph, including its vertices if not
already included.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static &lt;V,E&gt;&nbsp;E</code></td>
<td class="colLast"><code><strong><a href="../../org/jgrapht/Graphs.html#addEdgeWithVertices(org.jgrapht.Graph,%20V,%20V)">addEdgeWithVertices</a></strong>(<a href="../../org/jgrapht/Graph.html" title="interface in org.jgrapht">Graph</a>&lt;V,E&gt;&nbsp;g,
V&nbsp;sourceVertex,
V&nbsp;targetVertex)</code>
<div class="block">Adds the specified source and target vertices to the graph, if not
already included, and creates a new edge and adds it to the specified
graph similarly to the <a href="../../org/jgrapht/Graph.html#addEdge(V,%20V)"><code>Graph.addEdge(Object, Object)</code></a> method.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static &lt;V,E&gt;&nbsp;E</code></td>
<td class="colLast"><code><strong><a href="../../org/jgrapht/Graphs.html#addEdgeWithVertices(org.jgrapht.Graph,%20V,%20V,%20double)">addEdgeWithVertices</a></strong>(<a href="../../org/jgrapht/Graph.html" title="interface in org.jgrapht">Graph</a>&lt;V,E&gt;&nbsp;g,
V&nbsp;sourceVertex,
V&nbsp;targetVertex,
double&nbsp;weight)</code>
<div class="block">Adds the specified source and target vertices to the graph, if not
already included, and creates a new weighted edge and adds it to the
specified graph similarly to the <a href="../../org/jgrapht/Graph.html#addEdge(V,%20V)"><code>Graph.addEdge(Object, Object)</code></a>
method.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static &lt;V,E&gt;&nbsp;boolean</code></td>
<td class="colLast"><code><strong><a href="../../org/jgrapht/Graphs.html#addGraph(org.jgrapht.Graph,%20org.jgrapht.Graph)">addGraph</a></strong>(<a href="../../org/jgrapht/Graph.html" title="interface in org.jgrapht">Graph</a>&lt;? super V,? super E&gt;&nbsp;destination,
<a href="../../org/jgrapht/Graph.html" title="interface in org.jgrapht">Graph</a>&lt;V,E&gt;&nbsp;source)</code>
<div class="block">Adds all the vertices and all the edges of the specified source graph to
the specified destination graph.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static &lt;V,E&gt;&nbsp;void</code></td>
<td class="colLast"><code><strong><a href="../../org/jgrapht/Graphs.html#addGraphReversed(org.jgrapht.DirectedGraph,%20org.jgrapht.DirectedGraph)">addGraphReversed</a></strong>(<a href="../../org/jgrapht/DirectedGraph.html" title="interface in org.jgrapht">DirectedGraph</a>&lt;? super V,? super E&gt;&nbsp;destination,
<a href="../../org/jgrapht/DirectedGraph.html" title="interface in org.jgrapht">DirectedGraph</a>&lt;V,E&gt;&nbsp;source)</code>
<div class="block">Adds all the vertices and all the edges of the specified source digraph
to the specified destination digraph, reversing all of the edges.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static &lt;V,E&gt;&nbsp;V</code></td>
<td class="colLast"><code><strong><a href="../../org/jgrapht/Graphs.html#getOppositeVertex(org.jgrapht.Graph,%20E,%20V)">getOppositeVertex</a></strong>(<a href="../../org/jgrapht/Graph.html" title="interface in org.jgrapht">Graph</a>&lt;V,E&gt;&nbsp;g,
E&nbsp;e,
V&nbsp;v)</code>
<div class="block">Gets the vertex opposite another vertex across an edge.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static &lt;V,E&gt;&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;V&gt;</code></td>
<td class="colLast"><code><strong><a href="../../org/jgrapht/Graphs.html#getPathVertexList(org.jgrapht.GraphPath)">getPathVertexList</a></strong>(<a href="../../org/jgrapht/GraphPath.html" title="interface in org.jgrapht">GraphPath</a>&lt;V,E&gt;&nbsp;path)</code>
<div class="block">Gets the list of vertices visited by a path.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static &lt;V,E&gt;&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;V&gt;</code></td>
<td class="colLast"><code><strong><a href="../../org/jgrapht/Graphs.html#neighborListOf(org.jgrapht.Graph,%20V)">neighborListOf</a></strong>(<a href="../../org/jgrapht/Graph.html" title="interface in org.jgrapht">Graph</a>&lt;V,E&gt;&nbsp;g,
V&nbsp;vertex)</code>
<div class="block">Returns a list of vertices that are the neighbors of a specified vertex.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static &lt;V,E&gt;&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;V&gt;</code></td>
<td class="colLast"><code><strong><a href="../../org/jgrapht/Graphs.html#predecessorListOf(org.jgrapht.DirectedGraph,%20V)">predecessorListOf</a></strong>(<a href="../../org/jgrapht/DirectedGraph.html" title="interface in org.jgrapht">DirectedGraph</a>&lt;V,E&gt;&nbsp;g,
V&nbsp;vertex)</code>
<div class="block">Returns a list of vertices that are the direct predecessors of a
specified vertex.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static &lt;V,E&gt;&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;V&gt;</code></td>
<td class="colLast"><code><strong><a href="../../org/jgrapht/Graphs.html#successorListOf(org.jgrapht.DirectedGraph,%20V)">successorListOf</a></strong>(<a href="../../org/jgrapht/DirectedGraph.html" title="interface in org.jgrapht">DirectedGraph</a>&lt;V,E&gt;&nbsp;g,
V&nbsp;vertex)</code>
<div class="block">Returns a list of vertices that are the direct successors of a specified
vertex.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static &lt;V,E&gt;&nbsp;boolean</code></td>
<td class="colLast"><code><strong><a href="../../org/jgrapht/Graphs.html#testIncidence(org.jgrapht.Graph,%20E,%20V)">testIncidence</a></strong>(<a href="../../org/jgrapht/Graph.html" title="interface in org.jgrapht">Graph</a>&lt;V,E&gt;&nbsp;g,
E&nbsp;e,
V&nbsp;v)</code>
<div class="block">Tests whether an edge is incident to a vertex.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static &lt;V,E&gt;&nbsp;<a href="../../org/jgrapht/UndirectedGraph.html" title="interface in org.jgrapht">UndirectedGraph</a>&lt;V,E&gt;</code></td>
<td class="colLast"><code><strong><a href="../../org/jgrapht/Graphs.html#undirectedGraph(org.jgrapht.Graph)">undirectedGraph</a></strong>(<a href="../../org/jgrapht/Graph.html" title="interface in org.jgrapht">Graph</a>&lt;V,E&gt;&nbsp;g)</code>
<div class="block">Returns an undirected view of the specified graph.</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&nbsp;java.lang.<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/7/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://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long,%20int)" 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">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="Graphs()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>Graphs</h4>
<pre>public&nbsp;Graphs()</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="addEdge(org.jgrapht.Graph,java.lang.Object,java.lang.Object,double)">
<!-- -->
</a><a name="addEdge(org.jgrapht.Graph, V, V, double)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addEdge</h4>
<pre>public static&nbsp;&lt;V,E&gt;&nbsp;E&nbsp;addEdge(<a href="../../org/jgrapht/Graph.html" title="interface in org.jgrapht">Graph</a>&lt;V,E&gt;&nbsp;g,
V&nbsp;sourceVertex,
V&nbsp;targetVertex,
double&nbsp;weight)</pre>
<div class="block">Creates a new edge and adds it to the specified graph similarly to the
<a href="../../org/jgrapht/Graph.html#addEdge(V,%20V)"><code>Graph.addEdge(Object, Object)</code></a> method.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>g</code> - the graph for which the edge to be added.</dd><dd><code>sourceVertex</code> - source vertex of the edge.</dd><dd><code>targetVertex</code> - target vertex of the edge.</dd><dd><code>weight</code> - weight of the edge.</dd>
<dt><span class="strong">Returns:</span></dt><dd>The newly created edge if added to the graph, otherwise <code>
null</code>.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../org/jgrapht/Graph.html#addEdge(V,%20V)"><code>Graph.addEdge(Object, Object)</code></a></dd></dl>
</li>
</ul>
<a name="addEdgeWithVertices(org.jgrapht.Graph,java.lang.Object,java.lang.Object)">
<!-- -->
</a><a name="addEdgeWithVertices(org.jgrapht.Graph, V, V)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addEdgeWithVertices</h4>
<pre>public static&nbsp;&lt;V,E&gt;&nbsp;E&nbsp;addEdgeWithVertices(<a href="../../org/jgrapht/Graph.html" title="interface in org.jgrapht">Graph</a>&lt;V,E&gt;&nbsp;g,
V&nbsp;sourceVertex,
V&nbsp;targetVertex)</pre>
<div class="block">Adds the specified source and target vertices to the graph, if not
already included, and creates a new edge and adds it to the specified
graph similarly to the <a href="../../org/jgrapht/Graph.html#addEdge(V,%20V)"><code>Graph.addEdge(Object, Object)</code></a> method.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>g</code> - the graph for which the specified edge to be added.</dd><dd><code>sourceVertex</code> - source vertex of the edge.</dd><dd><code>targetVertex</code> - target vertex of the edge.</dd>
<dt><span class="strong">Returns:</span></dt><dd>The newly created edge if added to the graph, otherwise <code>
null</code>.</dd></dl>
</li>
</ul>
<a name="addEdgeWithVertices(org.jgrapht.Graph,org.jgrapht.Graph,java.lang.Object)">
<!-- -->
</a><a name="addEdgeWithVertices(org.jgrapht.Graph, org.jgrapht.Graph, E)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addEdgeWithVertices</h4>
<pre>public static&nbsp;&lt;V,E&gt;&nbsp;boolean&nbsp;addEdgeWithVertices(<a href="../../org/jgrapht/Graph.html" title="interface in org.jgrapht">Graph</a>&lt;V,E&gt;&nbsp;targetGraph,
<a href="../../org/jgrapht/Graph.html" title="interface in org.jgrapht">Graph</a>&lt;V,E&gt;&nbsp;sourceGraph,
E&nbsp;edge)</pre>
<div class="block">Adds the specified edge to the graph, including its vertices if not
already included.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>targetGraph</code> - the graph for which the specified edge to be added.</dd><dd><code>sourceGraph</code> - the graph in which the specified edge is already
present</dd><dd><code>edge</code> - edge to add</dd>
<dt><span class="strong">Returns:</span></dt><dd><tt>true</tt> if the target graph did not already contain the
specified edge.</dd></dl>
</li>
</ul>
<a name="addEdgeWithVertices(org.jgrapht.Graph,java.lang.Object,java.lang.Object,double)">
<!-- -->
</a><a name="addEdgeWithVertices(org.jgrapht.Graph, V, V, double)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addEdgeWithVertices</h4>
<pre>public static&nbsp;&lt;V,E&gt;&nbsp;E&nbsp;addEdgeWithVertices(<a href="../../org/jgrapht/Graph.html" title="interface in org.jgrapht">Graph</a>&lt;V,E&gt;&nbsp;g,
V&nbsp;sourceVertex,
V&nbsp;targetVertex,
double&nbsp;weight)</pre>
<div class="block">Adds the specified source and target vertices to the graph, if not
already included, and creates a new weighted edge and adds it to the
specified graph similarly to the <a href="../../org/jgrapht/Graph.html#addEdge(V,%20V)"><code>Graph.addEdge(Object, Object)</code></a>
method.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>g</code> - the graph for which the specified edge to be added.</dd><dd><code>sourceVertex</code> - source vertex of the edge.</dd><dd><code>targetVertex</code> - target vertex of the edge.</dd><dd><code>weight</code> - weight of the edge.</dd>
<dt><span class="strong">Returns:</span></dt><dd>The newly created edge if added to the graph, otherwise <code>
null</code>.</dd></dl>
</li>
</ul>
<a name="addGraph(org.jgrapht.Graph, org.jgrapht.Graph)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addGraph</h4>
<pre>public static&nbsp;&lt;V,E&gt;&nbsp;boolean&nbsp;addGraph(<a href="../../org/jgrapht/Graph.html" title="interface in org.jgrapht">Graph</a>&lt;? super V,? super E&gt;&nbsp;destination,
<a href="../../org/jgrapht/Graph.html" title="interface in org.jgrapht">Graph</a>&lt;V,E&gt;&nbsp;source)</pre>
<div class="block">Adds all the vertices and all the edges of the specified source graph to
the specified destination graph. First all vertices of the source graph
are added to the destination graph. Then every edge of the source graph
is added to the destination graph. This method returns <code>true</code>
if the destination graph has been modified as a result of this operation,
otherwise it returns <code>false</code>.
<p>The behavior of this operation is undefined if any of the specified
graphs is modified while operation is in progress.</p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>destination</code> - the graph to which vertices and edges are added.</dd><dd><code>source</code> - the graph used as source for vertices and edges to add.</dd>
<dt><span class="strong">Returns:</span></dt><dd><code>true</code> if and only if the destination graph has been
changed as a result of this operation.</dd></dl>
</li>
</ul>
<a name="addGraphReversed(org.jgrapht.DirectedGraph, org.jgrapht.DirectedGraph)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addGraphReversed</h4>
<pre>public static&nbsp;&lt;V,E&gt;&nbsp;void&nbsp;addGraphReversed(<a href="../../org/jgrapht/DirectedGraph.html" title="interface in org.jgrapht">DirectedGraph</a>&lt;? super V,? super E&gt;&nbsp;destination,
<a href="../../org/jgrapht/DirectedGraph.html" title="interface in org.jgrapht">DirectedGraph</a>&lt;V,E&gt;&nbsp;source)</pre>
<div class="block">Adds all the vertices and all the edges of the specified source digraph
to the specified destination digraph, reversing all of the edges. If you
want to do this as a linked view of the source graph (rather than by
copying to a destination graph), use <a href="../../org/jgrapht/graph/EdgeReversedGraph.html" title="class in org.jgrapht.graph"><code>EdgeReversedGraph</code></a> instead.
<p>The behavior of this operation is undefined if any of the specified
graphs is modified while operation is in progress.</p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>destination</code> - the graph to which vertices and edges are added.</dd><dd><code>source</code> - the graph used as source for vertices and edges to add.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../org/jgrapht/graph/EdgeReversedGraph.html" title="class in org.jgrapht.graph"><code>EdgeReversedGraph</code></a></dd></dl>
</li>
</ul>
<a name="addAllEdges(org.jgrapht.Graph, org.jgrapht.Graph, java.util.Collection)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addAllEdges</h4>
<pre>public static&nbsp;&lt;V,E&gt;&nbsp;boolean&nbsp;addAllEdges(<a href="../../org/jgrapht/Graph.html" title="interface in org.jgrapht">Graph</a>&lt;? super V,? super E&gt;&nbsp;destination,
<a href="../../org/jgrapht/Graph.html" title="interface in org.jgrapht">Graph</a>&lt;V,E&gt;&nbsp;source,
<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;? extends E&gt;&nbsp;edges)</pre>
<div class="block">Adds a subset of the edges of the specified source graph to the specified
destination graph. The behavior of this operation is undefined if either
of the graphs is modified while the operation is in progress. <a href="../../org/jgrapht/Graphs.html#addEdgeWithVertices(org.jgrapht.Graph,%20V,%20V)"><code>addEdgeWithVertices(org.jgrapht.Graph&lt;V, E&gt;, V, V)</code></a> is used for the transfer, so source vertexes will
be added automatically to the target graph.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>destination</code> - the graph to which edges are to be added</dd><dd><code>source</code> - the graph used as a source for edges to add</dd><dd><code>edges</code> - the edges to be added</dd>
<dt><span class="strong">Returns:</span></dt><dd><tt>true</tt> if this graph changed as a result of the call</dd></dl>
</li>
</ul>
<a name="addAllVertices(org.jgrapht.Graph, java.util.Collection)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addAllVertices</h4>
<pre>public static&nbsp;&lt;V,E&gt;&nbsp;boolean&nbsp;addAllVertices(<a href="../../org/jgrapht/Graph.html" title="interface in org.jgrapht">Graph</a>&lt;? super V,? super E&gt;&nbsp;destination,
<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;? extends V&gt;&nbsp;vertices)</pre>
<div class="block">Adds all of the specified vertices to the destination graph. The behavior
of this operation is undefined if the specified vertex collection is
modified while the operation is in progress. This method will invoke the
<a href="../../org/jgrapht/Graph.html#addVertex(V)"><code>Graph.addVertex(Object)</code></a> method.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>destination</code> - the graph to which edges are to be added</dd><dd><code>vertices</code> - the vertices to be added to the graph.</dd>
<dt><span class="strong">Returns:</span></dt><dd><tt>true</tt> if graph changed as a result of the call</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the specified vertices contains one or
more null vertices, or if the specified vertex collection is <tt>
null</tt>.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../org/jgrapht/Graph.html#addVertex(V)"><code>Graph.addVertex(Object)</code></a></dd></dl>
</li>
</ul>
<a name="neighborListOf(org.jgrapht.Graph,java.lang.Object)">
<!-- -->
</a><a name="neighborListOf(org.jgrapht.Graph, V)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>neighborListOf</h4>
<pre>public static&nbsp;&lt;V,E&gt;&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;V&gt;&nbsp;neighborListOf(<a href="../../org/jgrapht/Graph.html" title="interface in org.jgrapht">Graph</a>&lt;V,E&gt;&nbsp;g,
V&nbsp;vertex)</pre>
<div class="block">Returns a list of vertices that are the neighbors of a specified vertex.
If the graph is a multigraph vertices may appear more than once in the
returned list.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>g</code> - the graph to look for neighbors in.</dd><dd><code>vertex</code> - the vertex to get the neighbors of.</dd>
<dt><span class="strong">Returns:</span></dt><dd>a list of the vertices that are the neighbors of the specified
vertex.</dd></dl>
</li>
</ul>
<a name="predecessorListOf(org.jgrapht.DirectedGraph,java.lang.Object)">
<!-- -->
</a><a name="predecessorListOf(org.jgrapht.DirectedGraph, V)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>predecessorListOf</h4>
<pre>public static&nbsp;&lt;V,E&gt;&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;V&gt;&nbsp;predecessorListOf(<a href="../../org/jgrapht/DirectedGraph.html" title="interface in org.jgrapht">DirectedGraph</a>&lt;V,E&gt;&nbsp;g,
V&nbsp;vertex)</pre>
<div class="block">Returns a list of vertices that are the direct predecessors of a
specified vertex. If the graph is a multigraph, vertices may appear more
than once in the returned list.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>g</code> - the graph to look for predecessors in.</dd><dd><code>vertex</code> - the vertex to get the predecessors of.</dd>
<dt><span class="strong">Returns:</span></dt><dd>a list of the vertices that are the direct predecessors of the
specified vertex.</dd></dl>
</li>
</ul>
<a name="successorListOf(org.jgrapht.DirectedGraph,java.lang.Object)">
<!-- -->
</a><a name="successorListOf(org.jgrapht.DirectedGraph, V)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>successorListOf</h4>
<pre>public static&nbsp;&lt;V,E&gt;&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;V&gt;&nbsp;successorListOf(<a href="../../org/jgrapht/DirectedGraph.html" title="interface in org.jgrapht">DirectedGraph</a>&lt;V,E&gt;&nbsp;g,
V&nbsp;vertex)</pre>
<div class="block">Returns a list of vertices that are the direct successors of a specified
vertex. If the graph is a multigraph vertices may appear more than once
in the returned list.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>g</code> - the graph to look for successors in.</dd><dd><code>vertex</code> - the vertex to get the successors of.</dd>
<dt><span class="strong">Returns:</span></dt><dd>a list of the vertices that are the direct successors of the
specified vertex.</dd></dl>
</li>
</ul>
<a name="undirectedGraph(org.jgrapht.Graph)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>undirectedGraph</h4>
<pre>public static&nbsp;&lt;V,E&gt;&nbsp;<a href="../../org/jgrapht/UndirectedGraph.html" title="interface in org.jgrapht">UndirectedGraph</a>&lt;V,E&gt;&nbsp;undirectedGraph(<a href="../../org/jgrapht/Graph.html" title="interface in org.jgrapht">Graph</a>&lt;V,E&gt;&nbsp;g)</pre>
<div class="block">Returns an undirected view of the specified graph. If the specified graph
is directed, returns an undirected view of it. If the specified graph is
already undirected, just returns it.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>g</code> - the graph for which an undirected view is to be returned.</dd>
<dt><span class="strong">Returns:</span></dt><dd>an undirected view of the specified graph, if it is directed, or
or the specified graph itself if it is already undirected.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the graph is neither DirectedGraph
nor UndirectedGraph.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../org/jgrapht/graph/AsUndirectedGraph.html" title="class in org.jgrapht.graph"><code>AsUndirectedGraph</code></a></dd></dl>
</li>
</ul>
<a name="testIncidence(org.jgrapht.Graph,java.lang.Object,java.lang.Object)">
<!-- -->
</a><a name="testIncidence(org.jgrapht.Graph, E, V)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>testIncidence</h4>
<pre>public static&nbsp;&lt;V,E&gt;&nbsp;boolean&nbsp;testIncidence(<a href="../../org/jgrapht/Graph.html" title="interface in org.jgrapht">Graph</a>&lt;V,E&gt;&nbsp;g,
E&nbsp;e,
V&nbsp;v)</pre>
<div class="block">Tests whether an edge is incident to a vertex.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>g</code> - graph containing e and v</dd><dd><code>e</code> - edge in g</dd><dd><code>v</code> - vertex in g</dd>
<dt><span class="strong">Returns:</span></dt><dd>true iff e is incident on v</dd></dl>
</li>
</ul>
<a name="getOppositeVertex(org.jgrapht.Graph,java.lang.Object,java.lang.Object)">
<!-- -->
</a><a name="getOppositeVertex(org.jgrapht.Graph, E, V)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getOppositeVertex</h4>
<pre>public static&nbsp;&lt;V,E&gt;&nbsp;V&nbsp;getOppositeVertex(<a href="../../org/jgrapht/Graph.html" title="interface in org.jgrapht">Graph</a>&lt;V,E&gt;&nbsp;g,
E&nbsp;e,
V&nbsp;v)</pre>
<div class="block">Gets the vertex opposite another vertex across an edge.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>g</code> - graph containing e and v</dd><dd><code>e</code> - edge in g</dd><dd><code>v</code> - vertex in g</dd>
<dt><span class="strong">Returns:</span></dt><dd>vertex opposite to v across e</dd></dl>
</li>
</ul>
<a name="getPathVertexList(org.jgrapht.GraphPath)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getPathVertexList</h4>
<pre>public static&nbsp;&lt;V,E&gt;&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;V&gt;&nbsp;getPathVertexList(<a href="../../org/jgrapht/GraphPath.html" title="interface in org.jgrapht">GraphPath</a>&lt;V,E&gt;&nbsp;path)</pre>
<div class="block">Gets the list of vertices visited by a path.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>path</code> - path of interest</dd>
<dt><span class="strong">Returns:</span></dt><dd>corresponding vertex list</dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<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/Graphs.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>
<div class="subNav">
<ul class="navList">
<li><a href="../../org/jgrapht/GraphPath.html" title="interface in org.jgrapht"><span class="strong">Prev Class</span></a></li>
<li><a href="../../org/jgrapht/ListenableGraph.html" title="interface in org.jgrapht"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../index.html?org/jgrapht/Graphs.html" target="_top">Frames</a></li>
<li><a href="Graphs.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:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&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>Field&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>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2016. All rights reserved.</small></p>
</body>
</html>