You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
290 lines
17 KiB
290 lines
17 KiB
<!DOCTYPE HTML>
|
|
<html lang="de">
|
|
<head>
|
|
<!-- Generated by javadoc (19) on Fri Nov 24 16:28:07 CET 2023 -->
|
|
<title>SparseVector</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="2023-11-24">
|
|
<meta name="description" content="declaration: class: SparseVector">
|
|
<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">
|
|
<link rel="stylesheet" type="text/css" href="jquery-ui.overrides.css" title="Style">
|
|
<script type="text/javascript" src="script.js"></script>
|
|
<script type="text/javascript" src="script-dir/jquery-3.6.0.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"> </span><span class="nav-bar-toggle-icon"> </span><span class="nav-bar-toggle-icon"> </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="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: </li>
|
|
<li>Verschachtelt | </li>
|
|
<li>Feld | </li>
|
|
<li><a href="#constructor-summary">Konstruktor</a> | </li>
|
|
<li><a href="#method-summary">Methode</a></li>
|
|
</ul>
|
|
<ul class="sub-nav-list">
|
|
<li>Details: </li>
|
|
<li>Feld | </li>
|
|
<li><a href="#constructor-detail">Konstruktor</a> | </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">
|
|
<h1 title="Klasse SparseVector" class="title">Klasse SparseVector</h1>
|
|
</div>
|
|
<div class="inheritance" title="Vererbungsbaum"><a href="https://docs.oracle.com/en/java/javase/19/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">SparseVector</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">SparseVector</span>
|
|
<span class="extends-implements">extends <a href="https://docs.oracle.com/en/java/javase/19/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">Sparse Implementierung einer verkettete Liste</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">SparseVector</a>()</code></div>
|
|
<div class="col-last even-row-color">
|
|
<div class="block">Konstruktor mit Vektor länge 0</div>
|
|
</div>
|
|
<div class="col-constructor-name odd-row-color"><code><a href="#%3Cinit%3E(int)" class="member-name-link">SparseVector</a><wbr>(int n)</code></div>
|
|
<div class="col-last odd-row-color">
|
|
<div class="block">Konstruktor mit Vektor länge n</div>
|
|
</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>void</code></div>
|
|
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#add(SparseVector)" class="member-name-link">add</a><wbr>(<a href="SparseVector.html" title="Klasse in Unbenanntes Package">SparseVector</a> other)</code></div>
|
|
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
|
|
<div class="block">to add two vectors together and renew (overwrite) the this.vector</div>
|
|
</div>
|
|
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
|
|
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#equals(SparseVector)" class="member-name-link">equals</a><wbr>(<a href="SparseVector.html" title="Klasse in Unbenanntes Package">SparseVector</a> other)</code></div>
|
|
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
|
|
<div class="block">testen, ob other = this (nur vergleichen die Nicht-Null Elemente)</div>
|
|
</div>
|
|
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>double</code></div>
|
|
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getElement(int)" class="member-name-link">getElement</a><wbr>(int index)</code></div>
|
|
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
|
|
<div class="block">return the Wert value of that index input das Index, und return den
|
|
entsprechenden Wert des Index</div>
|
|
</div>
|
|
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int</code></div>
|
|
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getLength()" class="member-name-link">getLength</a>()</code></div>
|
|
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
|
|
<div class="block">Länge des Vektors ausgeben</div>
|
|
</div>
|
|
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
|
|
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#removeElement(int)" class="member-name-link">removeElement</a><wbr>(int index)</code></div>
|
|
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
|
|
<div class="block">entfernt Element nach Index</div>
|
|
</div>
|
|
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
|
|
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setElement(int,double)" class="member-name-link">setElement</a><wbr>(int index,
|
|
double value)</code></div>
|
|
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
|
|
<div class="block">den value in index hinzufügen - Aktualiiseren des Wertes, wenn der head an
|
|
dem Index mit einem Wert exisitiert - Neuer head mit neuem Wert hinzufügen,
|
|
wenn der head an dem Index nicht existiert</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="inherited-list">
|
|
<h3 id="methods-inherited-from-class-java.lang.Object">Von Klasse geerbte Methoden java.lang.<a href="https://docs.oracle.com/en/java/javase/19/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/19/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/19/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/19/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/19/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/19/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/19/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/19/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/19/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/19/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/19/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/19/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="<init>()">
|
|
<h3>SparseVector</h3>
|
|
<div class="member-signature"><span class="modifiers">public</span> <span class="element-name">SparseVector</span>()</div>
|
|
<div class="block">Konstruktor mit Vektor länge 0</div>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="<init>(int)">
|
|
<h3>SparseVector</h3>
|
|
<div class="member-signature"><span class="modifiers">public</span> <span class="element-name">SparseVector</span><wbr><span class="parameters">(int n)</span></div>
|
|
<div class="block">Konstruktor mit Vektor länge n</div>
|
|
<dl class="notes">
|
|
<dt>Parameter:</dt>
|
|
<dd><code>n</code> - Vektor länge</dd>
|
|
</dl>
|
|
</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="setElement(int,double)">
|
|
<h3>setElement</h3>
|
|
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">setElement</span><wbr><span class="parameters">(int index,
|
|
double value)</span></div>
|
|
<div class="block">den value in index hinzufügen - Aktualiiseren des Wertes, wenn der head an
|
|
dem Index mit einem Wert exisitiert - Neuer head mit neuem Wert hinzufügen,
|
|
wenn der head an dem Index nicht existiert</div>
|
|
<dl class="notes">
|
|
<dt>Parameter:</dt>
|
|
<dd><code>index</code> - Index des zu setzenden Wertes</dd>
|
|
<dd><code>value</code> - Wert, welcher eingesetzt werden soll</dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="getElement(int)">
|
|
<h3>getElement</h3>
|
|
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">double</span> <span class="element-name">getElement</span><wbr><span class="parameters">(int index)</span></div>
|
|
<div class="block">return the Wert value of that index input das Index, und return den
|
|
entsprechenden Wert des Index</div>
|
|
<dl class="notes">
|
|
<dt>Parameter:</dt>
|
|
<dd><code>index</code> - Stelle, an der der Wert steht</dd>
|
|
<dt>Gibt zurück:</dt>
|
|
<dd>double Wert des Elements</dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="removeElement(int)">
|
|
<h3>removeElement</h3>
|
|
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">removeElement</span><wbr><span class="parameters">(int index)</span></div>
|
|
<div class="block">entfernt Element nach Index</div>
|
|
<dl class="notes">
|
|
<dt>Parameter:</dt>
|
|
<dd><code>index</code> - Stelle des zu entferneden Elements</dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="getLength()">
|
|
<h3>getLength</h3>
|
|
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">int</span> <span class="element-name">getLength</span>()</div>
|
|
<div class="block">Länge des Vektors ausgeben</div>
|
|
<dl class="notes">
|
|
<dt>Gibt zurück:</dt>
|
|
<dd>int [Beschreibung]</dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="equals(SparseVector)">
|
|
<h3>equals</h3>
|
|
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">boolean</span> <span class="element-name">equals</span><wbr><span class="parameters">(<a href="SparseVector.html" title="Klasse in Unbenanntes Package">SparseVector</a> other)</span></div>
|
|
<div class="block">testen, ob other = this (nur vergleichen die Nicht-Null Elemente)</div>
|
|
<dl class="notes">
|
|
<dt>Parameter:</dt>
|
|
<dd><code>other</code> - Anderer Vektor, mit dem verglichen wird</dd>
|
|
<dt>Gibt zurück:</dt>
|
|
<dd>boolean Wahrheitswert, ob Vektoren gleich sind</dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="add(SparseVector)">
|
|
<h3>add</h3>
|
|
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">add</span><wbr><span class="parameters">(<a href="SparseVector.html" title="Klasse in Unbenanntes Package">SparseVector</a> other)</span></div>
|
|
<div class="block">to add two vectors together and renew (overwrite) the this.vector</div>
|
|
<dl class="notes">
|
|
<dt>Parameter:</dt>
|
|
<dd><code>other</code> - Anderer Vektor, der auf addiert wird</dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<!-- ========= END OF CLASS DATA ========= -->
|
|
</main>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|