Enhanced C#
Language of your choice: library documentation
|
Enumerates through a VList from index 0 up to index Count-1. More...
Enumerates through a VList from index 0 up to index Count-1.
Normally, enumerating the list takes O(Count + log(Count)^2) = O(Count) time. However, if the list's block chain does not increase in size exponentially (due to the way that the list has been modified in the past), the search can have worse performance; the worst case is O(n^2), but this is unlikely. FVList's Enumerator doesn't have this problem because it enumerates in the other direction.
Public fields | |
ushort | _localIndex |
ushort | _localCount |
VListBlock< T > | _curBlock |
VListBlock< T > | _nextBlock |
FVList< T > | _outerList |
Properties | |
T | Current [get] |
object System.Collections.IEnumerator. | Current [get] |
Properties inherited from Loyc.Collections.VList< T > | |
VList< T > | Tail [get] |
Returns a list without the last item. If the list is empty, an empty list is retured. More... | |
T | Last [get] |
Returns the last item of the list (at index Count-1), which is the head of the list. More... | |
bool | IsEmpty [get] |
int | BlockChainLength [get] |
Gets the number of blocks used by this list. More... | |
T | this[int index] [get, set] |
T | this[int index, T defaultValue] [get] |
Gets an item from the list at the specified index; returns defaultValue if the index is not valid. More... | |
int | Count [get] |
bool | IsReadOnly [get] |
Public Member Functions | |
Enumerator (VList< T > list) | |
Enumerator (VList< T > list, VList< T > subList) | |
Enumerator (FVList< T > list) | |
Enumerator (FVList< T > list, FVList< T > subList) | |
bool | MoveNext () |
void | Reset () |
void | Dispose () |
Public Member Functions inherited from Loyc.Collections.VList< T > | |
VList (T firstItem) | |
VList (T itemZero, T itemOne) | |
VList (T[] array) | |
VList (IEnumerable< T > list) | |
VList (VList< T > list) | |
VList< T > | WithoutLast (int offset) |
VList< T > | NextIn (VList< T > largerList) |
VList< T > | First (int count) |
override bool | Equals (object rhs_) |
Returns whether the two list references are the same. Does not compare the contents of the lists. More... | |
override int | GetHashCode () |
VList< T > | AddRange (VList< T > list) |
VList< T > | AddRange (VList< T > list, VList< T > excludeSubList) |
VList< T > | AddRange (IList< T > list) |
VList< T > | AddRange (IEnumerable< T > list) |
VList< T > | InsertRange (int index, IList< T > list) |
VList< T > | RemoveRange (int index, int count) |
T | Pop () |
Removes the last item (at index Count-1) from the list and returns it. More... | |
VList< T > | Push (T item) |
Synonym for Add(); adds an item to the front of the list. More... | |
FVList< T > | ToFVList () |
Returns this list as a FVList, which effectively reverses the order of the elements. More... | |
FWList< T > | ToFWList () |
Returns this list as a FWList, which effectively reverses the order of the elements. More... | |
WList< T > | ToWList () |
Returns this list as an WList. More... | |
T[] | ToArray () |
Returns the VList converted to an array. More... | |
int | IndexOf (T item) |
Searches for the specified object and returns the zero-based index of the first occurrence (lowest index) within the entire VList. More... | |
void IList< T >. | Insert (int index, T item) |
VList< T > | Insert (int index, T item) |
void IList< T >. | RemoveAt (int index) |
VList< T > | RemoveAt (int index) |
void ICollection< T >. | Add (T item) |
Inserts an item at the back (index Count) of the VList. More... | |
VList< T > | Add (T item) |
Inserts an item at the back (index Count) of the VList. More... | |
void ICollection< T >. | Clear () |
VList< T > | Clear () |
bool | Contains (T item) |
void | CopyTo (T[] array, int arrayIndex) |
bool | Remove (T item) |
Enumerator | GetEnumerator () |
IEnumerator< T > IEnumerable< T >. | GetEnumerator () |
System.Collections.IEnumerator System.Collections.IEnumerable. | GetEnumerator () |
T | TryGet (int index, out bool fail) |
Gets the item at the specified index, and does not throw an exception on failure. More... | |
IRange< T > IListSource< T >. | Slice (int start, int count) |
Returns a sub-range of this list. More... | |
Slice_< T > | Slice (int start, int count=int.MaxValue) |
Returns a sub-range of this list. More... | |
VList< T > | Clone () |
object ICloneable. | Clone () |
VList< T > | Where (Predicate< T > keep) |
Applies a filter to a list, to exclude zero or more items. More... | |
VList< T > | WhereSelect (Func< T, Maybe< T >> filter) |
Filters and maps a list with a user-defined function. More... | |
VList< T > | SmartSelect (Func< T, T > map) |
Maps a list to another list of the same length. More... | |
VList< Out > | Select< Out > (Func< T, Out > map) |
Maps a list to another list of the same length. More... | |
VList< T > | Transform (VListTransformer< T > x) |
Transforms a list (combines filtering with selection and more). More... | |
Additional Inherited Members | |
Public static fields inherited from Loyc.Collections.VList< T > | |
static readonly VList< T > | Empty = new VList<T>() |
Static Public Member Functions inherited from Loyc.Collections.VList< T > | |
static bool | operator== (VList< T > lhs, VList< T > rhs) |
Returns whether the two list references are the same. Does not compare the contents of the lists. More... | |
static bool | operator!= (VList< T > lhs, VList< T > rhs) |
Returns whether the two list references are different. Does not compare the contents of the lists. More... | |
static | operator FVList< T > (VList< T > list) |
Returns this list as a FVList, which effectively reverses the order of the elements. More... | |
static | operator FWList< T > (VList< T > list) |
Returns this list as a FWList, which effectively reverses the order of the elements. More... | |
static | operator WList< T > (VList< T > list) |
Returns this list as an WList. More... | |