Cell creation
Cell arrays are derived from type ILArray<ILBaseArray>. Therefore they inherit
all the creation features of it's base class ILArray<ILBaseArray>. Cells are
created as empty ILCell or by creating an ILCell with predefined
elements.
Creating empty ILCells
The syntax for creating an empty ILCell is as follows:
ILCell C = new ILCell(4,3,2);
This will create an ILCell, capable of holding 24 data elements, ordered in an rectangular array
of size ILCell will be initialized empty.
Just like with ILArray<> you may create ILCell of arbitrary
dimensions. ILNumerics.Net will prevent you from defining too less dimensions and will automatically create at least 2 dimensions.
Remember, all array objects for ILNumerics.Net have at least 2 dimensions.
Creating ILCells with predefined values
In order to give the ILCell predefined values for its elements, one can use the following syntax:
// create 4 arrays and store them in a System.Array
ILBaseArray [] elements = new ILBaseArray[4];
elements[0] = ILMath.rand(2,3,1,5);
elements[1] = new ILArray<Int16> (new Int16[]{4,3,2,1,2,3,4,5},2,3);
elements[2] = ILMath.zeros(3,2,3);
elements[3] = new string[] { "string1", "some text", "some more text", "foo"};
// now construct the cell array with predefined values
ILCell C = new ILCell(elements,4,1);
C will be created as ILCell, holding 4 arrays of dissimilar kinds in a column vector shape.