StackedArray<T>
Provides an immutable array-like collection optimised for frequent identical consecutive elements.
Type parameters:
| T |
Constructors
StackedArray
#Create a new stacked array from a collection of values, using a custom comparer.
Parameters:
| values (IEnumerable<T>) | Value. |
| comparer (Func<T, T, bool>) | Comparison delegate. |
StackedArray
#Create a new stacked array from a collection of values, using a custom comparer.
Parameters:
| values (IEnumerable<T>) | Value. |
| comparer (IComparer<T>) | Comparer to use. |
StackedArray
#Create a new stacked array from pre-existing value and valence collections.
Parameters:
| values (IEnumerable<T>) | Collection of values. Consecutive duplicates will not be filtered. |
| valence (IEnumerable<int>) | Collection of valences. Must be the same size as the values collection. |
StackedArray
#Create a new stacked array from a collection of values, using the default comparer.
Parameters:
| values (IEnumerable<T>) |
Properties
Indexers
Methods
GetEnumerator
#Returns an enumerator that iterates through the collection of implied values.
Returns: An enumerator that can be used to iterate through the collection.
ImpliedValue
#Gets the implied value (adjusted for accumulated valence) at the given index.
Parameters:
| index (long) | Implied index. |
Returns: Value at implied index.
Returns an enumerator that iterates through the collection of implied values.
Returns: An IEnumerator object that can be used to iterate through the collection.