ClassCompressedCollection<T>
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
Inheritance: objectCompressedCollection<T>
Derived Classes:
Implements:
Constructors
CompressedCollection(int, int, T)
Initializes a new instance of the CompressedCollection class with specified dimensions and default value for unset cells.
Properties
HasValues
Indicates whether any values have been explicitly set in the collection.
Length
The total logical capacity of the collection, representing all positions including unset ones.
this[int, int]
Accesses the value at the specified row and column, returning the default value if the cell has not been explicitly set.
Methods
GetEnumerator()
Returns an enumerator that iterates through all logical positions in row-major order, yielding default values for unset cells.
Declaration
public IEnumerator<T> GetEnumerator()
Returns
IEnumerator<T>
The enumerator.
GetLength(int)
Returns the size of the specified dimension: 0 for row count, 1 for column count.