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

  1. <!DOCTYPE HTML>
  2. <html lang="de">
  3. <head>
  4. <!-- Generated by javadoc (19) on Fri Nov 24 16:28:07 CET 2023 -->
  5. <title>SparseVector</title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1">
  7. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  8. <meta name="dc.created" content="2023-11-24">
  9. <meta name="description" content="declaration: class: SparseVector">
  10. <meta name="generator" content="javadoc/ClassWriterImpl">
  11. <link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
  12. <link rel="stylesheet" type="text/css" href="script-dir/jquery-ui.min.css" title="Style">
  13. <link rel="stylesheet" type="text/css" href="jquery-ui.overrides.css" title="Style">
  14. <script type="text/javascript" src="script.js"></script>
  15. <script type="text/javascript" src="script-dir/jquery-3.6.0.min.js"></script>
  16. <script type="text/javascript" src="script-dir/jquery-ui.min.js"></script>
  17. </head>
  18. <body class="class-declaration-page">
  19. <script type="text/javascript">var pathtoroot = "./";
  20. loadScripts(document, 'script');</script>
  21. <noscript>
  22. <div>JavaScript ist im Browser deaktiviert.</div>
  23. </noscript>
  24. <div class="flex-box">
  25. <header role="banner" class="flex-header">
  26. <nav role="navigation">
  27. <!-- ========= START OF TOP NAVBAR ======= -->
  28. <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>
  29. <div class="skip-nav"><a href="#skip-navbar-top" title="Navigations-Links überspringen">Navigations-Links überspringen</a></div>
  30. <ul id="navbar-top-firstrow" class="nav-list" title="Navigation">
  31. <li><a href="package-summary.html">Package</a></li>
  32. <li class="nav-bar-cell1-rev">Klasse</li>
  33. <li><a href="package-tree.html">Baum</a></li>
  34. <li><a href="index-files/index-1.html">Index</a></li>
  35. <li><a href="help-doc.html#class">Hilfe</a></li>
  36. </ul>
  37. <ul class="sub-nav-list-small">
  38. <li>
  39. <p>Übersicht:</p>
  40. <ul>
  41. <li>Verschachtelt</li>
  42. <li>Feld</li>
  43. <li><a href="#constructor-summary">Konstruktor</a></li>
  44. <li><a href="#method-summary">Methode</a></li>
  45. </ul>
  46. </li>
  47. <li>
  48. <p>Details:</p>
  49. <ul>
  50. <li>Feld</li>
  51. <li><a href="#constructor-detail">Konstruktor</a></li>
  52. <li><a href="#method-detail">Methode</a></li>
  53. </ul>
  54. </li>
  55. </ul>
  56. </div>
  57. <div class="sub-nav">
  58. <div id="navbar-sub-list">
  59. <ul class="sub-nav-list">
  60. <li>Übersicht:&nbsp;</li>
  61. <li>Verschachtelt&nbsp;|&nbsp;</li>
  62. <li>Feld&nbsp;|&nbsp;</li>
  63. <li><a href="#constructor-summary">Konstruktor</a>&nbsp;|&nbsp;</li>
  64. <li><a href="#method-summary">Methode</a></li>
  65. </ul>
  66. <ul class="sub-nav-list">
  67. <li>Details:&nbsp;</li>
  68. <li>Feld&nbsp;|&nbsp;</li>
  69. <li><a href="#constructor-detail">Konstruktor</a>&nbsp;|&nbsp;</li>
  70. <li><a href="#method-detail">Methode</a></li>
  71. </ul>
  72. </div>
  73. <div class="nav-list-search"><a href="search.html">SEARCH:</a>
  74. <input type="text" id="search-input" disabled placeholder="Suchen">
  75. <input type="reset" id="reset-button" disabled value="reset">
  76. </div>
  77. </div>
  78. <!-- ========= END OF TOP NAVBAR ========= -->
  79. <span class="skip-nav" id="skip-navbar-top"></span></nav>
  80. </header>
  81. <div class="flex-content">
  82. <main role="main">
  83. <!-- ======== START OF CLASS DATA ======== -->
  84. <div class="header">
  85. <h1 title="Klasse SparseVector" class="title">Klasse SparseVector</h1>
  86. </div>
  87. <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>
  88. <div class="inheritance">SparseVector</div>
  89. </div>
  90. <section class="class-description" id="class-description">
  91. <hr>
  92. <div class="type-signature"><span class="modifiers">public class </span><span class="element-name type-name-label">SparseVector</span>
  93. <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>
  94. <div class="block">Sparse Implementierung einer verkettete Liste</div>
  95. </section>
  96. <section class="summary">
  97. <ul class="summary-list">
  98. <!-- ======== CONSTRUCTOR SUMMARY ======== -->
  99. <li>
  100. <section class="constructor-summary" id="constructor-summary">
  101. <h2>Konstruktorübersicht</h2>
  102. <div class="caption"><span>Konstruktoren</span></div>
  103. <div class="summary-table two-column-summary">
  104. <div class="table-header col-first">Konstruktor</div>
  105. <div class="table-header col-last">Beschreibung</div>
  106. <div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E()" class="member-name-link">SparseVector</a>()</code></div>
  107. <div class="col-last even-row-color">
  108. <div class="block">Konstruktor mit Vektor länge 0</div>
  109. </div>
  110. <div class="col-constructor-name odd-row-color"><code><a href="#%3Cinit%3E(int)" class="member-name-link">SparseVector</a><wbr>(int&nbsp;n)</code></div>
  111. <div class="col-last odd-row-color">
  112. <div class="block">Konstruktor mit Vektor länge n</div>
  113. </div>
  114. </div>
  115. </section>
  116. </li>
  117. <!-- ========== METHOD SUMMARY =========== -->
  118. <li>
  119. <section class="method-summary" id="method-summary">
  120. <h2>Methodenübersicht</h2>
  121. <div id="method-summary-table">
  122. <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>
  123. <div id="method-summary-table.tabpanel" role="tabpanel">
  124. <div class="summary-table three-column-summary" aria-labelledby="method-summary-table-tab0">
  125. <div class="table-header col-first">Modifizierer und Typ</div>
  126. <div class="table-header col-second">Methode</div>
  127. <div class="table-header col-last">Beschreibung</div>
  128. <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
  129. <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>&nbsp;other)</code></div>
  130. <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
  131. <div class="block">to add two vectors together and renew (overwrite) the this.vector</div>
  132. </div>
  133. <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
  134. <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>&nbsp;other)</code></div>
  135. <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
  136. <div class="block">testen, ob other = this (nur vergleichen die Nicht-Null Elemente)</div>
  137. </div>
  138. <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>double</code></div>
  139. <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&nbsp;index)</code></div>
  140. <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
  141. <div class="block">return the Wert value of that index input das Index, und return den
  142. entsprechenden Wert des Index</div>
  143. </div>
  144. <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int</code></div>
  145. <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>
  146. <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
  147. <div class="block">Länge des Vektors ausgeben</div>
  148. </div>
  149. <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
  150. <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&nbsp;index)</code></div>
  151. <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
  152. <div class="block">entfernt Element nach Index</div>
  153. </div>
  154. <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
  155. <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&nbsp;index,
  156. double&nbsp;value)</code></div>
  157. <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
  158. <div class="block">den value in index hinzufügen - Aktualiiseren des Wertes, wenn der head an
  159. dem Index mit einem Wert exisitiert - Neuer head mit neuem Wert hinzufügen,
  160. wenn der head an dem Index nicht existiert</div>
  161. </div>
  162. </div>
  163. </div>
  164. </div>
  165. <div class="inherited-list">
  166. <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/19/docs/api/java.base/java/lang/Object.html" title="Klasse oder Schnittstelle in java.lang" class="external-link">Object</a></h3>
  167. <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>
  168. </section>
  169. </li>
  170. </ul>
  171. </section>
  172. <section class="details">
  173. <ul class="details-list">
  174. <!-- ========= CONSTRUCTOR DETAIL ======== -->
  175. <li>
  176. <section class="constructor-details" id="constructor-detail">
  177. <h2>Konstruktordetails</h2>
  178. <ul class="member-list">
  179. <li>
  180. <section class="detail" id="&lt;init&gt;()">
  181. <h3>SparseVector</h3>
  182. <div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">SparseVector</span>()</div>
  183. <div class="block">Konstruktor mit Vektor länge 0</div>
  184. </section>
  185. </li>
  186. <li>
  187. <section class="detail" id="&lt;init&gt;(int)">
  188. <h3>SparseVector</h3>
  189. <div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">SparseVector</span><wbr><span class="parameters">(int&nbsp;n)</span></div>
  190. <div class="block">Konstruktor mit Vektor länge n</div>
  191. <dl class="notes">
  192. <dt>Parameter:</dt>
  193. <dd><code>n</code> - Vektor länge</dd>
  194. </dl>
  195. </section>
  196. </li>
  197. </ul>
  198. </section>
  199. </li>
  200. <!-- ============ METHOD DETAIL ========== -->
  201. <li>
  202. <section class="method-details" id="method-detail">
  203. <h2>Methodendetails</h2>
  204. <ul class="member-list">
  205. <li>
  206. <section class="detail" id="setElement(int,double)">
  207. <h3>setElement</h3>
  208. <div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">setElement</span><wbr><span class="parameters">(int&nbsp;index,
  209. double&nbsp;value)</span></div>
  210. <div class="block">den value in index hinzufügen - Aktualiiseren des Wertes, wenn der head an
  211. dem Index mit einem Wert exisitiert - Neuer head mit neuem Wert hinzufügen,
  212. wenn der head an dem Index nicht existiert</div>
  213. <dl class="notes">
  214. <dt>Parameter:</dt>
  215. <dd><code>index</code> - Index des zu setzenden Wertes</dd>
  216. <dd><code>value</code> - Wert, welcher eingesetzt werden soll</dd>
  217. </dl>
  218. </section>
  219. </li>
  220. <li>
  221. <section class="detail" id="getElement(int)">
  222. <h3>getElement</h3>
  223. <div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">double</span>&nbsp;<span class="element-name">getElement</span><wbr><span class="parameters">(int&nbsp;index)</span></div>
  224. <div class="block">return the Wert value of that index input das Index, und return den
  225. entsprechenden Wert des Index</div>
  226. <dl class="notes">
  227. <dt>Parameter:</dt>
  228. <dd><code>index</code> - Stelle, an der der Wert steht</dd>
  229. <dt>Gibt zurück:</dt>
  230. <dd>double Wert des Elements</dd>
  231. </dl>
  232. </section>
  233. </li>
  234. <li>
  235. <section class="detail" id="removeElement(int)">
  236. <h3>removeElement</h3>
  237. <div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">removeElement</span><wbr><span class="parameters">(int&nbsp;index)</span></div>
  238. <div class="block">entfernt Element nach Index</div>
  239. <dl class="notes">
  240. <dt>Parameter:</dt>
  241. <dd><code>index</code> - Stelle des zu entferneden Elements</dd>
  242. </dl>
  243. </section>
  244. </li>
  245. <li>
  246. <section class="detail" id="getLength()">
  247. <h3>getLength</h3>
  248. <div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name">getLength</span>()</div>
  249. <div class="block">Länge des Vektors ausgeben</div>
  250. <dl class="notes">
  251. <dt>Gibt zurück:</dt>
  252. <dd>int [Beschreibung]</dd>
  253. </dl>
  254. </section>
  255. </li>
  256. <li>
  257. <section class="detail" id="equals(SparseVector)">
  258. <h3>equals</h3>
  259. <div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">equals</span><wbr><span class="parameters">(<a href="SparseVector.html" title="Klasse in Unbenanntes Package">SparseVector</a>&nbsp;other)</span></div>
  260. <div class="block">testen, ob other = this (nur vergleichen die Nicht-Null Elemente)</div>
  261. <dl class="notes">
  262. <dt>Parameter:</dt>
  263. <dd><code>other</code> - Anderer Vektor, mit dem verglichen wird</dd>
  264. <dt>Gibt zurück:</dt>
  265. <dd>boolean Wahrheitswert, ob Vektoren gleich sind</dd>
  266. </dl>
  267. </section>
  268. </li>
  269. <li>
  270. <section class="detail" id="add(SparseVector)">
  271. <h3>add</h3>
  272. <div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">add</span><wbr><span class="parameters">(<a href="SparseVector.html" title="Klasse in Unbenanntes Package">SparseVector</a>&nbsp;other)</span></div>
  273. <div class="block">to add two vectors together and renew (overwrite) the this.vector</div>
  274. <dl class="notes">
  275. <dt>Parameter:</dt>
  276. <dd><code>other</code> - Anderer Vektor, der auf addiert wird</dd>
  277. </dl>
  278. </section>
  279. </li>
  280. </ul>
  281. </section>
  282. </li>
  283. </ul>
  284. </section>
  285. <!-- ========= END OF CLASS DATA ========= -->
  286. </main>
  287. </div>
  288. </div>
  289. </body>
  290. </html>