* added a method where you can get all the marks * implemented and tested * moved main * changed README * builded JavaDoc * builded jar
1923 lines
137 KiB
HTML
1923 lines
137 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_144) on Fri Jun 21 23:35:56 CEST 2019 -->
|
|
<title>MatrixGraph</title>
|
|
<meta name="date" content="2019-06-21">
|
|
<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="MatrixGraph";
|
|
}
|
|
}
|
|
catch(err) {
|
|
}
|
|
//-->
|
|
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10,"i29":10,"i30":10,"i31":10,"i32":10,"i33":10,"i34":10,"i35":10,"i36":10,"i37":10,"i38":10,"i39":10,"i40":10,"i41":10,"i42":10,"i43":10,"i44":10,"i45":10,"i46":10,"i47":10,"i48":10,"i49":10};
|
|
var tabs = {65535:["t0","All 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/MatrixGraph.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-files/index-1.html">Index</a></li>
|
|
<li><a href="../../../../help-doc.html">Help</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="subNav">
|
|
<ul class="navList">
|
|
<li><a href="../../../../berack96/lib/graph/impl/MapGraph.html" title="class in berack96.lib.graph.impl"><span class="typeNameLink">Prev Class</span></a></li>
|
|
<li>Next Class</li>
|
|
</ul>
|
|
<ul class="navList">
|
|
<li><a href="../../../../index.html?berack96/lib/graph/impl/MatrixGraph.html" target="_top">Frames</a></li>
|
|
<li><a href="MatrixGraph.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>Field | </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>Field | </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">berack96.lib.graph.impl</div>
|
|
<h2 title="Class MatrixGraph" class="title">Class MatrixGraph<V,W extends java.lang.Number></h2>
|
|
</div>
|
|
<div class="contentContainer">
|
|
<ul class="inheritance">
|
|
<li>java.lang.Object</li>
|
|
<li>
|
|
<ul class="inheritance">
|
|
<li>berack96.lib.graph.impl.MatrixGraph<V,W></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<div class="description">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<dl>
|
|
<dt>All Implemented Interfaces:</dt>
|
|
<dd><a href="../../../../berack96/lib/graph/Graph.html" title="interface in berack96.lib.graph">Graph</a><V,W>, java.lang.Iterable<V></dd>
|
|
</dl>
|
|
<hr>
|
|
<br>
|
|
<pre>public class <span class="typeNameLabel">MatrixGraph<V,W extends java.lang.Number></span>
|
|
extends java.lang.Object
|
|
implements <a href="../../../../berack96/lib/graph/Graph.html" title="interface in berack96.lib.graph">Graph</a><V,W></pre>
|
|
</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>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="fields.inherited.from.class.berack96.lib.graph.Graph">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Fields inherited from interface berack96.lib.graph.<a href="../../../../berack96/lib/graph/Graph.html" title="interface in berack96.lib.graph">Graph</a></h3>
|
|
<code><a href="../../../../berack96/lib/graph/Graph.html#GSON">GSON</a>, <a href="../../../../berack96/lib/graph/Graph.html#NOT_CONNECTED">NOT_CONNECTED</a>, <a href="../../../../berack96/lib/graph/Graph.html#NOT_DAG">NOT_DAG</a>, <a href="../../../../berack96/lib/graph/Graph.html#PARAM_NULL">PARAM_NULL</a>, <a href="../../../../berack96/lib/graph/Graph.html#VERTEX_NOT_CONTAINED">VERTEX_NOT_CONTAINED</a></code></li>
|
|
</ul>
|
|
</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="colOne" scope="col">Constructor and Description</th>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../berack96/lib/graph/impl/MatrixGraph.html#MatrixGraph--">MatrixGraph</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="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>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../berack96/lib/graph/impl/MatrixGraph.html#addAllEdges-java.util.Collection-">addAllEdges</a></span>(java.util.Collection<<a href="../../../../berack96/lib/graph/Edge.html" title="class in berack96.lib.graph">Edge</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a>>> edges)</code>
|
|
<div class="block">Add all the edges of the collection to the graph.<br>
|
|
If one of the two, or both vertices aren't contained in the graph, then the vertices will be added.<br>
|
|
Any null edges will be ignored.<br>
|
|
This method will overwrite any existing edge between the two vertex.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i1" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../berack96/lib/graph/impl/MatrixGraph.html#addAllVertices-java.util.Collection-">addAllVertices</a></span>(java.util.Collection<<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>> vertices)</code>
|
|
<div class="block">Add all the vertices contained in the collection to the graph.<br>
|
|
If a vertex is contained in the collection and in the graph is ignored and it will not be replaced.<br>
|
|
Null vertices will be ignored and they will not be added to the graph.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i2" class="altColor">
|
|
<td class="colFirst"><code><a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../berack96/lib/graph/impl/MatrixGraph.html#addEdge-berack96.lib.graph.Edge-">addEdge</a></span>(<a href="../../../../berack96/lib/graph/Edge.html" title="class in berack96.lib.graph">Edge</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a>> edge)</code>
|
|
<div class="block">Add an edge between the two vertex.<br>
|
|
The edge will be created from the vertex source of the edge and the vertex destination of it<br>
|
|
This method will overwrite any existing edge between the two vertex.<br>
|
|
If there was a previous edge then it is returned</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i3" class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../berack96/lib/graph/impl/MatrixGraph.html#addEdge-V-V-W-">addEdge</a></span>(<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> vertex1,
|
|
<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> vertex2,
|
|
<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a> weight)</code>
|
|
<div class="block">Add an edge between the two vertex.<br>
|
|
The edge will be created from the vertex V1 and the vertex V2<br>
|
|
This method will overwrite any existing edge between the two vertex.<br>
|
|
If there was a previous edge then it is returned</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i4" class="altColor">
|
|
<td class="colFirst"><code><a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../berack96/lib/graph/impl/MatrixGraph.html#addEdgeAndVertices-berack96.lib.graph.Edge-">addEdgeAndVertices</a></span>(<a href="../../../../berack96/lib/graph/Edge.html" title="class in berack96.lib.graph">Edge</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a>> edge)</code>
|
|
<div class="block">This particular function add an edge to the graph.<br>
|
|
If one of the two, or both vertices of the edge aren't contained in the graph, then the vertices will be added.<br>
|
|
The edge will be created from the vertex source of the edge and the vertex destination of it<br>
|
|
This method will overwrite any existing edge between the two vertex.<br>
|
|
If there was a previous edge then it is returned</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i5" class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../berack96/lib/graph/impl/MatrixGraph.html#addEdgeAndVertices-V-V-W-">addEdgeAndVertices</a></span>(<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> vertex1,
|
|
<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> vertex2,
|
|
<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a> weight)</code>
|
|
<div class="block">This particular function add an edge to the graph.<br>
|
|
If one of the two, or both vertices aren't contained in the graph, then the vertices will be added.<br>
|
|
The edge will be created from the vertex V1 and the vertex V2<br>
|
|
This method will overwrite any existing edge between the two vertex.<br>
|
|
If there was a previous edge then it is returned</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i6" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../berack96/lib/graph/impl/MatrixGraph.html#addVertex-V-">addVertex</a></span>(<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> vertex)</code>
|
|
<div class="block">Add the vertex to the graph.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i7" class="rowColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../berack96/lib/graph/impl/MatrixGraph.html#addVertexIfAbsent-V-">addVertexIfAbsent</a></span>(<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> vertex)</code>
|
|
<div class="block">Add the specified vertex to the graph only if the graph doesn't contains it.<br>
|
|
The graph contains a vertex only if the method <a href="../../../../berack96/lib/graph/Graph.html#contains-V-"><code>Graph.contains(Object)</code></a> returns true.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i8" class="altColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../berack96/lib/graph/impl/MatrixGraph.html#contains-V-">contains</a></span>(<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> vertex)</code>
|
|
<div class="block">Check if the vertex passed is contained in the graph or not.<br>
|
|
The vertex V1 is contained in the graph G, if and only if:<br>
|
|
exist V2 in G such that V2.equals(V1)</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i9" class="rowColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../berack96/lib/graph/impl/MatrixGraph.html#containsEdge-V-V-">containsEdge</a></span>(<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> vertex1,
|
|
<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> vertex2)</code>
|
|
<div class="block">Check if the edge between the two vertex passed is contained in the graph or not.<br>
|
|
An edge between V1 and V2 is contained in the graph if and only if i can travel from V1 to V2.<br>
|
|
If one of the two vertices is not contained in the graph, then even the edge isn't</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i10" class="altColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../berack96/lib/graph/impl/MatrixGraph.html#degree-V-">degree</a></span>(<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> vertex)</code>
|
|
<div class="block">Tells the degree of a vertex.<br>
|
|
The degree of a vertex is the quantity of edges that have.<br>
|
|
Basically, it'll count how many edge it have.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i11" class="rowColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../berack96/lib/graph/impl/MatrixGraph.html#degreeIn-V-">degreeIn</a></span>(<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> vertex)</code>
|
|
<div class="block">Tells the degree of all the edges that goes to this vertex.<br>
|
|
Basically, it'll count how many edge towards himself it have.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i12" class="altColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../berack96/lib/graph/impl/MatrixGraph.html#degreeOut-V-">degreeOut</a></span>(<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> vertex)</code>
|
|
<div class="block">Tells the degree of all the edges that goes form this vertex to others.<br>
|
|
Basically, it'll count how many edge towards any other vertex it have.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i13" class="rowColor">
|
|
<td class="colFirst"><code>java.util.Map<<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,java.util.List<<a href="../../../../berack96/lib/graph/Edge.html" title="class in berack96.lib.graph">Edge</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a>>>></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../berack96/lib/graph/impl/MatrixGraph.html#distance-V-">distance</a></span>(<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> source)</code>
|
|
<div class="block">Get the minimum path from the source vertex to all the possible reachable vertices.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i14" class="altColor">
|
|
<td class="colFirst"><code>java.util.List<<a href="../../../../berack96/lib/graph/Edge.html" title="class in berack96.lib.graph">Edge</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a>>></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../berack96/lib/graph/impl/MatrixGraph.html#distance-V-V-">distance</a></span>(<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> source,
|
|
<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> destination)</code>
|
|
<div class="block">Get the minimum path from the source vertex to the destination vertex.<br>
|
|
If the source vertex can't reach the destination, then an exception is thrown.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i15" class="rowColor">
|
|
<td class="colFirst"><code>java.util.Collection<<a href="../../../../berack96/lib/graph/Edge.html" title="class in berack96.lib.graph">Edge</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a>>></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../berack96/lib/graph/impl/MatrixGraph.html#edges--">edges</a></span>()</code>
|
|
<div class="block">Get all the edges in the graph.<br>
|
|
If the graph doesn't contains edges, it'll return an empty collection.<br>
|
|
Note: depending on the implementation, modifying the returned collection<br>
|
|
could affect the graph behavior and the changes could be reflected to the graph.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i16" class="altColor">
|
|
<td class="colFirst"><code>java.util.Collection<<a href="../../../../berack96/lib/graph/Edge.html" title="class in berack96.lib.graph">Edge</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a>>></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../berack96/lib/graph/impl/MatrixGraph.html#edgesOf-V-">edgesOf</a></span>(<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> vertex)</code>
|
|
<div class="block">Retrieve all the edges of a particular vertex.<br>
|
|
Note: the edges that are returned are the one that goes IN this vertex AND the edges that goes OUT of it.<br>
|
|
Note2: depending on the implementation, modifying the returned collection<br>
|
|
could affect the graph behavior and the changes could be reflected to the graph.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i17" class="rowColor">
|
|
<td class="colFirst"><code>java.util.Collection<<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../berack96/lib/graph/impl/MatrixGraph.html#getAncestors-V-">getAncestors</a></span>(<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> vertex)</code>
|
|
<div class="block">Get all the vertices that have the vertex passed as their child.<br>
|
|
Basically is the opposite of <a href="../../../../berack96/lib/graph/Graph.html#getChildren-V-"><code>Graph.getChildren(Object)</code></a><br>
|
|
Note: depending on the implementation, modifying the returned collection<br>
|
|
could affect the graph behavior and the changes could be reflected to the graph.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i18" class="altColor">
|
|
<td class="colFirst"><code>java.util.Collection<<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../berack96/lib/graph/impl/MatrixGraph.html#getChildren-V-">getChildren</a></span>(<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> vertex)</code>
|
|
<div class="block">Get all the vertices that are children of the vertex passed as parameter.<br>
|
|
The vertices V(0-N) that are 'children' of a vertex V1, are all the vertices that have an edge
|
|
where V1 is the source of that edge.<br>
|
|
Note: depending on the implementation, modifying the returned collection<br>
|
|
could affect the graph behavior and the changes could be reflected to the graph.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i19" class="rowColor">
|
|
<td class="colFirst"><code>java.util.Collection<<a href="../../../../berack96/lib/graph/Edge.html" title="class in berack96.lib.graph">Edge</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a>>></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../berack96/lib/graph/impl/MatrixGraph.html#getEdgesIn-V-">getEdgesIn</a></span>(<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> vertex)</code>
|
|
<div class="block">Retrieve all the edges of a particular vertex.<br>
|
|
Note: the edges that are returned are the one that have this vertex as destination and another as source.<br>
|
|
Note2: depending on the implementation, modifying the returned collection<br>
|
|
could affect the graph behavior and the changes could be reflected to the graph.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i20" class="altColor">
|
|
<td class="colFirst"><code>java.util.Collection<<a href="../../../../berack96/lib/graph/Edge.html" title="class in berack96.lib.graph">Edge</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a>>></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../berack96/lib/graph/impl/MatrixGraph.html#getEdgesOut-V-">getEdgesOut</a></span>(<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> vertex)</code>
|
|
<div class="block">Retrieve all the edges that goes OUT of a particular vertex.<br>
|
|
Note: the edges that are returned are the one that have this vertex as source and another one as destination.<br>
|
|
Note2: depending on the implementation, modifying the returned collection<br>
|
|
could affect the graph behavior and the changes could be reflected to the graph.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i21" class="rowColor">
|
|
<td class="colFirst"><code>java.util.Collection<<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../berack96/lib/graph/impl/MatrixGraph.html#getMarkedWith-java.lang.Object-">getMarkedWith</a></span>(java.lang.Object mark)</code>
|
|
<div class="block">Get all the vertices that are marked with the specific mark passed.<br>
|
|
If there aren't vertices with that mark then it is returned an empty set.<br>
|
|
Note: depending on the implementation, modifying the returned collection<br>
|
|
could affect the graph behavior and the changes could be reflected to the graph.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i22" class="altColor">
|
|
<td class="colFirst"><code>java.util.Collection<java.lang.Object></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../berack96/lib/graph/impl/MatrixGraph.html#getMarks-V-">getMarks</a></span>(<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> vertex)</code>
|
|
<div class="block">Get all the marker of this vertex.<br>
|
|
If the vertex doesn't have any mark, then it will return an empty set.<br>
|
|
Note: depending on the implementation, modifying the returned collection<br>
|
|
could affect the graph behavior and the changes could be reflected to the graph.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i23" class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../../berack96/lib/graph/Vertex.html" title="class in berack96.lib.graph">Vertex</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../berack96/lib/graph/impl/MatrixGraph.html#getVertex-V-">getVertex</a></span>(<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> vertex)</code>
|
|
<div class="block">Get an instance of the vertex linked with this graph.<br>
|
|
For more info see <a href="../../../../berack96/lib/graph/Vertex.html" title="class in berack96.lib.graph"><code>Vertex</code></a></div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i24" class="altColor">
|
|
<td class="colFirst"><code><a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../berack96/lib/graph/impl/MatrixGraph.html#getWeight-V-V-">getWeight</a></span>(<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> vertex1,
|
|
<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> vertex2)</code>
|
|
<div class="block">Get the weight of the selected edge.<br>
|
|
If the edge doesn't exist, then null is returned</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i25" class="rowColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../berack96/lib/graph/impl/MatrixGraph.html#isCyclic--">isCyclic</a></span>()</code>
|
|
<div class="block">Tells if the graph has some cycle.<br>
|
|
A cycle is detected if visiting the graph G starting from V1 (that is any of the vertex of G),
|
|
the visit can return to V1 in any point.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i26" class="altColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../berack96/lib/graph/impl/MatrixGraph.html#isDAG--">isDAG</a></span>()</code>
|
|
<div class="block">Tells if the graph has the property of DAG (Directed Acyclic Graph).<br>
|
|
A graph is a DAG only if absent of any cycle.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i27" class="rowColor">
|
|
<td class="colFirst"><code>java.util.Iterator<<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../berack96/lib/graph/impl/MatrixGraph.html#iterator--">iterator</a></span>()</code> </td>
|
|
</tr>
|
|
<tr id="i28" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../berack96/lib/graph/impl/MatrixGraph.html#mark-V-java.lang.Object-">mark</a></span>(<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> vertex,
|
|
java.lang.Object mark)</code>
|
|
<div class="block">Add to the specified vertex the mark passed.<br>
|
|
A vertex can have multiple marker.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i29" class="rowColor">
|
|
<td class="colFirst"><code>java.util.Collection<java.lang.Object></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../berack96/lib/graph/impl/MatrixGraph.html#marks--">marks</a></span>()</code>
|
|
<div class="block">Get all the marks of this graph.<br>
|
|
Specifically it will return a collection of marks where every mark<br>
|
|
as associated at least one vertex of the graph.<br>
|
|
If the graph doesn't have vertex marked then it is returned an empty collection.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i30" class="altColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../berack96/lib/graph/impl/MatrixGraph.html#numberOfEdges--">numberOfEdges</a></span>()</code>
|
|
<div class="block">Tells how many edges are in the graph.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i31" class="rowColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../berack96/lib/graph/impl/MatrixGraph.html#numberOfVertices--">numberOfVertices</a></span>()</code>
|
|
<div class="block">Tells how many vertices are in the graph.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i32" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../berack96/lib/graph/impl/MatrixGraph.html#removeAllEdge--">removeAllEdge</a></span>()</code>
|
|
<div class="block">Remove all the edges of the graph.<br>
|
|
After this method's call the graph will have only vertices, and no edge.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i33" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../berack96/lib/graph/impl/MatrixGraph.html#removeAllEdge-V-">removeAllEdge</a></span>(<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> vertex)</code>
|
|
<div class="block">Remove all edges form a particular vertex of the graph.<br>
|
|
After this method's call the selected vertex will have 0 edges.<br>
|
|
It will be no longer possible to reach this vertex from any other vertex, and vice versa.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i34" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../berack96/lib/graph/impl/MatrixGraph.html#removeAllInEdge-V-">removeAllInEdge</a></span>(<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> vertex)</code>
|
|
<div class="block">Remove all the edges that goes in the vertex.<br>
|
|
After this method's call it will be no longer possible travel to this vertex.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i35" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../berack96/lib/graph/impl/MatrixGraph.html#removeAllOutEdge-V-">removeAllOutEdge</a></span>(<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> vertex)</code>
|
|
<div class="block">Remove all the edges that start from this vertex.<br>
|
|
After this method's call it will be no longer possible travel to any vertex from this one.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i36" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../berack96/lib/graph/impl/MatrixGraph.html#removeAllVertex--">removeAllVertex</a></span>()</code>
|
|
<div class="block">Remove all the vertex contained in the graph.<br>
|
|
After this method's call the graph will be empty; no vertices nor edges.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i37" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../berack96/lib/graph/impl/MatrixGraph.html#removeEdge-V-V-">removeEdge</a></span>(<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> vertex1,
|
|
<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> vertex2)</code>
|
|
<div class="block">Remove the edge between the two vertex.<br>
|
|
If the edge doesn't exist, then this call does nothing.<br>
|
|
After this method's call it will be no longer possible to travel from V1 to V2, nether from V2 to V1.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i38" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../berack96/lib/graph/impl/MatrixGraph.html#removeVertex-V-">removeVertex</a></span>(<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> vertex)</code>
|
|
<div class="block">Remove the selected vertex from the graph.<br>
|
|
After this method's call the vertex will be no longer present in the graph, and nether all his edges.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i39" class="rowColor">
|
|
<td class="colFirst"><code>java.util.Collection<java.util.Collection<<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>>></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../berack96/lib/graph/impl/MatrixGraph.html#stronglyConnectedComponents--">stronglyConnectedComponents</a></span>()</code>
|
|
<div class="block">The strongly connected components or disconnected components of an arbitrary directed graph
|
|
form a partition into subgraphs that are themselves strongly connected.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i40" class="altColor">
|
|
<td class="colFirst"><code><a href="../../../../berack96/lib/graph/Graph.html" title="interface in berack96.lib.graph">Graph</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a>></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../berack96/lib/graph/impl/MatrixGraph.html#subGraph-java.lang.Object...-">subGraph</a></span>(java.lang.Object... marker)</code>
|
|
<div class="block">Get a sub-graph of the current one with only the vertex marked with the selected markers.<br>
|
|
Each vertex will have all his edges, but only the ones with the destination marked with the same marker.<br>
|
|
If the marker is not specified or is null then the returning graph will have all the vertices that are not marked by any marker.<br>
|
|
If the graph doesn't contain any vertex with that marker then an empty graph is returned.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i41" class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../../berack96/lib/graph/Graph.html" title="interface in berack96.lib.graph">Graph</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a>></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../berack96/lib/graph/impl/MatrixGraph.html#subGraph-V-int-">subGraph</a></span>(<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> source,
|
|
int depth)</code>
|
|
<div class="block">Get a sub-graph of the current one based on the maximum depth that is given.<br>
|
|
If the depth is 1 then only the source and it's children will be in the sub-graph.<br>
|
|
If the depth is 2 then only the source, it's children and it's children of it's children will be in the sub-graph.<br>
|
|
And so on.<br>
|
|
Of course the sub-graph will contain the edges that link the vertices, but only the one selected.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i42" class="altColor">
|
|
<td class="colFirst"><code>java.util.List<<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../berack96/lib/graph/impl/MatrixGraph.html#topologicalSort--">topologicalSort</a></span>()</code>
|
|
<div class="block">If the current graph is a DAG, it returns a topological sort of this graph.<br>
|
|
A topological ordering of a graph is a linear ordering of its vertices such that for
|
|
every directed edge (V1, V2) from vertex V1 to vertex V2, V2 comes before V1 in the ordering.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i43" class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../../berack96/lib/graph/Graph.html" title="interface in berack96.lib.graph">Graph</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a>></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../berack96/lib/graph/impl/MatrixGraph.html#transpose--">transpose</a></span>()</code>
|
|
<div class="block">This method will create a new Graph that is the transposed version of the original.<br>
|
|
At the end of this method the new graph will have all the edges inverted in orientation.<br>
|
|
Example: if the graph G contains (V1, V2, V3) as vertex, and (V1->V2, V3->V2) as edges,
|
|
the transpose graph G' will contain (V1, V2, V3) as vertex, and (V2->V1, V2->V3) as edges.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i44" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../berack96/lib/graph/impl/MatrixGraph.html#unMark-V-">unMark</a></span>(<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> vertex)</code>
|
|
<div class="block">Unmark the vertex selected.<br>
|
|
After this call the vertex will not have any marked object to himself.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i45" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../berack96/lib/graph/impl/MatrixGraph.html#unMark-V-java.lang.Object-">unMark</a></span>(<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> vertex,
|
|
java.lang.Object mark)</code>
|
|
<div class="block">Remove the selected mark from the vertex.<br></div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i46" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../berack96/lib/graph/impl/MatrixGraph.html#unMarkAll--">unMarkAll</a></span>()</code>
|
|
<div class="block">Remove all the marker to all the vertex.<br>
|
|
After this call the <a href="../../../../berack96/lib/graph/Graph.html#getMarks-V-"><code>Graph.getMarks(Object)</code></a> applied to any vertex will return an empty set</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i47" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../berack96/lib/graph/impl/MatrixGraph.html#unMarkAll-java.lang.Object-">unMarkAll</a></span>(java.lang.Object mark)</code>
|
|
<div class="block">Remove the selected mark from all the vertices</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i48" class="altColor">
|
|
<td class="colFirst"><code>java.util.Collection<<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../berack96/lib/graph/impl/MatrixGraph.html#vertices--">vertices</a></span>()</code>
|
|
<div class="block">Get all the vertices in the graph.<br>
|
|
If the graph doesn't contains vertices, it'll return an empty collection.<br>
|
|
Note: depending on the implementation, modifying the returned collection<br>
|
|
could affect the graph behavior and the changes could be reflected to the graph.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i49" class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../../berack96/lib/graph/visit/impl/VisitInfo.html" title="class in berack96.lib.graph.visit.impl">VisitInfo</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../berack96/lib/graph/impl/MatrixGraph.html#visit-V-berack96.lib.graph.visit.VisitStrategy-java.util.function.Consumer-">visit</a></span>(<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> source,
|
|
<a href="../../../../berack96/lib/graph/visit/VisitStrategy.html" title="interface in berack96.lib.graph.visit">VisitStrategy</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a>> strategy,
|
|
java.util.function.Consumer<<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>> visit)</code>
|
|
<div class="block">Visit the graph accordingly to the strategy that is passed.<br>
|
|
This method visit the graph from the source to all the vertex that are reachable form the source.<br>
|
|
Some strategy can accept a source vertex null, because they visit all the graph anyway.</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.Object</h3>
|
|
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
|
|
</ul>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="methods.inherited.from.class.berack96.lib.graph.Graph">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Methods inherited from interface berack96.lib.graph.<a href="../../../../berack96/lib/graph/Graph.html" title="interface in berack96.lib.graph">Graph</a></h3>
|
|
<code><a href="../../../../berack96/lib/graph/Graph.html#load-berack96.lib.graph.Graph-java.lang.String-java.lang.Class-java.lang.Class-">load</a>, <a href="../../../../berack96/lib/graph/Graph.html#save-berack96.lib.graph.Graph-java.lang.String-">save</a>, <a href="../../../../berack96/lib/graph/Graph.html#save-berack96.lib.graph.Graph-java.lang.String-java.lang.String-">save</a></code></li>
|
|
</ul>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Iterable">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Methods inherited from interface java.lang.Iterable</h3>
|
|
<code>forEach, spliterator</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="MatrixGraph--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>MatrixGraph</h4>
|
|
<pre>public MatrixGraph()</pre>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<!-- ============ METHOD DETAIL ========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="method.detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Detail</h3>
|
|
<a name="iterator--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>iterator</h4>
|
|
<pre>public java.util.Iterator<<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>> iterator()</pre>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code>iterator</code> in interface <code>java.lang.Iterable<<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>></code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="isCyclic--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>isCyclic</h4>
|
|
<pre>public boolean isCyclic()</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../berack96/lib/graph/Graph.html#isCyclic--">Graph</a></code></span></div>
|
|
<div class="block">Tells if the graph has some cycle.<br>
|
|
A cycle is detected if visiting the graph G starting from V1 (that is any of the vertex of G),
|
|
the visit can return to V1 in any point.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../berack96/lib/graph/Graph.html#isCyclic--">isCyclic</a></code> in interface <code><a href="../../../../berack96/lib/graph/Graph.html" title="interface in berack96.lib.graph">Graph</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a> extends java.lang.Number></code></dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>true if has cycle, false otherwise</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="isDAG--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>isDAG</h4>
|
|
<pre>public boolean isDAG()</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../berack96/lib/graph/Graph.html#isDAG--">Graph</a></code></span></div>
|
|
<div class="block">Tells if the graph has the property of DAG (Directed Acyclic Graph).<br>
|
|
A graph is a DAG only if absent of any cycle. ( see <a href="../../../../berack96/lib/graph/Graph.html#isCyclic--"><code>Graph.isCyclic()</code></a> )</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../berack96/lib/graph/Graph.html#isDAG--">isDAG</a></code> in interface <code><a href="../../../../berack96/lib/graph/Graph.html" title="interface in berack96.lib.graph">Graph</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a> extends java.lang.Number></code></dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>true if is a DAG, false otherwise</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getVertex-java.lang.Object-">
|
|
<!-- -->
|
|
</a><a name="getVertex-V-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getVertex</h4>
|
|
<pre>public <a href="../../../../berack96/lib/graph/Vertex.html" title="class in berack96.lib.graph">Vertex</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>> getVertex(<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> vertex)
|
|
throws java.lang.NullPointerException,
|
|
java.lang.IllegalArgumentException</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../berack96/lib/graph/Graph.html#getVertex-V-">Graph</a></code></span></div>
|
|
<div class="block">Get an instance of the vertex linked with this graph.<br>
|
|
For more info see <a href="../../../../berack96/lib/graph/Vertex.html" title="class in berack96.lib.graph"><code>Vertex</code></a></div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../berack96/lib/graph/Graph.html#getVertex-V-">getVertex</a></code> in interface <code><a href="../../../../berack96/lib/graph/Graph.html" title="interface in berack96.lib.graph">Graph</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a> extends java.lang.Number></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>vertex</code> - the vertex</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>a vertex</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code>java.lang.NullPointerException</code> - if the vertex is null</dd>
|
|
<dd><code>java.lang.IllegalArgumentException</code> - if the vertex is not contained in the graph</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="addVertex-java.lang.Object-">
|
|
<!-- -->
|
|
</a><a name="addVertex-V-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>addVertex</h4>
|
|
<pre>public void addVertex(<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> vertex)
|
|
throws java.lang.NullPointerException</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../berack96/lib/graph/Graph.html#addVertex-V-">Graph</a></code></span></div>
|
|
<div class="block">Add the vertex to the graph. If it's already in the graph it will be replaced.<br>
|
|
Of course the vertex added will have no edge to any other vertex nor form any other vertex.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../berack96/lib/graph/Graph.html#addVertex-V-">addVertex</a></code> in interface <code><a href="../../../../berack96/lib/graph/Graph.html" title="interface in berack96.lib.graph">Graph</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a> extends java.lang.Number></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>vertex</code> - the vertex to add</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code>java.lang.NullPointerException</code> - if the vertex is null</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="addVertexIfAbsent-java.lang.Object-">
|
|
<!-- -->
|
|
</a><a name="addVertexIfAbsent-V-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>addVertexIfAbsent</h4>
|
|
<pre>public boolean addVertexIfAbsent(<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> vertex)
|
|
throws java.lang.NullPointerException</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../berack96/lib/graph/Graph.html#addVertexIfAbsent-V-">Graph</a></code></span></div>
|
|
<div class="block">Add the specified vertex to the graph only if the graph doesn't contains it.<br>
|
|
The graph contains a vertex only if the method <a href="../../../../berack96/lib/graph/Graph.html#contains-V-"><code>Graph.contains(Object)</code></a> returns true.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../berack96/lib/graph/Graph.html#addVertexIfAbsent-V-">addVertexIfAbsent</a></code> in interface <code><a href="../../../../berack96/lib/graph/Graph.html" title="interface in berack96.lib.graph">Graph</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a> extends java.lang.Number></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>vertex</code> - the vertex to add</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>true if the vertex is added, false if the graph contains the vertex and therefore the new one is not added</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code>java.lang.NullPointerException</code> - if the vertex is null</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="addAllVertices-java.util.Collection-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>addAllVertices</h4>
|
|
<pre>public void addAllVertices(java.util.Collection<<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>> vertices)
|
|
throws java.lang.NullPointerException</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../berack96/lib/graph/Graph.html#addAllVertices-java.util.Collection-">Graph</a></code></span></div>
|
|
<div class="block">Add all the vertices contained in the collection to the graph.<br>
|
|
If a vertex is contained in the collection and in the graph is ignored and it will not be replaced.<br>
|
|
Null vertices will be ignored and they will not be added to the graph.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../berack96/lib/graph/Graph.html#addAllVertices-java.util.Collection-">addAllVertices</a></code> in interface <code><a href="../../../../berack96/lib/graph/Graph.html" title="interface in berack96.lib.graph">Graph</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a> extends java.lang.Number></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>vertices</code> - a collection of the vertices to add</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code>java.lang.NullPointerException</code> - if the set is null</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="removeVertex-java.lang.Object-">
|
|
<!-- -->
|
|
</a><a name="removeVertex-V-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>removeVertex</h4>
|
|
<pre>public void removeVertex(<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> vertex)
|
|
throws java.lang.NullPointerException,
|
|
java.lang.IllegalArgumentException</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../berack96/lib/graph/Graph.html#removeVertex-V-">Graph</a></code></span></div>
|
|
<div class="block">Remove the selected vertex from the graph.<br>
|
|
After this method's call the vertex will be no longer present in the graph, and nether all his edges.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../berack96/lib/graph/Graph.html#removeVertex-V-">removeVertex</a></code> in interface <code><a href="../../../../berack96/lib/graph/Graph.html" title="interface in berack96.lib.graph">Graph</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a> extends java.lang.Number></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>vertex</code> - the vertex to remove</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code>java.lang.NullPointerException</code> - if the vertex is null</dd>
|
|
<dd><code>java.lang.IllegalArgumentException</code> - if the vertex is not contained</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="removeAllVertex--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>removeAllVertex</h4>
|
|
<pre>public void removeAllVertex()</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../berack96/lib/graph/Graph.html#removeAllVertex--">Graph</a></code></span></div>
|
|
<div class="block">Remove all the vertex contained in the graph.<br>
|
|
After this method's call the graph will be empty; no vertices nor edges.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../berack96/lib/graph/Graph.html#removeAllVertex--">removeAllVertex</a></code> in interface <code><a href="../../../../berack96/lib/graph/Graph.html" title="interface in berack96.lib.graph">Graph</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a> extends java.lang.Number></code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="contains-java.lang.Object-">
|
|
<!-- -->
|
|
</a><a name="contains-V-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>contains</h4>
|
|
<pre>public boolean contains(<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> vertex)
|
|
throws java.lang.NullPointerException</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../berack96/lib/graph/Graph.html#contains-V-">Graph</a></code></span></div>
|
|
<div class="block">Check if the vertex passed is contained in the graph or not.<br>
|
|
The vertex V1 is contained in the graph G, if and only if:<br>
|
|
exist V2 in G such that V2.equals(V1)</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../berack96/lib/graph/Graph.html#contains-V-">contains</a></code> in interface <code><a href="../../../../berack96/lib/graph/Graph.html" title="interface in berack96.lib.graph">Graph</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a> extends java.lang.Number></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>vertex</code> - the vertex to check</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>true if the vertex is contained, false otherwise</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code>java.lang.NullPointerException</code> - if the vertex is null</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="marks--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>marks</h4>
|
|
<pre>public java.util.Collection<java.lang.Object> marks()</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../berack96/lib/graph/Graph.html#marks--">Graph</a></code></span></div>
|
|
<div class="block">Get all the marks of this graph.<br>
|
|
Specifically it will return a collection of marks where every mark<br>
|
|
as associated at least one vertex of the graph.<br>
|
|
If the graph doesn't have vertex marked then it is returned an empty collection.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../berack96/lib/graph/Graph.html#marks--">marks</a></code> in interface <code><a href="../../../../berack96/lib/graph/Graph.html" title="interface in berack96.lib.graph">Graph</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a> extends java.lang.Number></code></dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>a collection of marks</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="mark-java.lang.Object-java.lang.Object-">
|
|
<!-- -->
|
|
</a><a name="mark-V-java.lang.Object-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>mark</h4>
|
|
<pre>public void mark(<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> vertex,
|
|
java.lang.Object mark)
|
|
throws java.lang.NullPointerException,
|
|
java.lang.IllegalArgumentException</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../berack96/lib/graph/Graph.html#mark-V-java.lang.Object-">Graph</a></code></span></div>
|
|
<div class="block">Add to the specified vertex the mark passed.<br>
|
|
A vertex can have multiple marker.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../berack96/lib/graph/Graph.html#mark-V-java.lang.Object-">mark</a></code> in interface <code><a href="../../../../berack96/lib/graph/Graph.html" title="interface in berack96.lib.graph">Graph</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a> extends java.lang.Number></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>vertex</code> - the vertex to mark</dd>
|
|
<dd><code>mark</code> - the mark to add</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code>java.lang.NullPointerException</code> - if one of the param is null</dd>
|
|
<dd><code>java.lang.IllegalArgumentException</code> - if the vertex is not contained in the graph</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="unMark-java.lang.Object-java.lang.Object-">
|
|
<!-- -->
|
|
</a><a name="unMark-V-java.lang.Object-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>unMark</h4>
|
|
<pre>public void unMark(<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> vertex,
|
|
java.lang.Object mark)
|
|
throws java.lang.NullPointerException,
|
|
java.lang.IllegalArgumentException</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../berack96/lib/graph/Graph.html#unMark-V-java.lang.Object-">Graph</a></code></span></div>
|
|
<div class="block">Remove the selected mark from the vertex.<br></div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../berack96/lib/graph/Graph.html#unMark-V-java.lang.Object-">unMark</a></code> in interface <code><a href="../../../../berack96/lib/graph/Graph.html" title="interface in berack96.lib.graph">Graph</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a> extends java.lang.Number></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>vertex</code> - the vertex where remove the mark</dd>
|
|
<dd><code>mark</code> - the mark to remove</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code>java.lang.NullPointerException</code> - if a param is null</dd>
|
|
<dd><code>java.lang.IllegalArgumentException</code> - if the vertex is not contained in the graph</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="unMark-java.lang.Object-">
|
|
<!-- -->
|
|
</a><a name="unMark-V-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>unMark</h4>
|
|
<pre>public void unMark(<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> vertex)
|
|
throws java.lang.NullPointerException,
|
|
java.lang.IllegalArgumentException</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../berack96/lib/graph/Graph.html#unMark-V-">Graph</a></code></span></div>
|
|
<div class="block">Unmark the vertex selected.<br>
|
|
After this call the vertex will not have any marked object to himself.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../berack96/lib/graph/Graph.html#unMark-V-">unMark</a></code> in interface <code><a href="../../../../berack96/lib/graph/Graph.html" title="interface in berack96.lib.graph">Graph</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a> extends java.lang.Number></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>vertex</code> - the vertex</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code>java.lang.NullPointerException</code> - if the vertex is null</dd>
|
|
<dd><code>java.lang.IllegalArgumentException</code> - if the vertex is not contained in the graph</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getMarkedWith-java.lang.Object-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getMarkedWith</h4>
|
|
<pre>public java.util.Collection<<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>> getMarkedWith(java.lang.Object mark)
|
|
throws java.lang.NullPointerException</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../berack96/lib/graph/Graph.html#getMarkedWith-java.lang.Object-">Graph</a></code></span></div>
|
|
<div class="block">Get all the vertices that are marked with the specific mark passed.<br>
|
|
If there aren't vertices with that mark then it is returned an empty set.<br>
|
|
Note: depending on the implementation, modifying the returned collection<br>
|
|
could affect the graph behavior and the changes could be reflected to the graph.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../berack96/lib/graph/Graph.html#getMarkedWith-java.lang.Object-">getMarkedWith</a></code> in interface <code><a href="../../../../berack96/lib/graph/Graph.html" title="interface in berack96.lib.graph">Graph</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a> extends java.lang.Number></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>mark</code> - the mark</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>all the vertices that are marked with that specific mark</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code>java.lang.NullPointerException</code> - if the mark is null</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getMarks-java.lang.Object-">
|
|
<!-- -->
|
|
</a><a name="getMarks-V-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getMarks</h4>
|
|
<pre>public java.util.Collection<java.lang.Object> getMarks(<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> vertex)
|
|
throws java.lang.NullPointerException,
|
|
java.lang.IllegalArgumentException</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../berack96/lib/graph/Graph.html#getMarks-V-">Graph</a></code></span></div>
|
|
<div class="block">Get all the marker of this vertex.<br>
|
|
If the vertex doesn't have any mark, then it will return an empty set.<br>
|
|
Note: depending on the implementation, modifying the returned collection<br>
|
|
could affect the graph behavior and the changes could be reflected to the graph.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../berack96/lib/graph/Graph.html#getMarks-V-">getMarks</a></code> in interface <code><a href="../../../../berack96/lib/graph/Graph.html" title="interface in berack96.lib.graph">Graph</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a> extends java.lang.Number></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>vertex</code> - the vertex</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>all the mark to the vertex or an empty collection if none</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code>java.lang.NullPointerException</code> - if the vertex is null</dd>
|
|
<dd><code>java.lang.IllegalArgumentException</code> - if the vertex is not contained in the graph</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="unMarkAll-java.lang.Object-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>unMarkAll</h4>
|
|
<pre>public void unMarkAll(java.lang.Object mark)
|
|
throws java.lang.NullPointerException</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../berack96/lib/graph/Graph.html#unMarkAll-java.lang.Object-">Graph</a></code></span></div>
|
|
<div class="block">Remove the selected mark from all the vertices</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../berack96/lib/graph/Graph.html#unMarkAll-java.lang.Object-">unMarkAll</a></code> in interface <code><a href="../../../../berack96/lib/graph/Graph.html" title="interface in berack96.lib.graph">Graph</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a> extends java.lang.Number></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>mark</code> - the mark to remove</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code>java.lang.NullPointerException</code> - if the mark is null</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="unMarkAll--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>unMarkAll</h4>
|
|
<pre>public void unMarkAll()</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../berack96/lib/graph/Graph.html#unMarkAll--">Graph</a></code></span></div>
|
|
<div class="block">Remove all the marker to all the vertex.<br>
|
|
After this call the <a href="../../../../berack96/lib/graph/Graph.html#getMarks-V-"><code>Graph.getMarks(Object)</code></a> applied to any vertex will return an empty set</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../berack96/lib/graph/Graph.html#unMarkAll--">unMarkAll</a></code> in interface <code><a href="../../../../berack96/lib/graph/Graph.html" title="interface in berack96.lib.graph">Graph</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a> extends java.lang.Number></code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="addEdge-java.lang.Object-java.lang.Object-java.lang.Number-">
|
|
<!-- -->
|
|
</a><a name="addEdge-V-V-W-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>addEdge</h4>
|
|
<pre>public <a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a> addEdge(<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> vertex1,
|
|
<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> vertex2,
|
|
<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a> weight)
|
|
throws java.lang.NullPointerException,
|
|
java.lang.IllegalArgumentException</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../berack96/lib/graph/Graph.html#addEdge-V-V-W-">Graph</a></code></span></div>
|
|
<div class="block">Add an edge between the two vertex.<br>
|
|
The edge will be created from the vertex V1 and the vertex V2<br>
|
|
This method will overwrite any existing edge between the two vertex.<br>
|
|
If there was a previous edge then it is returned</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../berack96/lib/graph/Graph.html#addEdge-V-V-W-">addEdge</a></code> in interface <code><a href="../../../../berack96/lib/graph/Graph.html" title="interface in berack96.lib.graph">Graph</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a> extends java.lang.Number></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>vertex1</code> - a vertex of the graph</dd>
|
|
<dd><code>vertex2</code> - a vertex of the graph</dd>
|
|
<dd><code>weight</code> - the weight of the edge</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>null or the previous weight of the edge if there was already one</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code>java.lang.NullPointerException</code> - if one of the parameter is null</dd>
|
|
<dd><code>java.lang.IllegalArgumentException</code> - if one of the vertex is not contained in the graph</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="addEdge-berack96.lib.graph.Edge-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>addEdge</h4>
|
|
<pre>public <a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a> addEdge(<a href="../../../../berack96/lib/graph/Edge.html" title="class in berack96.lib.graph">Edge</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a>> edge)
|
|
throws java.lang.NullPointerException,
|
|
java.lang.IllegalArgumentException</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../berack96/lib/graph/Graph.html#addEdge-berack96.lib.graph.Edge-">Graph</a></code></span></div>
|
|
<div class="block">Add an edge between the two vertex.<br>
|
|
The edge will be created from the vertex source of the edge and the vertex destination of it<br>
|
|
This method will overwrite any existing edge between the two vertex.<br>
|
|
If there was a previous edge then it is returned</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../berack96/lib/graph/Graph.html#addEdge-berack96.lib.graph.Edge-">addEdge</a></code> in interface <code><a href="../../../../berack96/lib/graph/Graph.html" title="interface in berack96.lib.graph">Graph</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a> extends java.lang.Number></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>edge</code> - the edge to add</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>null or the previous weight of the edge if there was already one</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code>java.lang.NullPointerException</code> - if one of the parameter is null</dd>
|
|
<dd><code>java.lang.IllegalArgumentException</code> - if one of the vertex is not contained in the graph</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="addEdgeAndVertices-java.lang.Object-java.lang.Object-java.lang.Number-">
|
|
<!-- -->
|
|
</a><a name="addEdgeAndVertices-V-V-W-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>addEdgeAndVertices</h4>
|
|
<pre>public <a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a> addEdgeAndVertices(<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> vertex1,
|
|
<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> vertex2,
|
|
<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a> weight)
|
|
throws java.lang.NullPointerException</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../berack96/lib/graph/Graph.html#addEdgeAndVertices-V-V-W-">Graph</a></code></span></div>
|
|
<div class="block">This particular function add an edge to the graph.<br>
|
|
If one of the two, or both vertices aren't contained in the graph, then the vertices will be added.<br>
|
|
The edge will be created from the vertex V1 and the vertex V2<br>
|
|
This method will overwrite any existing edge between the two vertex.<br>
|
|
If there was a previous edge then it is returned</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../berack96/lib/graph/Graph.html#addEdgeAndVertices-V-V-W-">addEdgeAndVertices</a></code> in interface <code><a href="../../../../berack96/lib/graph/Graph.html" title="interface in berack96.lib.graph">Graph</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a> extends java.lang.Number></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>vertex1</code> - a vertex of the graph</dd>
|
|
<dd><code>vertex2</code> - a vertex of the graph</dd>
|
|
<dd><code>weight</code> - the weight of the edge</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>null or the previous weight of the edge if there was already one</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code>java.lang.NullPointerException</code> - if one of the parameter is null</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="addEdgeAndVertices-berack96.lib.graph.Edge-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>addEdgeAndVertices</h4>
|
|
<pre>public <a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a> addEdgeAndVertices(<a href="../../../../berack96/lib/graph/Edge.html" title="class in berack96.lib.graph">Edge</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a>> edge)
|
|
throws java.lang.NullPointerException,
|
|
java.lang.IllegalArgumentException</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../berack96/lib/graph/Graph.html#addEdgeAndVertices-berack96.lib.graph.Edge-">Graph</a></code></span></div>
|
|
<div class="block">This particular function add an edge to the graph.<br>
|
|
If one of the two, or both vertices of the edge aren't contained in the graph, then the vertices will be added.<br>
|
|
The edge will be created from the vertex source of the edge and the vertex destination of it<br>
|
|
This method will overwrite any existing edge between the two vertex.<br>
|
|
If there was a previous edge then it is returned</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../berack96/lib/graph/Graph.html#addEdgeAndVertices-berack96.lib.graph.Edge-">addEdgeAndVertices</a></code> in interface <code><a href="../../../../berack96/lib/graph/Graph.html" title="interface in berack96.lib.graph">Graph</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a> extends java.lang.Number></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>edge</code> - the edge to add</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>null or the previous weight of the edge if there was already one</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code>java.lang.NullPointerException</code> - if one of the parameter is null</dd>
|
|
<dd><code>java.lang.IllegalArgumentException</code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="addAllEdges-java.util.Collection-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>addAllEdges</h4>
|
|
<pre>public void addAllEdges(java.util.Collection<<a href="../../../../berack96/lib/graph/Edge.html" title="class in berack96.lib.graph">Edge</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a>>> edges)
|
|
throws java.lang.NullPointerException</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../berack96/lib/graph/Graph.html#addAllEdges-java.util.Collection-">Graph</a></code></span></div>
|
|
<div class="block">Add all the edges of the collection to the graph.<br>
|
|
If one of the two, or both vertices aren't contained in the graph, then the vertices will be added.<br>
|
|
Any null edges will be ignored.<br>
|
|
This method will overwrite any existing edge between the two vertex.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../berack96/lib/graph/Graph.html#addAllEdges-java.util.Collection-">addAllEdges</a></code> in interface <code><a href="../../../../berack96/lib/graph/Graph.html" title="interface in berack96.lib.graph">Graph</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a> extends java.lang.Number></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>edges</code> - the edges to add</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code>java.lang.NullPointerException</code> - if the set is null</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getWeight-java.lang.Object-java.lang.Object-">
|
|
<!-- -->
|
|
</a><a name="getWeight-V-V-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getWeight</h4>
|
|
<pre>public <a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a> getWeight(<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> vertex1,
|
|
<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> vertex2)
|
|
throws java.lang.NullPointerException,
|
|
java.lang.IllegalArgumentException</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../berack96/lib/graph/Graph.html#getWeight-V-V-">Graph</a></code></span></div>
|
|
<div class="block">Get the weight of the selected edge.<br>
|
|
If the edge doesn't exist, then null is returned</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../berack96/lib/graph/Graph.html#getWeight-V-V-">getWeight</a></code> in interface <code><a href="../../../../berack96/lib/graph/Graph.html" title="interface in berack96.lib.graph">Graph</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a> extends java.lang.Number></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>vertex1</code> - a vertex of the graph</dd>
|
|
<dd><code>vertex2</code> - a vertex of the graph</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the weight previously set, or null if the edge doesn't exist</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code>java.lang.NullPointerException</code> - if one of the parameters is null</dd>
|
|
<dd><code>java.lang.IllegalArgumentException</code> - if one of the vertex is not contained in the graph</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="removeEdge-java.lang.Object-java.lang.Object-">
|
|
<!-- -->
|
|
</a><a name="removeEdge-V-V-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>removeEdge</h4>
|
|
<pre>public void removeEdge(<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> vertex1,
|
|
<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> vertex2)
|
|
throws java.lang.NullPointerException,
|
|
java.lang.IllegalArgumentException</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../berack96/lib/graph/Graph.html#removeEdge-V-V-">Graph</a></code></span></div>
|
|
<div class="block">Remove the edge between the two vertex.<br>
|
|
If the edge doesn't exist, then this call does nothing.<br>
|
|
After this method's call it will be no longer possible to travel from V1 to V2, nether from V2 to V1.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../berack96/lib/graph/Graph.html#removeEdge-V-V-">removeEdge</a></code> in interface <code><a href="../../../../berack96/lib/graph/Graph.html" title="interface in berack96.lib.graph">Graph</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a> extends java.lang.Number></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>vertex1</code> - a vertex of the graph</dd>
|
|
<dd><code>vertex2</code> - a vertex of the graph</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code>java.lang.NullPointerException</code> - if one of the parameters is null</dd>
|
|
<dd><code>java.lang.IllegalArgumentException</code> - if one of the vertex is not contained in the graph</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="removeAllInEdge-java.lang.Object-">
|
|
<!-- -->
|
|
</a><a name="removeAllInEdge-V-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>removeAllInEdge</h4>
|
|
<pre>public void removeAllInEdge(<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> vertex)
|
|
throws java.lang.NullPointerException,
|
|
java.lang.IllegalArgumentException</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../berack96/lib/graph/Graph.html#removeAllInEdge-V-">Graph</a></code></span></div>
|
|
<div class="block">Remove all the edges that goes in the vertex.<br>
|
|
After this method's call it will be no longer possible travel to this vertex.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../berack96/lib/graph/Graph.html#removeAllInEdge-V-">removeAllInEdge</a></code> in interface <code><a href="../../../../berack96/lib/graph/Graph.html" title="interface in berack96.lib.graph">Graph</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a> extends java.lang.Number></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>vertex</code> - a vertex of the graph</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code>java.lang.NullPointerException</code> - if one of the parameters is null</dd>
|
|
<dd><code>java.lang.IllegalArgumentException</code> - if one of the vertex is not contained in the graph</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="removeAllOutEdge-java.lang.Object-">
|
|
<!-- -->
|
|
</a><a name="removeAllOutEdge-V-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>removeAllOutEdge</h4>
|
|
<pre>public void removeAllOutEdge(<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> vertex)
|
|
throws java.lang.NullPointerException,
|
|
java.lang.IllegalArgumentException</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../berack96/lib/graph/Graph.html#removeAllOutEdge-V-">Graph</a></code></span></div>
|
|
<div class="block">Remove all the edges that start from this vertex.<br>
|
|
After this method's call it will be no longer possible travel to any vertex from this one.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../berack96/lib/graph/Graph.html#removeAllOutEdge-V-">removeAllOutEdge</a></code> in interface <code><a href="../../../../berack96/lib/graph/Graph.html" title="interface in berack96.lib.graph">Graph</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a> extends java.lang.Number></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>vertex</code> - a vertex of the graph</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code>java.lang.NullPointerException</code> - if one of the parameters is null</dd>
|
|
<dd><code>java.lang.IllegalArgumentException</code> - if one of the vertex is not contained in the graph</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="removeAllEdge-java.lang.Object-">
|
|
<!-- -->
|
|
</a><a name="removeAllEdge-V-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>removeAllEdge</h4>
|
|
<pre>public void removeAllEdge(<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> vertex)
|
|
throws java.lang.NullPointerException,
|
|
java.lang.IllegalArgumentException</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../berack96/lib/graph/Graph.html#removeAllEdge-V-">Graph</a></code></span></div>
|
|
<div class="block">Remove all edges form a particular vertex of the graph.<br>
|
|
After this method's call the selected vertex will have 0 edges.<br>
|
|
It will be no longer possible to reach this vertex from any other vertex, and vice versa.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../berack96/lib/graph/Graph.html#removeAllEdge-V-">removeAllEdge</a></code> in interface <code><a href="../../../../berack96/lib/graph/Graph.html" title="interface in berack96.lib.graph">Graph</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a> extends java.lang.Number></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>vertex</code> - a vertex of the graph</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code>java.lang.NullPointerException</code> - if the vertex is null</dd>
|
|
<dd><code>java.lang.IllegalArgumentException</code> - if one of the vertex is not contained in the graph</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="removeAllEdge--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>removeAllEdge</h4>
|
|
<pre>public void removeAllEdge()</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../berack96/lib/graph/Graph.html#removeAllEdge--">Graph</a></code></span></div>
|
|
<div class="block">Remove all the edges of the graph.<br>
|
|
After this method's call the graph will have only vertices, and no edge.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../berack96/lib/graph/Graph.html#removeAllEdge--">removeAllEdge</a></code> in interface <code><a href="../../../../berack96/lib/graph/Graph.html" title="interface in berack96.lib.graph">Graph</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a> extends java.lang.Number></code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="containsEdge-java.lang.Object-java.lang.Object-">
|
|
<!-- -->
|
|
</a><a name="containsEdge-V-V-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>containsEdge</h4>
|
|
<pre>public boolean containsEdge(<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> vertex1,
|
|
<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> vertex2)
|
|
throws java.lang.NullPointerException</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../berack96/lib/graph/Graph.html#containsEdge-V-V-">Graph</a></code></span></div>
|
|
<div class="block">Check if the edge between the two vertex passed is contained in the graph or not.<br>
|
|
An edge between V1 and V2 is contained in the graph if and only if i can travel from V1 to V2.<br>
|
|
If one of the two vertices is not contained in the graph, then even the edge isn't</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../berack96/lib/graph/Graph.html#containsEdge-V-V-">containsEdge</a></code> in interface <code><a href="../../../../berack96/lib/graph/Graph.html" title="interface in berack96.lib.graph">Graph</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a> extends java.lang.Number></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>vertex1</code> - a vertex of the graph</dd>
|
|
<dd><code>vertex2</code> - a vertex of the graph</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>true if the edge is contained, false otherwise</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code>java.lang.NullPointerException</code> - if one of the parameters is null</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="vertices--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>vertices</h4>
|
|
<pre>public java.util.Collection<<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>> vertices()</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../berack96/lib/graph/Graph.html#vertices--">Graph</a></code></span></div>
|
|
<div class="block">Get all the vertices in the graph.<br>
|
|
If the graph doesn't contains vertices, it'll return an empty collection.<br>
|
|
Note: depending on the implementation, modifying the returned collection<br>
|
|
could affect the graph behavior and the changes could be reflected to the graph.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../berack96/lib/graph/Graph.html#vertices--">vertices</a></code> in interface <code><a href="../../../../berack96/lib/graph/Graph.html" title="interface in berack96.lib.graph">Graph</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a> extends java.lang.Number></code></dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>an array that include all the vertices</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="edges--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>edges</h4>
|
|
<pre>public java.util.Collection<<a href="../../../../berack96/lib/graph/Edge.html" title="class in berack96.lib.graph">Edge</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a>>> edges()</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../berack96/lib/graph/Graph.html#edges--">Graph</a></code></span></div>
|
|
<div class="block">Get all the edges in the graph.<br>
|
|
If the graph doesn't contains edges, it'll return an empty collection.<br>
|
|
Note: depending on the implementation, modifying the returned collection<br>
|
|
could affect the graph behavior and the changes could be reflected to the graph.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../berack96/lib/graph/Graph.html#edges--">edges</a></code> in interface <code><a href="../../../../berack96/lib/graph/Graph.html" title="interface in berack96.lib.graph">Graph</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a> extends java.lang.Number></code></dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>a collection that include all the edges</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="edgesOf-java.lang.Object-">
|
|
<!-- -->
|
|
</a><a name="edgesOf-V-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>edgesOf</h4>
|
|
<pre>public java.util.Collection<<a href="../../../../berack96/lib/graph/Edge.html" title="class in berack96.lib.graph">Edge</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a>>> edgesOf(<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> vertex)
|
|
throws java.lang.NullPointerException,
|
|
java.lang.IllegalArgumentException</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../berack96/lib/graph/Graph.html#edgesOf-V-">Graph</a></code></span></div>
|
|
<div class="block">Retrieve all the edges of a particular vertex.<br>
|
|
Note: the edges that are returned are the one that goes IN this vertex AND the edges that goes OUT of it.<br>
|
|
Note2: depending on the implementation, modifying the returned collection<br>
|
|
could affect the graph behavior and the changes could be reflected to the graph.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../berack96/lib/graph/Graph.html#edgesOf-V-">edgesOf</a></code> in interface <code><a href="../../../../berack96/lib/graph/Graph.html" title="interface in berack96.lib.graph">Graph</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a> extends java.lang.Number></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>vertex</code> - a vertex of the graph</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>a collection of edges</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code>java.lang.NullPointerException</code> - if the vertex is null</dd>
|
|
<dd><code>java.lang.IllegalArgumentException</code> - if the vertex is not contained in the graph</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getEdgesIn-java.lang.Object-">
|
|
<!-- -->
|
|
</a><a name="getEdgesIn-V-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getEdgesIn</h4>
|
|
<pre>public java.util.Collection<<a href="../../../../berack96/lib/graph/Edge.html" title="class in berack96.lib.graph">Edge</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a>>> getEdgesIn(<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> vertex)
|
|
throws java.lang.NullPointerException,
|
|
java.lang.IllegalArgumentException</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../berack96/lib/graph/Graph.html#getEdgesIn-V-">Graph</a></code></span></div>
|
|
<div class="block">Retrieve all the edges of a particular vertex.<br>
|
|
Note: the edges that are returned are the one that have this vertex as destination and another as source.<br>
|
|
Note2: depending on the implementation, modifying the returned collection<br>
|
|
could affect the graph behavior and the changes could be reflected to the graph.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../berack96/lib/graph/Graph.html#getEdgesIn-V-">getEdgesIn</a></code> in interface <code><a href="../../../../berack96/lib/graph/Graph.html" title="interface in berack96.lib.graph">Graph</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a> extends java.lang.Number></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>vertex</code> - a vertex of the graph</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>a collection of edges</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code>java.lang.NullPointerException</code> - if the vertex is null</dd>
|
|
<dd><code>java.lang.IllegalArgumentException</code> - if the vertex is not contained in the graph</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getEdgesOut-java.lang.Object-">
|
|
<!-- -->
|
|
</a><a name="getEdgesOut-V-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getEdgesOut</h4>
|
|
<pre>public java.util.Collection<<a href="../../../../berack96/lib/graph/Edge.html" title="class in berack96.lib.graph">Edge</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a>>> getEdgesOut(<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> vertex)
|
|
throws java.lang.NullPointerException,
|
|
java.lang.IllegalArgumentException</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../berack96/lib/graph/Graph.html#getEdgesOut-V-">Graph</a></code></span></div>
|
|
<div class="block">Retrieve all the edges that goes OUT of a particular vertex.<br>
|
|
Note: the edges that are returned are the one that have this vertex as source and another one as destination.<br>
|
|
Note2: depending on the implementation, modifying the returned collection<br>
|
|
could affect the graph behavior and the changes could be reflected to the graph.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../berack96/lib/graph/Graph.html#getEdgesOut-V-">getEdgesOut</a></code> in interface <code><a href="../../../../berack96/lib/graph/Graph.html" title="interface in berack96.lib.graph">Graph</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a> extends java.lang.Number></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>vertex</code> - a vertex of the graph</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>a collection of edges</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code>java.lang.NullPointerException</code> - if the vertex is null</dd>
|
|
<dd><code>java.lang.IllegalArgumentException</code> - if the vertex is not contained in the graph</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getChildren-java.lang.Object-">
|
|
<!-- -->
|
|
</a><a name="getChildren-V-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getChildren</h4>
|
|
<pre>public java.util.Collection<<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>> getChildren(<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> vertex)
|
|
throws java.lang.NullPointerException,
|
|
java.lang.IllegalArgumentException</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../berack96/lib/graph/Graph.html#getChildren-V-">Graph</a></code></span></div>
|
|
<div class="block">Get all the vertices that are children of the vertex passed as parameter.<br>
|
|
The vertices V(0-N) that are 'children' of a vertex V1, are all the vertices that have an edge
|
|
where V1 is the source of that edge.<br>
|
|
Note: depending on the implementation, modifying the returned collection<br>
|
|
could affect the graph behavior and the changes could be reflected to the graph.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../berack96/lib/graph/Graph.html#getChildren-V-">getChildren</a></code> in interface <code><a href="../../../../berack96/lib/graph/Graph.html" title="interface in berack96.lib.graph">Graph</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a> extends java.lang.Number></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>vertex</code> - the source vertex</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>an array of vertices</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code>java.lang.NullPointerException</code> - if the vertex is null</dd>
|
|
<dd><code>java.lang.IllegalArgumentException</code> - if the vertex is not contained in the graph</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getAncestors-java.lang.Object-">
|
|
<!-- -->
|
|
</a><a name="getAncestors-V-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getAncestors</h4>
|
|
<pre>public java.util.Collection<<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>> getAncestors(<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> vertex)
|
|
throws java.lang.NullPointerException,
|
|
java.lang.IllegalArgumentException</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../berack96/lib/graph/Graph.html#getAncestors-V-">Graph</a></code></span></div>
|
|
<div class="block">Get all the vertices that have the vertex passed as their child.<br>
|
|
Basically is the opposite of <a href="../../../../berack96/lib/graph/Graph.html#getChildren-V-"><code>Graph.getChildren(Object)</code></a><br>
|
|
Note: depending on the implementation, modifying the returned collection<br>
|
|
could affect the graph behavior and the changes could be reflected to the graph.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../berack96/lib/graph/Graph.html#getAncestors-V-">getAncestors</a></code> in interface <code><a href="../../../../berack96/lib/graph/Graph.html" title="interface in berack96.lib.graph">Graph</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a> extends java.lang.Number></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>vertex</code> - a vertex of the graph</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>an array of ancestors of the vertex</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code>java.lang.NullPointerException</code> - if one of the parameters is null</dd>
|
|
<dd><code>java.lang.IllegalArgumentException</code> - if one of the vertex is not contained in the graph</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="degreeIn-java.lang.Object-">
|
|
<!-- -->
|
|
</a><a name="degreeIn-V-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>degreeIn</h4>
|
|
<pre>public int degreeIn(<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> vertex)
|
|
throws java.lang.NullPointerException,
|
|
java.lang.IllegalArgumentException</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../berack96/lib/graph/Graph.html#degreeIn-V-">Graph</a></code></span></div>
|
|
<div class="block">Tells the degree of all the edges that goes to this vertex.<br>
|
|
Basically, it'll count how many edge towards himself it have.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../berack96/lib/graph/Graph.html#degreeIn-V-">degreeIn</a></code> in interface <code><a href="../../../../berack96/lib/graph/Graph.html" title="interface in berack96.lib.graph">Graph</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a> extends java.lang.Number></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>vertex</code> - a vertex of the graph</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the in degree of the vertex</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code>java.lang.NullPointerException</code> - if the vertex is null</dd>
|
|
<dd><code>java.lang.IllegalArgumentException</code> - if the vertex is not contained in the graph</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="degreeOut-java.lang.Object-">
|
|
<!-- -->
|
|
</a><a name="degreeOut-V-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>degreeOut</h4>
|
|
<pre>public int degreeOut(<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> vertex)
|
|
throws java.lang.NullPointerException,
|
|
java.lang.IllegalArgumentException</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../berack96/lib/graph/Graph.html#degreeOut-V-">Graph</a></code></span></div>
|
|
<div class="block">Tells the degree of all the edges that goes form this vertex to others.<br>
|
|
Basically, it'll count how many edge towards any other vertex it have.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../berack96/lib/graph/Graph.html#degreeOut-V-">degreeOut</a></code> in interface <code><a href="../../../../berack96/lib/graph/Graph.html" title="interface in berack96.lib.graph">Graph</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a> extends java.lang.Number></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>vertex</code> - a vertex of the graph</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the out degree of the vertex</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code>java.lang.NullPointerException</code> - if the vertex is null</dd>
|
|
<dd><code>java.lang.IllegalArgumentException</code> - if the vertex is not contained in the graph</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="degree-java.lang.Object-">
|
|
<!-- -->
|
|
</a><a name="degree-V-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>degree</h4>
|
|
<pre>public int degree(<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> vertex)
|
|
throws java.lang.NullPointerException,
|
|
java.lang.IllegalArgumentException</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../berack96/lib/graph/Graph.html#degree-V-">Graph</a></code></span></div>
|
|
<div class="block">Tells the degree of a vertex.<br>
|
|
The degree of a vertex is the quantity of edges that have.<br>
|
|
Basically, it'll count how many edge it have.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../berack96/lib/graph/Graph.html#degree-V-">degree</a></code> in interface <code><a href="../../../../berack96/lib/graph/Graph.html" title="interface in berack96.lib.graph">Graph</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a> extends java.lang.Number></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>vertex</code> - a vertex of the graph</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the degree of the vertex</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code>java.lang.NullPointerException</code> - if the vertex is null</dd>
|
|
<dd><code>java.lang.IllegalArgumentException</code> - if the vertex is not contained in the graph</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="numberOfVertices--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>numberOfVertices</h4>
|
|
<pre>public int numberOfVertices()</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../berack96/lib/graph/Graph.html#numberOfVertices--">Graph</a></code></span></div>
|
|
<div class="block">Tells how many vertices are in the graph.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../berack96/lib/graph/Graph.html#numberOfVertices--">numberOfVertices</a></code> in interface <code><a href="../../../../berack96/lib/graph/Graph.html" title="interface in berack96.lib.graph">Graph</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a> extends java.lang.Number></code></dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the number of vertices</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="numberOfEdges--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>numberOfEdges</h4>
|
|
<pre>public int numberOfEdges()</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../berack96/lib/graph/Graph.html#numberOfEdges--">Graph</a></code></span></div>
|
|
<div class="block">Tells how many edges are in the graph.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../berack96/lib/graph/Graph.html#numberOfEdges--">numberOfEdges</a></code> in interface <code><a href="../../../../berack96/lib/graph/Graph.html" title="interface in berack96.lib.graph">Graph</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a> extends java.lang.Number></code></dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the number of edges</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="visit-java.lang.Object-berack96.lib.graph.visit.VisitStrategy-java.util.function.Consumer-">
|
|
<!-- -->
|
|
</a><a name="visit-V-berack96.lib.graph.visit.VisitStrategy-java.util.function.Consumer-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>visit</h4>
|
|
<pre>public <a href="../../../../berack96/lib/graph/visit/impl/VisitInfo.html" title="class in berack96.lib.graph.visit.impl">VisitInfo</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>> visit(<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> source,
|
|
<a href="../../../../berack96/lib/graph/visit/VisitStrategy.html" title="interface in berack96.lib.graph.visit">VisitStrategy</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a>> strategy,
|
|
java.util.function.Consumer<<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>> visit)
|
|
throws java.lang.NullPointerException,
|
|
java.lang.IllegalArgumentException</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../berack96/lib/graph/Graph.html#visit-V-berack96.lib.graph.visit.VisitStrategy-java.util.function.Consumer-">Graph</a></code></span></div>
|
|
<div class="block">Visit the graph accordingly to the strategy that is passed.<br>
|
|
This method visit the graph from the source to all the vertex that are reachable form the source.<br>
|
|
Some strategy can accept a source vertex null, because they visit all the graph anyway.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../berack96/lib/graph/Graph.html#visit-V-berack96.lib.graph.visit.VisitStrategy-java.util.function.Consumer-">visit</a></code> in interface <code><a href="../../../../berack96/lib/graph/Graph.html" title="interface in berack96.lib.graph">Graph</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a> extends java.lang.Number></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>source</code> - the source vertex of the visit</dd>
|
|
<dd><code>strategy</code> - the algorithm for visiting the graph</dd>
|
|
<dd><code>visit</code> - the function to apply at each vertex</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>an info of the visit</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code>java.lang.NullPointerException</code> - if one of the parameter is null (except the consumer)</dd>
|
|
<dd><code>java.lang.IllegalArgumentException</code> - if the vertex is not in the graph</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="transpose--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>transpose</h4>
|
|
<pre>public <a href="../../../../berack96/lib/graph/Graph.html" title="interface in berack96.lib.graph">Graph</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a>> transpose()</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../berack96/lib/graph/Graph.html#transpose--">Graph</a></code></span></div>
|
|
<div class="block">This method will create a new Graph that is the transposed version of the original.<br>
|
|
At the end of this method the new graph will have all the edges inverted in orientation.<br>
|
|
Example: if the graph G contains (V1, V2, V3) as vertex, and (V1->V2, V3->V2) as edges,
|
|
the transpose graph G' will contain (V1, V2, V3) as vertex, and (V2->V1, V2->V3) as edges.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../berack96/lib/graph/Graph.html#transpose--">transpose</a></code> in interface <code><a href="../../../../berack96/lib/graph/Graph.html" title="interface in berack96.lib.graph">Graph</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a> extends java.lang.Number></code></dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>a transposed graph of this instance</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="topologicalSort--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>topologicalSort</h4>
|
|
<pre>public java.util.List<<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>> topologicalSort()
|
|
throws java.lang.UnsupportedOperationException</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../berack96/lib/graph/Graph.html#topologicalSort--">Graph</a></code></span></div>
|
|
<div class="block">If the current graph is a DAG, it returns a topological sort of this graph.<br>
|
|
A topological ordering of a graph is a linear ordering of its vertices such that for
|
|
every directed edge (V1, V2) from vertex V1 to vertex V2, V2 comes before V1 in the ordering.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../berack96/lib/graph/Graph.html#topologicalSort--">topologicalSort</a></code> in interface <code><a href="../../../../berack96/lib/graph/Graph.html" title="interface in berack96.lib.graph">Graph</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a> extends java.lang.Number></code></dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>an array containing the topological order of the vertices</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code>java.lang.UnsupportedOperationException</code> - if the graph is not a DAG (see <a href="../../../../berack96/lib/graph/Graph.html#isDAG--"><code>Graph.isDAG()</code></a>)</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="stronglyConnectedComponents--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>stronglyConnectedComponents</h4>
|
|
<pre>public java.util.Collection<java.util.Collection<<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>>> stronglyConnectedComponents()</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../berack96/lib/graph/Graph.html#stronglyConnectedComponents--">Graph</a></code></span></div>
|
|
<div class="block">The strongly connected components or disconnected components of an arbitrary directed graph
|
|
form a partition into subgraphs that are themselves strongly connected.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../berack96/lib/graph/Graph.html#stronglyConnectedComponents--">stronglyConnectedComponents</a></code> in interface <code><a href="../../../../berack96/lib/graph/Graph.html" title="interface in berack96.lib.graph">Graph</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a> extends java.lang.Number></code></dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>a collection containing the strongly connected components</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="subGraph-java.lang.Object-int-">
|
|
<!-- -->
|
|
</a><a name="subGraph-V-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>subGraph</h4>
|
|
<pre>public <a href="../../../../berack96/lib/graph/Graph.html" title="interface in berack96.lib.graph">Graph</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a>> subGraph(<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> source,
|
|
int depth)
|
|
throws java.lang.NullPointerException,
|
|
java.lang.IllegalArgumentException</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../berack96/lib/graph/Graph.html#subGraph-V-int-">Graph</a></code></span></div>
|
|
<div class="block">Get a sub-graph of the current one based on the maximum depth that is given.<br>
|
|
If the depth is 1 then only the source and it's children will be in the sub-graph.<br>
|
|
If the depth is 2 then only the source, it's children and it's children of it's children will be in the sub-graph.<br>
|
|
And so on.<br>
|
|
Of course the sub-graph will contain the edges that link the vertices, but only the one selected.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../berack96/lib/graph/Graph.html#subGraph-V-int-">subGraph</a></code> in interface <code><a href="../../../../berack96/lib/graph/Graph.html" title="interface in berack96.lib.graph">Graph</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a> extends java.lang.Number></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>source</code> - the source vertex</dd>
|
|
<dd><code>depth</code> - the maximum depth (must be a positive number, if >=0 a graph containing only the source is returned)</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>a sub-graph of the original</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code>java.lang.NullPointerException</code> - if the vertex is null</dd>
|
|
<dd><code>java.lang.IllegalArgumentException</code> - if the vertex is not contained</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="subGraph-java.lang.Object...-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>subGraph</h4>
|
|
<pre>public <a href="../../../../berack96/lib/graph/Graph.html" title="interface in berack96.lib.graph">Graph</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a>> subGraph(java.lang.Object... marker)</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../berack96/lib/graph/Graph.html#subGraph-java.lang.Object...-">Graph</a></code></span></div>
|
|
<div class="block">Get a sub-graph of the current one with only the vertex marked with the selected markers.<br>
|
|
Each vertex will have all his edges, but only the ones with the destination marked with the same marker.<br>
|
|
If the marker is not specified or is null then the returning graph will have all the vertices that are not marked by any marker.<br>
|
|
If the graph doesn't contain any vertex with that marker then an empty graph is returned.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../berack96/lib/graph/Graph.html#subGraph-java.lang.Object...-">subGraph</a></code> in interface <code><a href="../../../../berack96/lib/graph/Graph.html" title="interface in berack96.lib.graph">Graph</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a> extends java.lang.Number></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>marker</code> - one or more markers</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>a sub-graph of the current graph</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="distance-java.lang.Object-java.lang.Object-">
|
|
<!-- -->
|
|
</a><a name="distance-V-V-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>distance</h4>
|
|
<pre>public java.util.List<<a href="../../../../berack96/lib/graph/Edge.html" title="class in berack96.lib.graph">Edge</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a>>> distance(<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> source,
|
|
<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> destination)
|
|
throws java.lang.NullPointerException,
|
|
java.lang.IllegalArgumentException,
|
|
java.lang.UnsupportedOperationException</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../berack96/lib/graph/Graph.html#distance-V-V-">Graph</a></code></span></div>
|
|
<div class="block">Get the minimum path from the source vertex to the destination vertex.<br>
|
|
If the source vertex can't reach the destination, then an exception is thrown.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../berack96/lib/graph/Graph.html#distance-V-V-">distance</a></code> in interface <code><a href="../../../../berack96/lib/graph/Graph.html" title="interface in berack96.lib.graph">Graph</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a> extends java.lang.Number></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>source</code> - the vertex where to start</dd>
|
|
<dd><code>destination</code> - the destination chosen</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>an ordered list of edges from source to destination that represent the minimum path between the two vertices</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code>java.lang.NullPointerException</code> - if one of the parameter is null (except the consumer)</dd>
|
|
<dd><code>java.lang.IllegalArgumentException</code> - if the vertex is not in the graph</dd>
|
|
<dd><code>java.lang.UnsupportedOperationException</code> - if from the source it's not possible to reach the destination</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="distance-java.lang.Object-">
|
|
<!-- -->
|
|
</a><a name="distance-V-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>distance</h4>
|
|
<pre>public java.util.Map<<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,java.util.List<<a href="../../../../berack96/lib/graph/Edge.html" title="class in berack96.lib.graph">Edge</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a>>>> distance(<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a> source)
|
|
throws java.lang.NullPointerException,
|
|
java.lang.IllegalArgumentException</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../berack96/lib/graph/Graph.html#distance-V-">Graph</a></code></span></div>
|
|
<div class="block">Get the minimum path from the source vertex to all the possible reachable vertices.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../berack96/lib/graph/Graph.html#distance-V-">distance</a></code> in interface <code><a href="../../../../berack96/lib/graph/Graph.html" title="interface in berack96.lib.graph">Graph</a><<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">V</a>,<a href="../../../../berack96/lib/graph/impl/MatrixGraph.html" title="type parameter in MatrixGraph">W</a> extends java.lang.Number></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>source</code> - the vertex where to start</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>a map containing all the possible reachable vertices from the source and the minimum path to reach them</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code>java.lang.NullPointerException</code> - if one of the parameter is null (except the consumer)</dd>
|
|
<dd><code>java.lang.IllegalArgumentException</code> - if the vertex is not in the graph</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>
|
|
<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/MatrixGraph.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-files/index-1.html">Index</a></li>
|
|
<li><a href="../../../../help-doc.html">Help</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="subNav">
|
|
<ul class="navList">
|
|
<li><a href="../../../../berack96/lib/graph/impl/MapGraph.html" title="class in berack96.lib.graph.impl"><span class="typeNameLink">Prev Class</span></a></li>
|
|
<li>Next Class</li>
|
|
</ul>
|
|
<ul class="navList">
|
|
<li><a href="../../../../index.html?berack96/lib/graph/impl/MatrixGraph.html" target="_top">Frames</a></li>
|
|
<li><a href="MatrixGraph.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>Field | </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>Field | </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 ======= -->
|
|
</body>
|
|
</html>
|