|
| 1 | +<!DOCTYPE html> |
| 2 | +<!--[if IE]><![endif]--> |
| 3 | +<html> |
| 4 | + |
| 5 | + <head> |
| 6 | + <meta charset="utf-8"> |
| 7 | + <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| 8 | + <title>Class BinomialHeap<T> |
| 9 | + | Advanced Algorithms </title> |
| 10 | + <meta name="viewport" content="width=device-width"> |
| 11 | + <meta name="title" content="Class BinomialHeap<T> |
| 12 | + | Advanced Algorithms "> |
| 13 | + <meta name="generator" content="docfx 2.40.1.0"> |
| 14 | + |
| 15 | + <link rel="shortcut icon" href="../favicon.ico"> |
| 16 | + <link rel="stylesheet" href="../styles/docfx.vendor.css"> |
| 17 | + <link rel="stylesheet" href="../styles/docfx.css"> |
| 18 | + <link rel="stylesheet" href="../styles/main.css"> |
| 19 | + <meta property="docfx:navrel" content=""> |
| 20 | + <meta property="docfx:tocrel" content="toc.html"> |
| 21 | + |
| 22 | + <meta property="docfx:rel" content="../"> |
| 23 | + |
| 24 | + </head> |
| 25 | + <body data-spy="scroll" data-target="#affix" data-offset="120"> |
| 26 | + <div id="wrapper"> |
| 27 | + <header> |
| 28 | + |
| 29 | + <nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation"> |
| 30 | + <div class="container"> |
| 31 | + <div class="navbar-header"> |
| 32 | + <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar"> |
| 33 | + <span class="sr-only">Toggle navigation</span> |
| 34 | + <span class="icon-bar"></span> |
| 35 | + <span class="icon-bar"></span> |
| 36 | + <span class="icon-bar"></span> |
| 37 | + </button> |
| 38 | + |
| 39 | + <a class="navbar-brand" href="../index.html"> |
| 40 | + <img id="logo" class="svg" src="../logo.svg" alt=""> |
| 41 | + </a> |
| 42 | + </div> |
| 43 | + <div class="collapse navbar-collapse" id="navbar"> |
| 44 | + <form class="navbar-form navbar-right" role="search" id="search"> |
| 45 | + <div class="form-group"> |
| 46 | + <input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off"> |
| 47 | + </div> |
| 48 | + </form> |
| 49 | + </div> |
| 50 | + </div> |
| 51 | + </nav> |
| 52 | + |
| 53 | + <div class="subnav navbar navbar-default"> |
| 54 | + <div class="container hide-when-search" id="breadcrumb"> |
| 55 | + <ul class="breadcrumb"> |
| 56 | + <li></li> |
| 57 | + </ul> |
| 58 | + </div> |
| 59 | + </div> |
| 60 | + </header> |
| 61 | + <div class="container body-content"> |
| 62 | + |
| 63 | + <div id="search-results"> |
| 64 | + <div class="search-list"></div> |
| 65 | + <div class="sr-items"> |
| 66 | + <p><i class="glyphicon glyphicon-refresh index-loading"></i></p> |
| 67 | + </div> |
| 68 | + <ul id="pagination"></ul> |
| 69 | + </div> |
| 70 | + </div> |
| 71 | + <div role="main" class="container body-content hide-when-search"> |
| 72 | + |
| 73 | + <div class="sidenav hide-when-search"> |
| 74 | + <a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a> |
| 75 | + <div class="sidetoggle collapse" id="sidetoggle"> |
| 76 | + <div id="sidetoc"></div> |
| 77 | + </div> |
| 78 | + </div> |
| 79 | + <div class="article row grid-right"> |
| 80 | + <div class="col-md-10"> |
| 81 | + <article class="content wrap" id="_content" data-uid="Advanced.Algorithms.DataStructures.BinomialHeap`1"> |
| 82 | + |
| 83 | + |
| 84 | + <h1 id="Advanced_Algorithms_DataStructures_BinomialHeap_1" data-uid="Advanced.Algorithms.DataStructures.BinomialHeap`1" class="text-break">Class BinomialHeap<T> |
| 85 | + </h1> |
| 86 | + <div class="markdown level0 summary"><p>A binomial minMax heap implementation.</p> |
| 87 | +</div> |
| 88 | + <div class="markdown level0 conceptual"></div> |
| 89 | + <div class="inheritance"> |
| 90 | + <h5>Inheritance</h5> |
| 91 | + <div class="level0"><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object">Object</a></div> |
| 92 | + <div class="level1"><span class="xref">BinomialHeap<T></span></div> |
| 93 | + </div> |
| 94 | + <h6><strong>Namespace</strong>: <a class="xref" href="Advanced.Algorithms.DataStructures.html">Advanced.Algorithms.DataStructures</a></h6> |
| 95 | + <h6><strong>Assembly</strong>: Advanced.Algorithms.dll</h6> |
| 96 | + <h5 id="Advanced_Algorithms_DataStructures_BinomialHeap_1_syntax">Syntax</h5> |
| 97 | + <div class="codewrapper"> |
| 98 | + <pre><code class="lang-csharp hljs">public class BinomialHeap<T> : IEnumerable<T> where T : IComparable</code></pre> |
| 99 | + </div> |
| 100 | + <h5 class="typeParameters">Type Parameters</h5> |
| 101 | + <table class="table table-bordered table-striped table-condensed"> |
| 102 | + <thead> |
| 103 | + <tr> |
| 104 | + <th>Name</th> |
| 105 | + <th>Description</th> |
| 106 | + </tr> |
| 107 | + </thead> |
| 108 | + <tbody> |
| 109 | + <tr> |
| 110 | + <td><span class="parametername">T</span></td> |
| 111 | + <td></td> |
| 112 | + </tr> |
| 113 | + </tbody> |
| 114 | + </table> |
| 115 | + <h3 id="constructors">Constructors |
| 116 | + </h3> |
| 117 | + |
| 118 | + |
| 119 | + <a id="Advanced_Algorithms_DataStructures_BinomialHeap_1__ctor_" data-uid="Advanced.Algorithms.DataStructures.BinomialHeap`1.#ctor*"></a> |
| 120 | + <h4 id="Advanced_Algorithms_DataStructures_BinomialHeap_1__ctor_System_Boolean_" data-uid="Advanced.Algorithms.DataStructures.BinomialHeap`1.#ctor(System.Boolean)">BinomialHeap(Boolean)</h4> |
| 121 | + <div class="markdown level1 summary"></div> |
| 122 | + <div class="markdown level1 conceptual"></div> |
| 123 | + <h5 class="decalaration">Declaration</h5> |
| 124 | + <div class="codewrapper"> |
| 125 | + <pre><code class="lang-csharp hljs">public BinomialHeap(bool isMax = false)</code></pre> |
| 126 | + </div> |
| 127 | + <h5 class="parameters">Parameters</h5> |
| 128 | + <table class="table table-bordered table-striped table-condensed"> |
| 129 | + <thead> |
| 130 | + <tr> |
| 131 | + <th>Type</th> |
| 132 | + <th>Name</th> |
| 133 | + <th>Description</th> |
| 134 | + </tr> |
| 135 | + </thead> |
| 136 | + <tbody> |
| 137 | + <tr> |
| 138 | + <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.boolean">Boolean</a></td> |
| 139 | + <td><span class="parametername">isMax</span></td> |
| 140 | + <td></td> |
| 141 | + </tr> |
| 142 | + </tbody> |
| 143 | + </table> |
| 144 | + <h3 id="properties">Properties |
| 145 | + </h3> |
| 146 | + |
| 147 | + |
| 148 | + <a id="Advanced_Algorithms_DataStructures_BinomialHeap_1_Count_" data-uid="Advanced.Algorithms.DataStructures.BinomialHeap`1.Count*"></a> |
| 149 | + <h4 id="Advanced_Algorithms_DataStructures_BinomialHeap_1_Count" data-uid="Advanced.Algorithms.DataStructures.BinomialHeap`1.Count">Count</h4> |
| 150 | + <div class="markdown level1 summary"></div> |
| 151 | + <div class="markdown level1 conceptual"></div> |
| 152 | + <h5 class="decalaration">Declaration</h5> |
| 153 | + <div class="codewrapper"> |
| 154 | + <pre><code class="lang-csharp hljs">public int Count { get; }</code></pre> |
| 155 | + </div> |
| 156 | + <h5 class="propertyValue">Property Value</h5> |
| 157 | + <table class="table table-bordered table-striped table-condensed"> |
| 158 | + <thead> |
| 159 | + <tr> |
| 160 | + <th>Type</th> |
| 161 | + <th>Description</th> |
| 162 | + </tr> |
| 163 | + </thead> |
| 164 | + <tbody> |
| 165 | + <tr> |
| 166 | + <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.int32">Int32</a></td> |
| 167 | + <td></td> |
| 168 | + </tr> |
| 169 | + </tbody> |
| 170 | + </table> |
| 171 | + <h3 id="methods">Methods |
| 172 | + </h3> |
| 173 | + |
| 174 | + |
| 175 | + <a id="Advanced_Algorithms_DataStructures_BinomialHeap_1_Extract_" data-uid="Advanced.Algorithms.DataStructures.BinomialHeap`1.Extract*"></a> |
| 176 | + <h4 id="Advanced_Algorithms_DataStructures_BinomialHeap_1_Extract" data-uid="Advanced.Algorithms.DataStructures.BinomialHeap`1.Extract">Extract()</h4> |
| 177 | + <div class="markdown level1 summary"><p>Time complexity: O(log(n)).</p> |
| 178 | +</div> |
| 179 | + <div class="markdown level1 conceptual"></div> |
| 180 | + <h5 class="decalaration">Declaration</h5> |
| 181 | + <div class="codewrapper"> |
| 182 | + <pre><code class="lang-csharp hljs">public T Extract()</code></pre> |
| 183 | + </div> |
| 184 | + <h5 class="returns">Returns</h5> |
| 185 | + <table class="table table-bordered table-striped table-condensed"> |
| 186 | + <thead> |
| 187 | + <tr> |
| 188 | + <th>Type</th> |
| 189 | + <th>Description</th> |
| 190 | + </tr> |
| 191 | + </thead> |
| 192 | + <tbody> |
| 193 | + <tr> |
| 194 | + <td><span class="xref">T</span></td> |
| 195 | + <td></td> |
| 196 | + </tr> |
| 197 | + </tbody> |
| 198 | + </table> |
| 199 | + |
| 200 | + |
| 201 | + <a id="Advanced_Algorithms_DataStructures_BinomialHeap_1_GetEnumerator_" data-uid="Advanced.Algorithms.DataStructures.BinomialHeap`1.GetEnumerator*"></a> |
| 202 | + <h4 id="Advanced_Algorithms_DataStructures_BinomialHeap_1_GetEnumerator" data-uid="Advanced.Algorithms.DataStructures.BinomialHeap`1.GetEnumerator">GetEnumerator()</h4> |
| 203 | + <div class="markdown level1 summary"></div> |
| 204 | + <div class="markdown level1 conceptual"></div> |
| 205 | + <h5 class="decalaration">Declaration</h5> |
| 206 | + <div class="codewrapper"> |
| 207 | + <pre><code class="lang-csharp hljs">public IEnumerator<T> GetEnumerator()</code></pre> |
| 208 | + </div> |
| 209 | + <h5 class="returns">Returns</h5> |
| 210 | + <table class="table table-bordered table-striped table-condensed"> |
| 211 | + <thead> |
| 212 | + <tr> |
| 213 | + <th>Type</th> |
| 214 | + <th>Description</th> |
| 215 | + </tr> |
| 216 | + </thead> |
| 217 | + <tbody> |
| 218 | + <tr> |
| 219 | + <td><span class="xref">IEnumerator</span><T></td> |
| 220 | + <td></td> |
| 221 | + </tr> |
| 222 | + </tbody> |
| 223 | + </table> |
| 224 | + |
| 225 | + |
| 226 | + <a id="Advanced_Algorithms_DataStructures_BinomialHeap_1_Insert_" data-uid="Advanced.Algorithms.DataStructures.BinomialHeap`1.Insert*"></a> |
| 227 | + <h4 id="Advanced_Algorithms_DataStructures_BinomialHeap_1_Insert__0_" data-uid="Advanced.Algorithms.DataStructures.BinomialHeap`1.Insert(`0)">Insert(T)</h4> |
| 228 | + <div class="markdown level1 summary"><p>Time complexity: O(log(n)).</p> |
| 229 | +</div> |
| 230 | + <div class="markdown level1 conceptual"></div> |
| 231 | + <h5 class="decalaration">Declaration</h5> |
| 232 | + <div class="codewrapper"> |
| 233 | + <pre><code class="lang-csharp hljs">public void Insert(T newItem)</code></pre> |
| 234 | + </div> |
| 235 | + <h5 class="parameters">Parameters</h5> |
| 236 | + <table class="table table-bordered table-striped table-condensed"> |
| 237 | + <thead> |
| 238 | + <tr> |
| 239 | + <th>Type</th> |
| 240 | + <th>Name</th> |
| 241 | + <th>Description</th> |
| 242 | + </tr> |
| 243 | + </thead> |
| 244 | + <tbody> |
| 245 | + <tr> |
| 246 | + <td><span class="xref">T</span></td> |
| 247 | + <td><span class="parametername">newItem</span></td> |
| 248 | + <td></td> |
| 249 | + </tr> |
| 250 | + </tbody> |
| 251 | + </table> |
| 252 | + |
| 253 | + |
| 254 | + <a id="Advanced_Algorithms_DataStructures_BinomialHeap_1_Merge_" data-uid="Advanced.Algorithms.DataStructures.BinomialHeap`1.Merge*"></a> |
| 255 | + <h4 id="Advanced_Algorithms_DataStructures_BinomialHeap_1_Merge_Advanced_Algorithms_DataStructures_BinomialHeap__0__" data-uid="Advanced.Algorithms.DataStructures.BinomialHeap`1.Merge(Advanced.Algorithms.DataStructures.BinomialHeap{`0})">Merge(BinomialHeap<T>)</h4> |
| 256 | + <div class="markdown level1 summary"><p>Time complexity: O(log(n)).</p> |
| 257 | +</div> |
| 258 | + <div class="markdown level1 conceptual"></div> |
| 259 | + <h5 class="decalaration">Declaration</h5> |
| 260 | + <div class="codewrapper"> |
| 261 | + <pre><code class="lang-csharp hljs">public void Merge(BinomialHeap<T> binomialHeap)</code></pre> |
| 262 | + </div> |
| 263 | + <h5 class="parameters">Parameters</h5> |
| 264 | + <table class="table table-bordered table-striped table-condensed"> |
| 265 | + <thead> |
| 266 | + <tr> |
| 267 | + <th>Type</th> |
| 268 | + <th>Name</th> |
| 269 | + <th>Description</th> |
| 270 | + </tr> |
| 271 | + </thead> |
| 272 | + <tbody> |
| 273 | + <tr> |
| 274 | + <td><a class="xref" href="Advanced.Algorithms.DataStructures.BinomialHeap-1.html">BinomialHeap</a><T></td> |
| 275 | + <td><span class="parametername">binomialHeap</span></td> |
| 276 | + <td><p>The heap to union with.</p> |
| 277 | +</td> |
| 278 | + </tr> |
| 279 | + </tbody> |
| 280 | + </table> |
| 281 | + |
| 282 | + |
| 283 | + <a id="Advanced_Algorithms_DataStructures_BinomialHeap_1_Peek_" data-uid="Advanced.Algorithms.DataStructures.BinomialHeap`1.Peek*"></a> |
| 284 | + <h4 id="Advanced_Algorithms_DataStructures_BinomialHeap_1_Peek" data-uid="Advanced.Algorithms.DataStructures.BinomialHeap`1.Peek">Peek()</h4> |
| 285 | + <div class="markdown level1 summary"><p>Time complexity: O(log(n)).</p> |
| 286 | +</div> |
| 287 | + <div class="markdown level1 conceptual"></div> |
| 288 | + <h5 class="decalaration">Declaration</h5> |
| 289 | + <div class="codewrapper"> |
| 290 | + <pre><code class="lang-csharp hljs">public T Peek()</code></pre> |
| 291 | + </div> |
| 292 | + <h5 class="returns">Returns</h5> |
| 293 | + <table class="table table-bordered table-striped table-condensed"> |
| 294 | + <thead> |
| 295 | + <tr> |
| 296 | + <th>Type</th> |
| 297 | + <th>Description</th> |
| 298 | + </tr> |
| 299 | + </thead> |
| 300 | + <tbody> |
| 301 | + <tr> |
| 302 | + <td><span class="xref">T</span></td> |
| 303 | + <td></td> |
| 304 | + </tr> |
| 305 | + </tbody> |
| 306 | + </table> |
| 307 | + |
| 308 | + |
| 309 | + <a id="Advanced_Algorithms_DataStructures_BinomialHeap_1_UpdateKey_" data-uid="Advanced.Algorithms.DataStructures.BinomialHeap`1.UpdateKey*"></a> |
| 310 | + <h4 id="Advanced_Algorithms_DataStructures_BinomialHeap_1_UpdateKey__0__0_" data-uid="Advanced.Algorithms.DataStructures.BinomialHeap`1.UpdateKey(`0,`0)">UpdateKey(T, T)</h4> |
| 311 | + <div class="markdown level1 summary"><p>Time complexity: O(log(n)).</p> |
| 312 | +</div> |
| 313 | + <div class="markdown level1 conceptual"></div> |
| 314 | + <h5 class="decalaration">Declaration</h5> |
| 315 | + <div class="codewrapper"> |
| 316 | + <pre><code class="lang-csharp hljs">public void UpdateKey(T currentValue, T newValue)</code></pre> |
| 317 | + </div> |
| 318 | + <h5 class="parameters">Parameters</h5> |
| 319 | + <table class="table table-bordered table-striped table-condensed"> |
| 320 | + <thead> |
| 321 | + <tr> |
| 322 | + <th>Type</th> |
| 323 | + <th>Name</th> |
| 324 | + <th>Description</th> |
| 325 | + </tr> |
| 326 | + </thead> |
| 327 | + <tbody> |
| 328 | + <tr> |
| 329 | + <td><span class="xref">T</span></td> |
| 330 | + <td><span class="parametername">currentValue</span></td> |
| 331 | + <td><p>The value to update.</p> |
| 332 | +</td> |
| 333 | + </tr> |
| 334 | + <tr> |
| 335 | + <td><span class="xref">T</span></td> |
| 336 | + <td><span class="parametername">newValue</span></td> |
| 337 | + <td><p>The updated new value.</p> |
| 338 | +</td> |
| 339 | + </tr> |
| 340 | + </tbody> |
| 341 | + </table> |
| 342 | +</article> |
| 343 | + </div> |
| 344 | + |
| 345 | + <div class="hidden-sm col-md-2" role="complementary"> |
| 346 | + <div class="sideaffix"> |
| 347 | + <div class="contribution"> |
| 348 | + <ul class="nav"> |
| 349 | + </ul> |
| 350 | + </div> |
| 351 | + <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix"> |
| 352 | + <!-- <p><a class="back-to-top" href="#top">Back to top</a><p> --> |
| 353 | + </nav> |
| 354 | + </div> |
| 355 | + </div> |
| 356 | + </div> |
| 357 | + </div> |
| 358 | + |
| 359 | + <footer> |
| 360 | + <div class="grad-bottom"></div> |
| 361 | + <div class="footer"> |
| 362 | + <div class="container"> |
| 363 | + <span class="pull-right"> |
| 364 | + <a href="#top">Back to top</a> |
| 365 | + </span> |
| 366 | + |
| 367 | + <span>Generated by <strong>DocFX</strong></span> |
| 368 | + </div> |
| 369 | + </div> |
| 370 | + </footer> |
| 371 | + </div> |
| 372 | + |
| 373 | + <script type="text/javascript" src="../styles/docfx.vendor.js"></script> |
| 374 | + <script type="text/javascript" src="../styles/docfx.js"></script> |
| 375 | + <script type="text/javascript" src="../styles/main.js"></script> |
| 376 | + </body> |
| 377 | +</html> |
0 commit comments