Enhanced C#
Language of your choice: library documentation
Nested classes | Public fields | Properties | Public Member Functions | Protected fields | List of all members
Loyc.Collections.Impl.SparseAListLeaf< T > Class Template Reference

Internal implementation class. Leaf node of SparseAList<T>. More...


Source file:
Inheritance diagram for Loyc.Collections.Impl.SparseAListLeaf< T >:
Loyc.Collections.Impl.AListLeafBase< int, T >

Remarks

Internal implementation class. Leaf node of SparseAList<T>.

This node consists of a certain number of virtual slots (_totalCount) and a certain number of real slots (_list.Count). Node splitting/joining behavior is based entirely on the number of real slots. There can be any number of empty spaces anywhere in the list. If there are empty spaces at the beginning, _list[0].Offset > 0; if there are empty spaces at the end, _totalCount > _list.Last.Offset + 1. _list.Count == 0 only if the entire list consists of empty space and there is only a single node.

Public fields

override uint TotalCount => _totalCount
 
override int LocalCount => _list.Count
 
override bool IsFullLeaf => _list.Count >= _maxNodeSize
 
override bool IsUndersized => _list.Count * 3 <= _maxNodeSize
 

Properties

override bool IsLeaf [get]
 
override T this[uint index] [get]
 
override int CapacityLeft [get]
 

Public Member Functions

override long CountSizeInBytes (int sizeOfT, int sizeOfK)
 
 SparseAListLeaf (ushort maxNodeSize)
 
 SparseAListLeaf (SparseAListLeaf< T > original)
 
override T GetLastItem ()
 
override void SetAt (uint index, T item, IAListTreeObserver< int, T > tob)
 
override bool RemoveAt (uint index, uint count, IAListTreeObserver< int, T > tob)
 
override void Freeze ()
 
override AListNode< int, T > DetachedClone ()
 
override AListNode< int, T > CopySection (uint index, uint count, AListBase< int, T > list)
 
override uint GetImmutableCount (bool excludeSparse)
 
override AListNode< int, T > Insert (uint index, T item, out AListNode< int, T > splitRight, IAListTreeObserver< int, T > tob)
 
override AListNode< int, T > InsertRange (uint index, IListSource< T > source, ref int sourceIndex, out AListNode< int, T > splitRight, IAListTreeObserver< int, T > tob)
 
override uint GetRealItemCount ()
 
override int IndexOf (T item, int startIndex)
 
override IEnumerator< T > GetEnumerator ()
 

Protected fields

uint _totalCount