ILNumerics® Arrays
Whenever this documentation refers to 'arrays', it means the ILNumerics array classes from the core module of ILNumerics. These numerical objects serve as the foundation of mathematical algorithms. ILNumerics arrays represent scalars, vectors, matrices and higher dimensional tensors - all in one efficient array class: ILNumerics.Array<T>.
Array Quick Start
In the following, we'll assume basic familiarity with a mathematical language. A more introductory tutorial for ILNumerics arrays is found here.
Like most of the examples in this documentation we expect the code snippets to be executed in a properly configured context. See the getting started section in order to learn what that means.
A common way to create ILNumerics arrays is by utilizing an initialization function from the ILNumerics.ILMath class:
Note, that ILNumerics requires you to explicitly define the type of array variables: Array<double>. Read more about basic function rules.
Arrays can also be created by assigning system types or System.Array T[]. The inner type T in
Read more on array operators.
Arrays allow the interaction with individual elements or with larger parts thereof - a feature known as 'subarrays' or 'indexing':
There is much more to indexing, including more complex indices, involving multiple index arrays, logical arrays, reshaping and expanding, the removal of array parts or addressing more or fewer dimensions than existing in the array. Read on.
Key features of ILnumerics Arrays
- Generic: able to hold elements of arbitrary inner type. However, mostly numeric system types like double, int or complex will be used.
- Strongly typed: most other CAS use dynamically typed arrays for prototyping. But application developers appreciate type safety and maintainability at compile time and gain high performance at runtime.
- Compatibility with many popular CAS/languages: numpy, Matlab, Fortran, Octave, Julia, ILNumerics v4. Translating existing algorithms for production has never been easier!
- Automatic memory management. ILNumerics algorithms do not rely on the GC and aggressively reuse memory whenever possible.
- 'Unlimited' size: no managed heap size restriction applies to ILNumerics arrays. The size is only limited by your hardware.
- Parallelized and parallelizable: ILNumerics parallelizes everything efficiently. Additionally, it allows the use of common .NET techniques like TPL in order to further speed up algorithms on a higher level if required.
- ILNumerics arrays bridge the managed and unmanaged world. Array storages are designed to offer both: the convenience of high level mathematical languages and the performance of parallel, low level arithmetics.
- Platform compatibility: designed for 'AnyCPU' ILNumerics projects can target 32 and 64 bit processes without recompilation.
- The size of ILNumerics arrays is not limited by the 2GB limit the CLR puts on objects on the managed heap. They can grow as large as your main memory allows.