Sparse collection storing only explicitly set values while appearing to contain values at all indexes, using a default value for unset positions. Enables efficient memory usage for large, mostly-empty grids such as worksheet cell data.
Definition
Namespace:Telerik.Windows.Documents.Spreadsheet.Expressions.DataStructures
Assembly:Telerik.Windows.Documents.Spreadsheet.dll
Type Parameters:
T
The value type stored by the collection.
Syntax:
public class CompressedCollection<T> : IEnumerable<T>, IEnumerable
Inheritance: objectCompressedCollection<T>
Derived Classes:
Implements:
Constructors
Initializes a new instance of the CompressedCollection class with specified dimensions and default value for unset cells.
Methods
Returns an enumerator that iterates through all logical positions in row-major order, yielding default values for unset cells.
Properties
Indicates whether any values have been explicitly set in the collection.
public bool HasValues { get; }
The total logical capacity of the collection, representing all positions including unset ones.
public int Length { get; }