Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
Index.cs
Go to the documentation of this file.
4
5namespace System.Data;
6
7internal sealed class Index
8{
9 private sealed class IndexTree : RBTree<int>
10 {
11 private readonly Index _index;
12
18
19 protected override int CompareNode(int record1, int record2)
20 {
22 }
23
24 protected override int CompareSateliteTreeNode(int record1, int record2)
25 {
27 }
28 }
29
31
32 private readonly DataTable _table;
33
34 internal readonly IndexField[] _indexFields;
35
37
39
40 private readonly WeakReference _rowFilter;
41
43
44 private int _recordCount;
45
46 private int _refCount;
47
49
50 private bool _suspendEvents;
51
52 private readonly bool _isSharable;
53
54 private readonly bool _hasRemoteAggregate;
55
56 private static int s_objectTypeCount;
57
59
61
62 internal int ObjectID => _objectID;
63
65
66 public IFilter RowFilter => (IFilter)((_rowFilter != null) ? _rowFilter.Target : null);
67
69
71
72 public bool IsSharable => _isSharable;
73
74 public int RefCount => _refCount;
75
76 private bool DoListChanged
77 {
78 get
79 {
80 if (!_suspendEvents && _listeners.HasListeners)
81 {
83 }
84 return false;
85 }
86 }
87
92
97
99 {
101 for (int i = 0; i < array.Length; i++)
102 {
103 array[i] = new IndexField(columns[i], isDescending: false);
104 }
105 return array;
106 }
107
109 {
110 DataCommonEventSource.Log.Trace("<ds.Index.Index|API> {0}, table={1}, recordStates={2}", ObjectID, table?.ObjectID ?? 0, recordStates);
111 if (((uint)recordStates & 0xFFFFFFC1u) != 0)
112 {
114 }
115 _table = table;
116 _listeners = new Listeners<DataViewListener>(ObjectID, (DataViewListener listener) => listener != null);
120 _isSharable = rowFilter == null && comparison == null;
121 if (rowFilter != null)
122 {
125 {
126 _hasRemoteAggregate = dataExpression.HasRemoteAggregate();
127 }
128 }
130 }
131
133 {
134 if (!_isSharable || _indexFields.Length != indexDesc.Length || _recordStates != recordStates || rowFilter != null)
135 {
136 return false;
137 }
138 for (int i = 0; i < _indexFields.Length; i++)
139 {
140 if (_indexFields[i].Column != indexDesc[i].Column || _indexFields[i].IsDescending != indexDesc[i].IsDescending)
141 {
142 return false;
143 }
144 }
145 return true;
146 }
147
148 public int GetRecord(int recordIndex)
149 {
150 return _records[recordIndex];
151 }
152
153 private bool AcceptRecord(int record)
154 {
156 }
157
159 {
160 DataCommonEventSource.Log.Trace("<ds.Index.AcceptRecord|API> {0}, record={1}", ObjectID, record);
161 if (filter == null)
162 {
163 return true;
164 }
166 if (dataRow == null)
167 {
168 return true;
169 }
170 DataRowVersion version = DataRowVersion.Default;
171 if (dataRow._oldRecord == record)
172 {
173 version = DataRowVersion.Original;
174 }
175 else if (dataRow._newRecord == record)
176 {
177 version = DataRowVersion.Current;
178 }
179 else if (dataRow._tempRecord == record)
180 {
181 version = DataRowVersion.Proposed;
182 }
183 return filter.Invoke(dataRow, version);
184 }
185
186 internal void ListChangedAdd(DataViewListener listener)
187 {
188 _listeners.Add(listener);
189 }
190
191 internal void ListChangedRemove(DataViewListener listener)
192 {
193 _listeners.Remove(listener);
194 }
195
196 public void AddRef()
197 {
198 DataCommonEventSource.Log.Trace("<ds.Index.AddRef|API> {0}", ObjectID);
200 try
201 {
202 if (_refCount == 0)
203 {
205 _table._indexes.Add(this);
206 }
207 _refCount++;
208 }
209 finally
210 {
212 }
213 }
214
215 public int RemoveRef()
216 {
217 DataCommonEventSource.Log.Trace("<ds.Index.RemoveRef|API> {0}", ObjectID);
219 int result;
220 try
221 {
222 result = --_refCount;
223 if (_refCount <= 0)
224 {
226 _table._indexes.Remove(this);
227 }
228 }
229 finally
230 {
232 }
233 return result;
234 }
235
236 private void ApplyChangeAction(int record, int action, int changeRecord)
237 {
238 if (action == 0)
239 {
240 return;
241 }
242 if (action > 0)
243 {
244 if (AcceptRecord(record))
245 {
247 }
248 }
249 else if (_comparison != null && -1 != record)
250 {
252 }
253 else
254 {
256 }
257 }
258
259 public bool CheckUnique()
260 {
261 return !HasDuplicates;
262 }
263
264 private int CompareRecords(int record1, int record2)
265 {
266 if (_comparison != null)
267 {
269 }
270 if (_indexFields.Length != 0)
271 {
272 for (int i = 0; i < _indexFields.Length; i++)
273 {
275 if (num != 0)
276 {
277 if (!_indexFields[i].IsDescending)
278 {
279 return num;
280 }
281 return -num;
282 }
283 }
284 return 0;
285 }
290 return _table.Rows.IndexOf(row).CompareTo(_table.Rows.IndexOf(row2));
291 }
292
297
299 {
304 if (dataRow3 == null)
305 {
306 if (dataRow4 != null)
307 {
308 return -1;
309 }
310 return 0;
311 }
312 if (dataRow4 == null)
313 {
314 return 1;
315 }
316 int num = dataRow3.rowID.CompareTo(dataRow4.rowID);
317 if (num == 0 && record1 != record2)
318 {
319 num = ((int)dataRow3.GetRecordState(record1)).CompareTo((int)dataRow4.GetRecordState(record2));
320 }
321 return num;
322 }
323
324 private int CompareRecordToKey(int record1, object[] vals)
325 {
326 for (int i = 0; i < _indexFields.Length; i++)
327 {
329 if (num != 0)
330 {
331 if (!_indexFields[i].IsDescending)
332 {
333 return num;
334 }
335 return -num;
336 }
337 }
338 return 0;
339 }
340
342 {
344 }
345
346 private void DeleteRecord(int recordIndex)
347 {
349 }
350
351 private void DeleteRecord(int recordIndex, bool fireEvent)
352 {
353 DataCommonEventSource.Log.Trace("<ds.Index.DeleteRecord|INFO> {0}, recordIndex={1}, fireEvent={2}", ObjectID, recordIndex, fireEvent);
354 if (recordIndex >= 0)
355 {
356 _recordCount--;
359 if (fireEvent)
360 {
362 }
363 }
364 }
365
366 public RBTree<int>.RBTreeEnumerator GetEnumerator(int startIndex)
367 {
368 return new RBTree<int>.RBTreeEnumerator(_records, startIndex);
369 }
370
371 public int GetIndex(int record)
372 {
374 }
375
376 private int GetIndex(int record, int changeRecord)
377 {
379 int newRecord = dataRow._newRecord;
380 int oldRecord = dataRow._oldRecord;
381 try
382 {
383 switch (changeRecord)
384 {
385 case 1:
386 dataRow._newRecord = record;
387 break;
388 case 2:
389 dataRow._oldRecord = record;
390 break;
391 }
393 }
394 finally
395 {
396 switch (changeRecord)
397 {
398 case 1:
399 dataRow._newRecord = newRecord;
400 break;
401 case 2:
402 dataRow._oldRecord = oldRecord;
403 break;
404 }
405 }
406 }
407
408 public object[] GetUniqueKeyValues()
409 {
410 if (_indexFields == null || _indexFields.Length == 0)
411 {
412 return Array.Empty<object>();
413 }
416 return list.ToArray();
417 }
418
419 public int FindRecord(int record)
420 {
421 int num = _records.Search(record);
422 if (num != 0)
423 {
424 return _records.GetIndexByNode(num);
425 }
426 return -1;
427 }
428
429 public int FindRecordByKey(object key)
430 {
431 int num = FindNodeByKey(key);
432 if (num != 0)
433 {
434 return _records.GetIndexByNode(num);
435 }
436 return -1;
437 }
438
439 public int FindRecordByKey(object[] key)
440 {
441 int num = FindNodeByKeys(key);
442 if (num != 0)
443 {
444 return _records.GetIndexByNode(num);
445 }
446 return -1;
447 }
448
449 private int FindNodeByKey(object originalKey)
450 {
451 if (_indexFields.Length != 1)
452 {
454 }
455 int num = _records.root;
456 if (num != 0)
457 {
459 object value = column.ConvertValue(originalKey);
460 num = _records.root;
461 if (_indexFields[0].IsDescending)
462 {
463 while (num != 0)
464 {
465 int num2 = column.CompareValueTo(_records.Key(num), value);
466 if (num2 == 0)
467 {
468 break;
469 }
470 num = ((num2 >= 0) ? _records.Right(num) : _records.Left(num));
471 }
472 }
473 else
474 {
475 while (num != 0)
476 {
477 int num2 = column.CompareValueTo(_records.Key(num), value);
478 if (num2 == 0)
479 {
480 break;
481 }
482 num = ((num2 <= 0) ? _records.Right(num) : _records.Left(num));
483 }
484 }
485 }
486 return num;
487 }
488
489 private int FindNodeByKeys(object[] originalKey)
490 {
491 int num = ((originalKey != null) ? originalKey.Length : 0);
492 if (originalKey == null || num == 0 || _indexFields.Length != num)
493 {
495 }
496 int num2 = _records.root;
497 if (num2 != 0)
498 {
499 object[] array = new object[originalKey.Length];
500 for (int i = 0; i < originalKey.Length; i++)
501 {
503 }
504 for (num2 = _records.root; num2 != 0; num2 = ((num <= 0) ? _records.Right(num2) : _records.Left(num2)))
505 {
507 if (num == 0)
508 {
509 break;
510 }
511 }
512 }
513 return num2;
514 }
515
517 {
518 int num = _records.root;
519 if (num != 0)
520 {
521 num = _records.root;
522 while (num != 0)
523 {
525 if (num2 == 0)
526 {
527 break;
528 }
529 num = ((num2 <= 0) ? _records.Right(num) : _records.Left(num));
530 }
531 }
532 return num;
533 }
534
536 {
537 int num = _records.root;
538 while (num != 0)
539 {
541 if (num2 == 0)
542 {
543 break;
544 }
545 num = ((num2 >= 0) ? _records.Right(num) : _records.Left(num));
546 }
547 return GetRangeFromNode(num);
548 }
549
551 {
552 if (nodeId == 0)
553 {
554 return default(Range);
555 }
557 if (_records.Next(nodeId) == 0)
558 {
559 return new Range(indexByNode, indexByNode);
560 }
562 return new Range(indexByNode, indexByNode + num - 1);
563 }
564
565 public Range FindRecords(object key)
566 {
567 int nodeId = FindNodeByKey(key);
568 return GetRangeFromNode(nodeId);
569 }
570
571 public Range FindRecords(object[] key)
572 {
574 return GetRangeFromNode(nodeId);
575 }
576
577 internal void FireResetEvent()
578 {
579 DataCommonEventSource.Log.Trace("<ds.Index.FireResetEvent|API> {0}", ObjectID);
580 if (DoListChanged)
581 {
583 }
584 }
585
587 {
588 int num = (((_recordStates & oldState) != 0) ? 1 : 0);
589 int num2 = (((_recordStates & newState) != 0) ? 1 : 0);
590 return num2 - num;
591 }
592
594 {
595 if ((DataViewRowState.CurrentRows & oldState) == 0)
596 {
597 if ((DataViewRowState.OriginalRows & oldState) == 0)
598 {
599 return 0;
600 }
601 return 2;
602 }
603 return 1;
604 }
605
606 public DataRow GetRow(int i)
607 {
609 }
610
611 public DataRow[] GetRows(object[] values)
612 {
613 return GetRows(FindRecords(values));
614 }
615
617 {
619 if (array.Length != 0)
620 {
621 RBTree<int>.RBTreeEnumerator enumerator = GetEnumerator(range.Min);
622 for (int i = 0; i < array.Length; i++)
623 {
624 if (!enumerator.MoveNext())
625 {
626 break;
627 }
629 }
630 }
631 return array;
632 }
633
635 {
637 bool append = _indexFields.Length == 0;
638 _records = new IndexTree(this);
639 _recordCount = 0;
640 foreach (DataRow row in _table.Rows)
641 {
642 int num = -1;
643 if (row._oldRecord == row._newRecord)
644 {
645 if ((recordStates & DataViewRowState.Unchanged) != 0)
646 {
647 num = row._oldRecord;
648 }
649 }
650 else if (row._oldRecord == -1)
651 {
652 if ((recordStates & DataViewRowState.Added) != 0)
653 {
654 num = row._newRecord;
655 }
656 }
657 else if (row._newRecord == -1)
658 {
659 if ((recordStates & DataViewRowState.Deleted) != 0)
660 {
661 num = row._oldRecord;
662 }
663 }
664 else if ((recordStates & DataViewRowState.ModifiedCurrent) != 0)
665 {
666 num = row._newRecord;
667 }
668 else if ((recordStates & DataViewRowState.ModifiedOriginal) != 0)
669 {
670 num = row._oldRecord;
671 }
672 if (num != -1 && AcceptRecord(num, filter))
673 {
674 _records.InsertAt(-1, num, append);
675 _recordCount++;
676 }
677 }
678 }
679
681 {
682 int result = -1;
683 if (AcceptRecord(record))
684 {
685 result = InsertRecord(record, fireEvent: false);
686 }
687 return result;
688 }
689
690 private int InsertRecord(int record, bool fireEvent)
691 {
692 DataCommonEventSource.Log.Trace("<ds.Index.InsertRecord|INFO> {0}, record={1}, fireEvent={2}", ObjectID, record, fireEvent);
693 bool append = false;
694 if (_indexFields.Length == 0 && _table != null)
695 {
698 }
699 int node = _records.InsertAt(-1, record, append);
700 _recordCount++;
702 if (fireEvent)
703 {
704 if (DoListChanged)
705 {
707 }
708 return 0;
709 }
711 }
712
713 public bool IsKeyInIndex(object key)
714 {
715 int num = FindNodeByKey(key);
716 return num != 0;
717 }
718
719 public bool IsKeyInIndex(object[] key)
720 {
721 int num = FindNodeByKeys(key);
722 return num != 0;
723 }
724
725 public bool IsKeyRecordInIndex(int record)
726 {
727 int num = FindNodeByKeyRecord(record);
728 return num != 0;
729 }
730
738
740 {
741 if (DoListChanged)
742 {
744 }
745 }
746
748 {
749 DataCommonEventSource.Log.Trace("<ds.Index.OnListChanged|INFO> {0}", ObjectID);
750 _listeners.Notify(e, arg2: false, arg3: false, delegate(DataViewListener listener, ListChangedEventArgs args, bool arg2, bool arg3)
751 {
752 listener.IndexListChanged(args);
753 });
754 }
755
763
764 public void Reset()
765 {
766 DataCommonEventSource.Log.Trace("<ds.Index.Reset|API> {0}", ObjectID);
770 }
771
772 public void RecordChanged(int record)
773 {
774 DataCommonEventSource.Log.Trace("<ds.Index.RecordChanged|API> {0}, record={1}", ObjectID, record);
775 if (DoListChanged)
776 {
777 int index = GetIndex(record);
778 if (index >= 0)
779 {
780 OnListChanged(ListChangedType.ItemChanged, index);
781 }
782 }
783 }
784
785 public void RecordChanged(int oldIndex, int newIndex)
786 {
787 DataCommonEventSource.Log.Trace("<ds.Index.RecordChanged|API> {0}, oldIndex={1}, newIndex={2}", ObjectID, oldIndex, newIndex);
788 if (oldIndex > -1 || newIndex > -1)
789 {
790 if (oldIndex == newIndex)
791 {
793 }
794 else if (oldIndex == -1)
795 {
797 }
798 else if (newIndex == -1)
799 {
801 }
802 else
803 {
805 }
806 }
807 }
808
810 {
811 DataCommonEventSource.Log.Trace("<ds.Index.RecordStateChanged|API> {0}, record={1}, oldState={2}, newState={3}", ObjectID, record, oldState, newState);
814 }
815
817 {
818 DataCommonEventSource.Log.Trace("<ds.Index.RecordStateChanged|API> {0}, oldRecord={1}, oldOldState={2}, oldNewState={3}, newRecord={4}, newOldState={5}, newNewState={6}", ObjectID, oldRecord, oldOldState, oldNewState, newRecord, newOldState, newNewState);
821 if (changeAction == -1 && changeAction2 == 1 && AcceptRecord(newRecord))
822 {
824 if (_comparison == null && num != -1 && CompareRecords(oldRecord, newRecord) == 0)
825 {
827 int index = GetIndex(newRecord);
829 return;
830 }
831 _suspendEvents = true;
832 if (num != -1)
833 {
835 _recordCount--;
836 }
838 _recordCount++;
839 _suspendEvents = false;
841 if (num == index2)
842 {
843 OnListChanged(ListChangedType.ItemChanged, index2, num);
844 }
845 else if (num == -1)
846 {
849 }
850 else
851 {
852 OnListChanged(ListChangedType.ItemMoved, index2, num);
853 }
854 }
855 else
856 {
859 }
860 }
861
862 private void GetUniqueKeyValues(List<object[]> list, int curNodeId)
863 {
864 if (curNodeId != 0)
865 {
868 object[] array = new object[_indexFields.Length];
869 for (int i = 0; i < array.Length; i++)
870 {
872 }
873 list.Add(array);
875 }
876 }
877
878 internal static int IndexOfReference<T>(List<T> list, T item) where T : class
879 {
880 if (list != null)
881 {
882 for (int i = 0; i < list.Count; i++)
883 {
884 if (list[i] == item)
885 {
886 return i;
887 }
888 }
889 }
890 return -1;
891 }
892}
bool ICollection< KeyValuePair< TKey, TValue > >. Remove(KeyValuePair< TKey, TValue > keyValuePair)
void Add(TKey key, TValue value)
object ConvertValue(object value)
int Compare(int record1, int record2)
bool CompareValueTo(int record1, object value, bool checkType)
static readonly DataCommonEventSource Log
readonly ReaderWriterLockSlim _indexesLock
Definition DataTable.cs:194
readonly List< Index > _indexes
Definition DataTable.cs:76
DataRowCollection Rows
Definition DataTable.cs:701
DataRow[] NewRowArray(int size)
readonly RecordManager _recordManager
Definition DataTable.cs:74
void MaintainDataView(ListChangedType changedType, DataRow row, bool trackAddRemove)
void IndexListChanged(ListChangedEventArgs e)
static ListChangedEventArgs s_resetEventArgs
Definition DataView.cs:88
static Exception IndexKeyLength(int length, int keyLength)
static Exception RecordStateRange()
readonly Index _index
Definition Index.cs:11
IndexTree(Index index)
Definition Index.cs:13
override int CompareNode(int record1, int record2)
Definition Index.cs:19
override int CompareSateliteTreeNode(int record1, int record2)
Definition Index.cs:24
delegate int ComparisonBySelector< TKey, TRow >(TKey key, TRow row)
void InitRecords(IFilter filter)
Definition Index.cs:634
void AddRef()
Definition Index.cs:196
bool CheckUnique()
Definition Index.cs:259
void ApplyChangeAction(int record, int action, int changeRecord)
Definition Index.cs:236
static int IndexOfReference< T >(List< T > list, T item)
Definition Index.cs:878
static int s_objectTypeCount
Definition Index.cs:56
Index(DataTable table, IndexField[] indexFields, DataViewRowState recordStates, IFilter rowFilter)
Definition Index.cs:88
int CompareDataRows(int record1, int record2)
Definition Index.cs:293
void OnListChanged(ListChangedType changedType, int newIndex, int oldIndex)
Definition Index.cs:731
int GetIndex(int record, int changeRecord)
Definition Index.cs:376
bool HasRemoteAggregate
Definition Index.cs:60
void DeleteRecord(int recordIndex, bool fireEvent)
Definition Index.cs:351
readonly bool _hasRemoteAggregate
Definition Index.cs:54
bool IsKeyRecordInIndex(int record)
Definition Index.cs:725
int GetIndex(int record)
Definition Index.cs:371
IFilter RowFilter
Definition Index.cs:66
bool AcceptRecord(int record)
Definition Index.cs:153
void RecordStateChanged(int oldRecord, DataViewRowState oldOldState, DataViewRowState oldNewState, int newRecord, DataViewRowState newOldState, DataViewRowState newNewState)
Definition Index.cs:816
static int GetReplaceAction(DataViewRowState oldState)
Definition Index.cs:593
int CompareRecords(int record1, int record2)
Definition Index.cs:264
int CompareRecordToKey(int record1, object[] vals)
Definition Index.cs:324
RBTree< int >.RBTreeEnumerator GetEnumerator(int startIndex)
Definition Index.cs:366
bool Equal(IndexField[] indexDesc, DataViewRowState recordStates, IFilter rowFilter)
Definition Index.cs:132
bool IsKeyInIndex(object[] key)
Definition Index.cs:719
bool IsKeyInIndex(object key)
Definition Index.cs:713
void RecordChanged(int oldIndex, int newIndex)
Definition Index.cs:785
void FireResetEvent()
Definition Index.cs:577
void ListChangedRemove(DataViewListener listener)
Definition Index.cs:191
readonly IndexField[] _indexFields
Definition Index.cs:34
void DeleteRecordFromIndex(int recordIndex)
Definition Index.cs:341
readonly DataViewRowState _recordStates
Definition Index.cs:38
int InsertRecordToIndex(int record)
Definition Index.cs:680
int RemoveRef()
Definition Index.cs:215
int FindRecord(int record)
Definition Index.cs:419
int FindRecordByKey(object[] key)
Definition Index.cs:439
Index(DataTable table, IndexField[] indexFields, Comparison< DataRow > comparison, DataViewRowState recordStates, IFilter rowFilter)
Definition Index.cs:108
readonly DataTable _table
Definition Index.cs:32
int CompareDuplicateRecords(int record1, int record2)
Definition Index.cs:298
Index(DataTable table, Comparison< DataRow > comparison, DataViewRowState recordStates, IFilter rowFilter)
Definition Index.cs:93
readonly int _objectID
Definition Index.cs:58
bool DoListChanged
Definition Index.cs:77
void RecordChanged(int record)
Definition Index.cs:772
void GetUniqueKeyValues(List< object[]> list, int curNodeId)
Definition Index.cs:862
void DeleteRecord(int recordIndex)
Definition Index.cs:346
void MaintainDataView(ListChangedType changedType, int record, bool trackAddRemove)
Definition Index.cs:756
int FindRecordByKey(object key)
Definition Index.cs:429
Range FindRecords< TKey, TRow >(ComparisonBySelector< TKey, TRow > comparison, TKey key)
Definition Index.cs:535
IndexTree _records
Definition Index.cs:42
DataRow[] GetRows(Range range)
Definition Index.cs:616
DataRow GetRow(int i)
Definition Index.cs:606
bool AcceptRecord(int record, IFilter filter)
Definition Index.cs:158
int FindNodeByKey(object originalKey)
Definition Index.cs:449
DataRow[] GetRows(object[] values)
Definition Index.cs:611
int FindNodeByKeyRecord(int record)
Definition Index.cs:516
bool IsSharable
Definition Index.cs:72
int GetRecord(int recordIndex)
Definition Index.cs:148
Range FindRecords(object[] key)
Definition Index.cs:571
object[] GetUniqueKeyValues()
Definition Index.cs:408
Range FindRecords(object key)
Definition Index.cs:565
bool _suspendEvents
Definition Index.cs:50
void OnListChanged(ListChangedEventArgs e)
Definition Index.cs:747
int FindNodeByKeys(object[] originalKey)
Definition Index.cs:489
int InsertRecord(int record, bool fireEvent)
Definition Index.cs:690
Range GetRangeFromNode(int nodeId)
Definition Index.cs:550
void ListChangedAdd(DataViewListener listener)
Definition Index.cs:186
readonly Comparison< DataRow > _comparison
Definition Index.cs:36
void OnListChanged(ListChangedType changedType, int index)
Definition Index.cs:739
readonly WeakReference _rowFilter
Definition Index.cs:40
readonly Listeners< DataViewListener > _listeners
Definition Index.cs:48
int GetChangeAction(DataViewRowState oldState, DataViewRowState newState)
Definition Index.cs:586
readonly bool _isSharable
Definition Index.cs:52
DataViewRowState RecordStates
Definition Index.cs:64
void RecordStateChanged(int record, DataViewRowState oldState, DataViewRowState newState)
Definition Index.cs:809
static IndexField[] GetAllFields(DataColumnCollection columns)
Definition Index.cs:98
bool HasDuplicates
Definition Index.cs:68
K Key(int nodeId)
Definition RBTree.cs:1407
K DeleteByIndex(int i)
Definition RBTree.cs:746
int Right(int nodeId)
Definition RBTree.cs:1377
void UpdateNodeKey(K currentKey, K newKey)
Definition RBTree.cs:736
int GetIndexByKey(K key)
Definition RBTree.cs:1076
int SubTreeSize(int nodeId)
Definition RBTree.cs:1402
int Search(K key)
Definition RBTree.cs:1047
int InsertAt(int position, K item, bool append)
Definition RBTree.cs:1262
int GetIndexByNode(int node)
Definition RBTree.cs:1087
int Next(int nodeId)
Definition RBTree.cs:1397
int Left(int nodeId)
Definition RBTree.cs:1382
int Insert(K item)
Definition RBTree.cs:1218
static int Increment(ref int location)
readonly DataColumn Column
Definition IndexField.cs:7