The Sparse Indexing Function
The sparse indexing function is used to create a table or an array with a sparse representation, meaning that only nonzero elements are stored in the underlying data structure.
The sparse indexing function specifies that unassigned entries of a table or an array have the value 0. For example, array(sparse, 1..2, 1..2) is a zero matrix.
If T is a table and j is an unevaluated name, then T[j] returns unevaluated. However, if j evaluates to an integer, then T[j] returns either the value of T[j] or 0 if T[j] has no assigned value.
A default value other than zero can be used when constructing a sparse table. The command, table(sparse=XXX), creates a table filled with XXXs at each entry. This option is only available for tables.
Note: The command array has been superseded by Array.
T ≔ table⁡sparse,A=a:
a ≔ array⁡sparse,1..2:
T ≔ table⁡sparse=undefined,1=1,2=2:
The sparse indexing function was updated in Maple 2019.
The sparse=XXX option was updated in Maple 2019.
Download Help Document
What kind of issue would you like to report? (Optional)