Working with Cells
ILNumerics.Net implements a feature called "cells". Basically cells can imagined beeing like arrays without the restriction for all elements to have the same type. Cells may serve as a general container for all kinds of arrays. For a cell it is possible to contain arbitrary types of arrays of arbitrary shape.
Elements of cells may be cells itself. That way it is possible to create extremly flexible data container.
Cells for ILNumerics.Net implement the following features:
- Automatic type recognition. If you query elements from ILCells, the value returned will either be a ILCell again or the actual type of elements queried. This makes sure, the least casting is required to work with cells.
- Elements stored "by value". ILCells serve as container storing arrays of arbitrary shape. Querying or setting any elements will give detached versions of those elements. Therefore the arrays stored inside the cell will not be affected be operations outside the cell. However, the detaching involves the ILNumerics.Net array referencing feature. Therefore very little memory will be involved into this efficient process.
- Index access enables one to recursively walk into ILCell elements in order to query & set values. This way elements may be altered from the outside and values can be read fast and memory efficient.
The following articles explains how to work with cells.