5
5
< head >
6
6
< meta charset ="utf-8 ">
7
7
< meta http-equiv ="X-UA-Compatible " content ="IE=edge,chrome=1 ">
8
- < title > Class Dictionary<TK, TV >
8
+ < title > Class Dictionary<K, V >
9
9
| Advanced Algorithms </ title >
10
10
< meta name ="viewport " content ="width=device-width ">
11
- < meta name ="title " content ="Class Dictionary<TK, TV >
11
+ < meta name ="title " content ="Class Dictionary<K, V >
12
12
| Advanced Algorithms ">
13
13
< meta name ="generator " content ="docfx 2.37.1.0 ">
14
14
81
81
< article class ="content wrap " id ="_content " data-uid ="Advanced.Algorithms.DataStructures.Dictionary`2 ">
82
82
83
83
84
- < h1 id ="Advanced_Algorithms_DataStructures_Dictionary_2 " data-uid ="Advanced.Algorithms.DataStructures.Dictionary`2 " class ="text-break "> Class Dictionary<TK, TV >
84
+ < h1 id ="Advanced_Algorithms_DataStructures_Dictionary_2 " data-uid ="Advanced.Algorithms.DataStructures.Dictionary`2 " class ="text-break "> Class Dictionary<K, V >
85
85
</ h1 >
86
86
< div class ="markdown level0 summary "> < p > A dictionary implementation.</ p >
87
87
</ div >
88
88
< div class ="markdown level0 conceptual "> </ div >
89
89
< div class ="inheritance ">
90
90
< h5 > Inheritance</ h5 >
91
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 "> Dictionary<TK, TV ></ span > </ div >
92
+ < div class ="level1 "> < span class ="xref "> Dictionary<K, V ></ span > </ div >
93
93
</ div >
94
94
< div classs ="implements ">
95
95
< h5 > Implements</ h5 >
96
- < div > < a class ="xref " href ="https://docs.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1 "> IEnumerable</ a > << a class ="xref " href ="https://docs.microsoft.com/dotnet/api/system.collections.generic.keyvaluepair-2 "> KeyValuePair</ a > <TK, TV >></ div >
96
+ < div > < a class ="xref " href ="https://docs.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1 "> IEnumerable</ a > << a class ="xref " href ="https://docs.microsoft.com/dotnet/api/system.collections.generic.keyvaluepair-2 "> KeyValuePair</ a > <K, V >></ div >
97
97
< div > < a class ="xref " href ="https://docs.microsoft.com/dotnet/api/system.collections.ienumerable "> IEnumerable</ a > </ div >
98
98
</ div >
99
99
< div class ="inheritedMembers ">
@@ -124,7 +124,7 @@ <h6><strong>Namespace</strong>: <a class="xref" href="Advanced.Algorithms.DataSt
124
124
< h6 > < strong > Assembly</ strong > : Advanced.Algorithms.dll</ h6 >
125
125
< h5 id ="Advanced_Algorithms_DataStructures_Dictionary_2_syntax "> Syntax</ h5 >
126
126
< div class ="codewrapper ">
127
- < pre > < code class ="lang-csharp hljs "> public class Dictionary<TK, TV > : IEnumerable<KeyValuePair<TK, TV >>, IEnumerable</ code > </ pre >
127
+ < pre > < code class ="lang-csharp hljs "> public class Dictionary<K, V > : IEnumerable<KeyValuePair<K, V >>, IEnumerable</ code > </ pre >
128
128
</ div >
129
129
< h5 class ="typeParameters "> Type Parameters</ h5 >
130
130
< table class ="table table-bordered table-striped table-condensed ">
@@ -136,11 +136,12 @@ <h5 class="typeParameters">Type Parameters</h5>
136
136
</ thead >
137
137
< tbody >
138
138
< tr >
139
- < td > < span class ="parametername "> TK</ span > </ td >
140
- < td > </ td >
139
+ < td > < span class ="parametername "> K</ span > </ td >
140
+ < td > < p > The key datatype.</ p >
141
+ </ td >
141
142
</ tr >
142
143
< tr >
143
- < td > < span class ="parametername "> TV </ span > </ td >
144
+ < td > < span class ="parametername "> V </ span > </ td >
144
145
< td > < p > The value datatype.</ p >
145
146
</ td >
146
147
</ tr >
@@ -214,14 +215,14 @@ <h5 class="propertyValue">Property Value</h5>
214
215
215
216
216
217
< a id ="Advanced_Algorithms_DataStructures_Dictionary_2_Item_ " data-uid ="Advanced.Algorithms.DataStructures.Dictionary`2.Item* "> </ a >
217
- < h4 id ="Advanced_Algorithms_DataStructures_Dictionary_2_Item__0_ " data-uid ="Advanced.Algorithms.DataStructures.Dictionary`2.Item(`0) "> Item[TK ]</ h4 >
218
+ < h4 id ="Advanced_Algorithms_DataStructures_Dictionary_2_Item__0_ " data-uid ="Advanced.Algorithms.DataStructures.Dictionary`2.Item(`0) "> Item[K ]</ h4 >
218
219
< div class ="markdown level1 summary "> < p > Get/set value for given key.
219
220
Time complexity: O(1) amortized.</ p >
220
221
</ div >
221
222
< div class ="markdown level1 conceptual "> </ div >
222
223
< h5 class ="decalaration "> Declaration</ h5 >
223
224
< div class ="codewrapper ">
224
- < pre > < code class ="lang-csharp hljs "> public TV this[TK key] { get; set; }</ code > </ pre >
225
+ < pre > < code class ="lang-csharp hljs "> public V this[K key] { get; set; }</ code > </ pre >
225
226
</ div >
226
227
< h5 class ="parameters "> Parameters</ h5 >
227
228
< table class ="table table-bordered table-striped table-condensed ">
@@ -234,7 +235,7 @@ <h5 class="parameters">Parameters</h5>
234
235
</ thead >
235
236
< tbody >
236
237
< tr >
237
- < td > < span class ="xref "> TK </ span > </ td >
238
+ < td > < span class ="xref "> K </ span > </ td >
238
239
< td > < span class ="parametername "> key</ span > </ td >
239
240
< td > </ td >
240
241
</ tr >
@@ -250,7 +251,7 @@ <h5 class="propertyValue">Property Value</h5>
250
251
</ thead >
251
252
< tbody >
252
253
< tr >
253
- < td > < span class ="xref "> TV </ span > </ td >
254
+ < td > < span class ="xref "> V </ span > </ td >
254
255
< td > </ td >
255
256
</ tr >
256
257
</ tbody >
@@ -260,14 +261,14 @@ <h3 id="methods">Methods
260
261
261
262
262
263
< a id ="Advanced_Algorithms_DataStructures_Dictionary_2_Add_ " data-uid ="Advanced.Algorithms.DataStructures.Dictionary`2.Add* "> </ a >
263
- < h4 id ="Advanced_Algorithms_DataStructures_Dictionary_2_Add__0__1_ " data-uid ="Advanced.Algorithms.DataStructures.Dictionary`2.Add(`0,`1) "> Add(TK, TV )</ h4 >
264
+ < h4 id ="Advanced_Algorithms_DataStructures_Dictionary_2_Add__0__1_ " data-uid ="Advanced.Algorithms.DataStructures.Dictionary`2.Add(`0,`1) "> Add(K, V )</ h4 >
264
265
< div class ="markdown level1 summary "> < p > Add a new key for given value.
265
266
Time complexity: O(1) amortized.</ p >
266
267
</ div >
267
268
< div class ="markdown level1 conceptual "> </ div >
268
269
< h5 class ="decalaration "> Declaration</ h5 >
269
270
< div class ="codewrapper ">
270
- < pre > < code class ="lang-csharp hljs "> public void Add(TK key, TV value)</ code > </ pre >
271
+ < pre > < code class ="lang-csharp hljs "> public void Add(K key, V value)</ code > </ pre >
271
272
</ div >
272
273
< h5 class ="parameters "> Parameters</ h5 >
273
274
< table class ="table table-bordered table-striped table-condensed ">
@@ -280,13 +281,13 @@ <h5 class="parameters">Parameters</h5>
280
281
</ thead >
281
282
< tbody >
282
283
< tr >
283
- < td > < span class ="xref "> TK </ span > </ td >
284
+ < td > < span class ="xref "> K </ span > </ td >
284
285
< td > < span class ="parametername "> key</ span > </ td >
285
286
< td > < p > The key to add.</ p >
286
287
</ td >
287
288
</ tr >
288
289
< tr >
289
- < td > < span class ="xref "> TV </ span > </ td >
290
+ < td > < span class ="xref "> V </ span > </ td >
290
291
< td > < span class ="parametername "> value</ span > </ td >
291
292
< td > < p > The value for the given key.</ p >
292
293
</ td >
@@ -308,14 +309,14 @@ <h5 class="decalaration">Declaration</h5>
308
309
309
310
310
311
< a id ="Advanced_Algorithms_DataStructures_Dictionary_2_ContainsKey_ " data-uid ="Advanced.Algorithms.DataStructures.Dictionary`2.ContainsKey* "> </ a >
311
- < h4 id ="Advanced_Algorithms_DataStructures_Dictionary_2_ContainsKey__0_ " data-uid ="Advanced.Algorithms.DataStructures.Dictionary`2.ContainsKey(`0) "> ContainsKey(TK )</ h4 >
312
+ < h4 id ="Advanced_Algorithms_DataStructures_Dictionary_2_ContainsKey__0_ " data-uid ="Advanced.Algorithms.DataStructures.Dictionary`2.ContainsKey(`0) "> ContainsKey(K )</ h4 >
312
313
< div class ="markdown level1 summary "> < p > Does this dictionary contains the given key.
313
314
Time complexity: O(1) amortized.</ p >
314
315
</ div >
315
316
< div class ="markdown level1 conceptual "> </ div >
316
317
< h5 class ="decalaration "> Declaration</ h5 >
317
318
< div class ="codewrapper ">
318
- < pre > < code class ="lang-csharp hljs "> public bool ContainsKey(TK key)</ code > </ pre >
319
+ < pre > < code class ="lang-csharp hljs "> public bool ContainsKey(K key)</ code > </ pre >
319
320
</ div >
320
321
< h5 class ="parameters "> Parameters</ h5 >
321
322
< table class ="table table-bordered table-striped table-condensed ">
@@ -328,7 +329,7 @@ <h5 class="parameters">Parameters</h5>
328
329
</ thead >
329
330
< tbody >
330
331
< tr >
331
- < td > < span class ="xref "> TK </ span > </ td >
332
+ < td > < span class ="xref "> K </ span > </ td >
332
333
< td > < span class ="parametername "> key</ span > </ td >
333
334
< td > </ td >
334
335
</ tr >
@@ -358,7 +359,7 @@ <h4 id="Advanced_Algorithms_DataStructures_Dictionary_2_GetEnumerator" data-uid=
358
359
< div class ="markdown level1 conceptual "> </ div >
359
360
< h5 class ="decalaration "> Declaration</ h5 >
360
361
< div class ="codewrapper ">
361
- < pre > < code class ="lang-csharp hljs "> public IEnumerator<KeyValuePair<TK, TV >> GetEnumerator()</ code > </ pre >
362
+ < pre > < code class ="lang-csharp hljs "> public IEnumerator<KeyValuePair<K, V >> GetEnumerator()</ code > </ pre >
362
363
</ div >
363
364
< h5 class ="returns "> Returns</ h5 >
364
365
< table class ="table table-bordered table-striped table-condensed ">
@@ -370,22 +371,22 @@ <h5 class="returns">Returns</h5>
370
371
</ thead >
371
372
< tbody >
372
373
< tr >
373
- < td > < a class ="xref " href ="https://docs.microsoft.com/dotnet/api/system.collections.generic.ienumerator-1 "> IEnumerator</ a > << a class ="xref " href ="https://docs.microsoft.com/dotnet/api/system.collections.generic.keyvaluepair-2 "> KeyValuePair</ a > <TK, TV >></ td >
374
+ < td > < a class ="xref " href ="https://docs.microsoft.com/dotnet/api/system.collections.generic.ienumerator-1 "> IEnumerator</ a > << a class ="xref " href ="https://docs.microsoft.com/dotnet/api/system.collections.generic.keyvaluepair-2 "> KeyValuePair</ a > <K, V >></ td >
374
375
< td > </ td >
375
376
</ tr >
376
377
</ tbody >
377
378
</ table >
378
379
379
380
380
381
< a id ="Advanced_Algorithms_DataStructures_Dictionary_2_Remove_ " data-uid ="Advanced.Algorithms.DataStructures.Dictionary`2.Remove* "> </ a >
381
- < h4 id ="Advanced_Algorithms_DataStructures_Dictionary_2_Remove__0_ " data-uid ="Advanced.Algorithms.DataStructures.Dictionary`2.Remove(`0) "> Remove(TK )</ h4 >
382
+ < h4 id ="Advanced_Algorithms_DataStructures_Dictionary_2_Remove__0_ " data-uid ="Advanced.Algorithms.DataStructures.Dictionary`2.Remove(`0) "> Remove(K )</ h4 >
382
383
< div class ="markdown level1 summary "> < p > Remove the given key along with its value.
383
384
Time complexity: O(1) amortized.</ p >
384
385
</ div >
385
386
< div class ="markdown level1 conceptual "> </ div >
386
387
< h5 class ="decalaration "> Declaration</ h5 >
387
388
< div class ="codewrapper ">
388
- < pre > < code class ="lang-csharp hljs "> public void Remove(TK key)</ code > </ pre >
389
+ < pre > < code class ="lang-csharp hljs "> public void Remove(K key)</ code > </ pre >
389
390
</ div >
390
391
< h5 class ="parameters "> Parameters</ h5 >
391
392
< table class ="table table-bordered table-striped table-condensed ">
@@ -398,7 +399,7 @@ <h5 class="parameters">Parameters</h5>
398
399
</ thead >
399
400
< tbody >
400
401
< tr >
401
- < td > < span class ="xref "> TK </ span > </ td >
402
+ < td > < span class ="xref "> K </ span > </ td >
402
403
< td > < span class ="parametername "> key</ span > </ td >
403
404
< td > < p > The key to remove.</ p >
404
405
</ td >
0 commit comments