Arrays of Arrays: Cells
Cells are arrays which store arrays as elements. No restriction exist for the element types of those arrays in cell elements. Therefore, cells may serve as a general container for all kinds of arrays. Elements of cells may be cells itself. Extremly flexible data container are possible that way.
Cells for ILNumerics implement the following features:
- Elements stored "by value". Cells serve as container storing arrays of arbitrary shape. Getting or setting any elements will give clones of those elements. Therefore the arrays stored inside the cell will not be affected by operations outside the cell. However, the clones are created in a lazy manner: memory is not abused until write access.
- Index access enables one to recursively walk into cell elements in order to get and set values. This way elements may be altered directly and values can be read fast and efficiently.
- The cells API was designed to ensure the least possible casting, hence keeping the typesafety for its contents.
- Cells smoothly integrate into the memory management of ILNumerics.
Read the cell manual: