ProjektGraph/out/JavaDoc/graph/ExampleGraphs.html
2024-07-09 16:03:03 +02:00

263 lines
19 KiB
HTML

<!DOCTYPE HTML>
<html lang="de">
<head>
<!-- Generated by javadoc (21) on Tue Jul 09 12:47:01 CEST 2024 -->
<title>ExampleGraphs</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="dc.created" content="2024-07-09">
<meta name="description" content="declaration: package: graph, class: ExampleGraphs">
<meta name="generator" content="javadoc/ClassWriterImpl">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../script-dir/jquery-ui.min.css" title="Style">
<script type="text/javascript" src="../script.js"></script>
<script type="text/javascript" src="../script-dir/jquery-3.6.1.min.js"></script>
<script type="text/javascript" src="../script-dir/jquery-ui.min.js"></script>
</head>
<body class="class-declaration-page">
<script type="text/javascript">var pathtoroot = "../";
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript ist im Browser deaktiviert.</div>
</noscript>
<div class="flex-box">
<header role="banner" class="flex-header">
<nav role="navigation">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="top-nav" id="navbar-top"><button id="navbar-toggle-button" aria-controls="navbar-top" aria-expanded="false" aria-label="Navigationslinks umschalten"><span class="nav-bar-toggle-icon">&nbsp;</span><span class="nav-bar-toggle-icon">&nbsp;</span><span class="nav-bar-toggle-icon">&nbsp;</span></button>
<div class="skip-nav"><a href="#skip-navbar-top" title="Navigations-Links überspringen">Navigations-Links überspringen</a></div>
<ul id="navbar-top-firstrow" class="nav-list" title="Navigation">
<li><a href="../index.html">Überblick</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="nav-bar-cell1-rev">Klasse</li>
<li><a href="package-tree.html">Baum</a></li>
<li><a href="../index-files/index-1.html">Index</a></li>
<li><a href="../help-doc.html#class">Hilfe</a></li>
</ul>
<ul class="sub-nav-list-small">
<li>
<p>Übersicht:</p>
<ul>
<li>Verschachtelt</li>
<li>Feld</li>
<li><a href="#constructor-summary">Konstruktor</a></li>
<li><a href="#method-summary">Methode</a></li>
</ul>
</li>
<li>
<p>Details:</p>
<ul>
<li>Feld</li>
<li><a href="#constructor-detail">Konstruktor</a></li>
<li><a href="#method-detail">Methode</a></li>
</ul>
</li>
</ul>
</div>
<div class="sub-nav">
<div id="navbar-sub-list">
<ul class="sub-nav-list">
<li>Übersicht:&nbsp;</li>
<li>Verschachtelt&nbsp;|&nbsp;</li>
<li>Feld&nbsp;|&nbsp;</li>
<li><a href="#constructor-summary">Konstruktor</a>&nbsp;|&nbsp;</li>
<li><a href="#method-summary">Methode</a></li>
</ul>
<ul class="sub-nav-list">
<li>Details:&nbsp;</li>
<li>Feld&nbsp;|&nbsp;</li>
<li><a href="#constructor-detail">Konstruktor</a>&nbsp;|&nbsp;</li>
<li><a href="#method-detail">Methode</a></li>
</ul>
</div>
<div class="nav-list-search"><a href="../search.html">SEARCH</a>
<input type="text" id="search-input" disabled placeholder="Suchen">
<input type="reset" id="reset-button" disabled value="reset">
</div>
</div>
<!-- ========= END OF TOP NAVBAR ========= -->
<span class="skip-nav" id="skip-navbar-top"></span></nav>
</header>
<div class="flex-content">
<main role="main">
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="sub-title"><span class="package-label-in-type">Package</span>&nbsp;<a href="package-summary.html">graph</a></div>
<h1 title="Klasse ExampleGraphs" class="title">Klasse ExampleGraphs</h1>
</div>
<div class="inheritance" title="Vererbungsbaum"><a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html" title="Klasse oder Schnittstelle in java.lang" class="external-link">java.lang.Object</a>
<div class="inheritance">graph.ExampleGraphs</div>
</div>
<section class="class-description" id="class-description">
<hr>
<div class="type-signature"><span class="modifiers">public class </span><span class="element-name type-name-label">ExampleGraphs</span>
<span class="extends-implements">extends <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html" title="Klasse oder Schnittstelle in java.lang" class="external-link">Object</a></span></div>
<div class="block">Class containing example graphs for demonstration purposes.</div>
</section>
<section class="summary">
<ul class="summary-list">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<li>
<section class="constructor-summary" id="constructor-summary">
<h2>Konstruktorübersicht</h2>
<div class="caption"><span>Konstruktoren</span></div>
<div class="summary-table two-column-summary">
<div class="table-header col-first">Konstruktor</div>
<div class="table-header col-last">Beschreibung</div>
<div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E()" class="member-name-link">ExampleGraphs</a>()</code></div>
<div class="col-last even-row-color">&nbsp;</div>
</div>
</section>
</li>
<!-- ========== METHOD SUMMARY =========== -->
<li>
<section class="method-summary" id="method-summary">
<h2>Methodenübersicht</h2>
<div id="method-summary-table">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">Alle Methoden</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instanzmethoden</button><button id="method-summary-table-tab4" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab4', 3)" class="table-tab">Konkrete Methoden</button></div>
<div id="method-summary-table.tabpanel" role="tabpanel">
<div class="summary-table three-column-summary" aria-labelledby="method-summary-table-tab0">
<div class="table-header col-first">Modifizierer und Typ</div>
<div class="table-header col-second">Methode</div>
<div class="table-header col-last">Beschreibung</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>private void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#addBidirectionalEdge(graph.DirectedGraph,graph.MarkedVertex,graph.MarkedVertex,graph.EdgeWeightMarking)" class="member-name-link">addBidirectionalEdge</a><wbr>(<a href="DirectedGraph.html" title="Klasse in graph">DirectedGraph</a>&lt;<a href="VertexMarking.html" title="Klasse in graph">VertexMarking</a>,<wbr><a href="EdgeMarking.html" title="Klasse in graph">EdgeMarking</a>&gt;&nbsp;graph,
<a href="MarkedVertex.html" title="Klasse in graph">MarkedVertex</a>&lt;<a href="VertexMarking.html" title="Klasse in graph">VertexMarking</a>&gt;&nbsp;from,
<a href="MarkedVertex.html" title="Klasse in graph">MarkedVertex</a>&lt;<a href="VertexMarking.html" title="Klasse in graph">VertexMarking</a>&gt;&nbsp;to,
<a href="EdgeWeightMarking.html" title="Klasse in graph">EdgeWeightMarking</a>&nbsp;weight)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Helper method to add a bidirectional edge between two vertices in a graph.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="DirectedGraph.html" title="Klasse in graph">DirectedGraph</a><wbr>&lt;<a href="VertexMarking.html" title="Klasse in graph">VertexMarking</a>,<wbr><a href="EdgeMarking.html" title="Klasse in graph">EdgeMarking</a>&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#example1()" class="member-name-link">example1</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Creates an example graph suitable for demonstrating Dijkstra's and A* algorithms.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="DirectedGraph.html" title="Klasse in graph">DirectedGraph</a><wbr>&lt;<a href="VertexMarking.html" title="Klasse in graph">VertexMarking</a>,<wbr><a href="EdgeMarking.html" title="Klasse in graph">EdgeMarking</a>&gt;</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#example2()" class="member-name-link">example2</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Creates an example grid graph where each node is connected to its horizontal and vertical neighbors.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="DirectedGraph.html" title="Klasse in graph">DirectedGraph</a><wbr>&lt;<a href="VertexMarking.html" title="Klasse in graph">VertexMarking</a>,<wbr><a href="EdgeMarking.html" title="Klasse in graph">EdgeMarking</a>&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#example3()" class="member-name-link">example3</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Creates an example graph illustrating two paths from a start node to an end node with different characteristics:
one path with few nodes and mostly low-weight edges, and another path with more nodes and higher-weight edges.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="DirectedGraph.html" title="Klasse in graph">DirectedGraph</a><wbr>&lt;<a href="VertexMarking.html" title="Klasse in graph">VertexMarking</a>,<wbr><a href="EdgeMarking.html" title="Klasse in graph">EdgeMarking</a>&gt;</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#example4()" class="member-name-link">example4</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Creates an example labyrinth graph with four horizontal paths, each consisting of four nodes.</div>
</div>
</div>
</div>
</div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-java.lang.Object">Von Klasse geerbte Methoden&nbsp;java.lang.<a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html" title="Klasse oder Schnittstelle in java.lang" class="external-link">Object</a></h3>
<code><a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html#clone()" title="Klasse oder Schnittstelle in java.lang" class="external-link">clone</a>, <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)" title="Klasse oder Schnittstelle in java.lang" class="external-link">equals</a>, <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html#finalize()" title="Klasse oder Schnittstelle in java.lang" class="external-link">finalize</a>, <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html#getClass()" title="Klasse oder Schnittstelle in java.lang" class="external-link">getClass</a>, <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html#hashCode()" title="Klasse oder Schnittstelle in java.lang" class="external-link">hashCode</a>, <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html#notify()" title="Klasse oder Schnittstelle in java.lang" class="external-link">notify</a>, <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html#notifyAll()" title="Klasse oder Schnittstelle in java.lang" class="external-link">notifyAll</a>, <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html#toString()" title="Klasse oder Schnittstelle in java.lang" class="external-link">toString</a>, <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html#wait()" title="Klasse oder Schnittstelle in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html#wait(long)" title="Klasse oder Schnittstelle in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html#wait(long,int)" title="Klasse oder Schnittstelle in java.lang" class="external-link">wait</a></code></div>
</section>
</li>
</ul>
</section>
<section class="details">
<ul class="details-list">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<li>
<section class="constructor-details" id="constructor-detail">
<h2>Konstruktordetails</h2>
<ul class="member-list">
<li>
<section class="detail" id="&lt;init&gt;()">
<h3>ExampleGraphs</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">ExampleGraphs</span>()</div>
</section>
</li>
</ul>
</section>
</li>
<!-- ============ METHOD DETAIL ========== -->
<li>
<section class="method-details" id="method-detail">
<h2>Methodendetails</h2>
<ul class="member-list">
<li>
<section class="detail" id="example1()">
<h3>example1</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="DirectedGraph.html" title="Klasse in graph">DirectedGraph</a>&lt;<a href="VertexMarking.html" title="Klasse in graph">VertexMarking</a>,<wbr><a href="EdgeMarking.html" title="Klasse in graph">EdgeMarking</a>&gt;</span>&nbsp;<span class="element-name">example1</span>()</div>
<div class="block">Creates an example graph suitable for demonstrating Dijkstra's and A* algorithms.
This graph contains multiple nodes connected by weighted edges, allowing efficient
calculation of shortest paths from a start node to an end node.</div>
<dl class="notes">
<dt>Gibt zurück:</dt>
<dd>Directed graph instance for example 1.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="example2()">
<h3>example2</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="DirectedGraph.html" title="Klasse in graph">DirectedGraph</a>&lt;<a href="VertexMarking.html" title="Klasse in graph">VertexMarking</a>,<wbr><a href="EdgeMarking.html" title="Klasse in graph">EdgeMarking</a>&gt;</span>&nbsp;<span class="element-name">example2</span>()</div>
<div class="block">Creates an example grid graph where each node is connected to its horizontal and vertical neighbors.
All edges have the same weight. The start node is in one corner of the grid, and the end node is
in the opposite corner, demonstrating the efficiency of the A* algorithm in structured grid graphs.</div>
<dl class="notes">
<dt>Gibt zurück:</dt>
<dd>Directed graph instance for example 2.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="example3()">
<h3>example3</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="DirectedGraph.html" title="Klasse in graph">DirectedGraph</a>&lt;<a href="VertexMarking.html" title="Klasse in graph">VertexMarking</a>,<wbr><a href="EdgeMarking.html" title="Klasse in graph">EdgeMarking</a>&gt;</span>&nbsp;<span class="element-name">example3</span>()</div>
<div class="block">Creates an example graph illustrating two paths from a start node to an end node with different characteristics:
one path with few nodes and mostly low-weight edges, and another path with more nodes and higher-weight edges.
The algorithms will alternate exploration between these paths.</div>
<dl class="notes">
<dt>Gibt zurück:</dt>
<dd>Directed graph instance for example 3.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="example4()">
<h3>example4</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="DirectedGraph.html" title="Klasse in graph">DirectedGraph</a>&lt;<a href="VertexMarking.html" title="Klasse in graph">VertexMarking</a>,<wbr><a href="EdgeMarking.html" title="Klasse in graph">EdgeMarking</a>&gt;</span>&nbsp;<span class="element-name">example4</span>()</div>
<div class="block">Creates an example labyrinth graph with four horizontal paths, each consisting of four nodes.
Each path leads to a respective endpoint, demonstrating how algorithms may explore potentially incorrect paths
before finding the correct one, and showing the efficiency of A* in finding the correct path quickly.</div>
<dl class="notes">
<dt>Gibt zurück:</dt>
<dd>Directed graph instance for example 4.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="addBidirectionalEdge(graph.DirectedGraph,graph.MarkedVertex,graph.MarkedVertex,graph.EdgeWeightMarking)">
<h3>addBidirectionalEdge</h3>
<div class="member-signature"><span class="modifiers">private</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">addBidirectionalEdge</span><wbr><span class="parameters">(<a href="DirectedGraph.html" title="Klasse in graph">DirectedGraph</a>&lt;<a href="VertexMarking.html" title="Klasse in graph">VertexMarking</a>,<wbr><a href="EdgeMarking.html" title="Klasse in graph">EdgeMarking</a>&gt;&nbsp;graph,
<a href="MarkedVertex.html" title="Klasse in graph">MarkedVertex</a>&lt;<a href="VertexMarking.html" title="Klasse in graph">VertexMarking</a>&gt;&nbsp;from,
<a href="MarkedVertex.html" title="Klasse in graph">MarkedVertex</a>&lt;<a href="VertexMarking.html" title="Klasse in graph">VertexMarking</a>&gt;&nbsp;to,
<a href="EdgeWeightMarking.html" title="Klasse in graph">EdgeWeightMarking</a>&nbsp;weight)</span></div>
<div class="block">Helper method to add a bidirectional edge between two vertices in a graph.</div>
<dl class="notes">
<dt>Parameter:</dt>
<dd><code>graph</code> - The graph instance where the edge should be added.</dd>
<dd><code>from</code> - The starting vertex of the edge.</dd>
<dd><code>to</code> - The ending vertex of the edge.</dd>
<dd><code>weight</code> - The weight marking of the edge.</dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
</ul>
</section>
<!-- ========= END OF CLASS DATA ========= -->
</main>
</div>
</div>
</body>
</html>