ILNumerics Ultimate VSILArrayElementType ClassILNumerics Ultimate VS Documentation
ILNumerics - The Productivity Machine
The main rectilinear array to be used in algorithms

[ILNumerics Core Module]

Inheritance Hierarchy

SystemObject
  ILNumericsILBaseArray
    ILNumericsILBaseArrayElementType
      ILNumericsILDenseArrayElementType
        ILNumericsILArrayElementType

Namespace: ILNumerics
Assembly: ILNumerics.Core (in ILNumerics.Core.dll) Version: 4.14.0.0 (4.14.6369.1422)
Syntax

[SerializableAttribute]
public sealed class ILArray<ElementType> : ILDenseArray<ElementType>

Type Parameters

ElementType
Inner type. This will mostly be one of the predefined numeric ValueType types or one of the complex ILNumerics floating point types: complex and fcomplex.

The ILArrayElementType type exposes the following members.

Properties

  NameDescription
Public propertya
Assign another array to this array variable. This is an optional, yet more efficient alternative to using '='

[ILNumerics Core Module]

Public propertyC
Clone of this array (fast, lazy and shallow)

[ILNumerics Core Module]

(Inherited from ILDenseArrayElementType.)
Public propertyD Obsolete.
[deprecated] Use 'S' as size descriptor!

[ILNumerics Core Module]

(Inherited from ILBaseArray.)
Public propertyDimensions Obsolete.
[deprecated] Use 'Size' as size descriptor!

[ILNumerics Core Module]

(Inherited from ILBaseArray.)
Public propertyIsColumnVector
Test if this array instance is a column vector

[ILNumerics Core Module]

(Inherited from ILBaseArray.)
Public propertyIsComplex
Determine if this array has complex elements.

[ILNumerics Core Module]

(Inherited from ILBaseArrayElementType.)
Public propertyIsDisposed
Determine if this array has been disposed already. Disposed arrays should not be used.

[ILNumerics Core Module]

(Inherited from ILBaseArray.)
Public propertyIsEmpty
Test if this instance is an empty array (number of elements stored = 0)

[ILNumerics Core Module]

(Inherited from ILBaseArray.)
Public propertyIsMatrix
Test if this instance is a matrix

[ILNumerics Core Module]

(Inherited from ILBaseArray.)
Public propertyIsNumeric
Determine if this array holds numeric values.

[ILNumerics Core Module]

(Inherited from ILBaseArrayElementType.)
Public propertyIsRowVector
Test if this array instance is a row vector

[ILNumerics Core Module]

(Inherited from ILBaseArray.)
Public propertyIsScalar
Test if this instance is a scalar

[ILNumerics Core Module]

(Inherited from ILBaseArray.)
Public propertyIsVector
Test if this array is a vector

[ILNumerics Core Module]

(Inherited from ILBaseArray.)
Public propertyItemInt32
Single element access / manipulation/ deletion

[ILNumerics Core Module]

Public propertyItemILBaseArray
Subarray creation/ manipulation/ deletion

[ILNumerics Core Module]

Public propertyItemInt32, Int32
Single element access / manipulation/ deletion

[ILNumerics Core Module]

Public propertyLength
Length of the longest dimension of this instance

[ILNumerics Core Module]

(Inherited from ILBaseArray.)
Public propertyMaxValue Obsolete.
[deprecated] Get maximum value of array - if any

[ILNumerics Core Module]

(Inherited from ILDenseArrayElementType.)
Public propertyMinValue Obsolete.
Get minimum value of array - if any

[ILNumerics Core Module]

(Inherited from ILDenseArrayElementType.)
Public propertyName
Gets the name of this array or sets it

[ILNumerics Core Module]

(Inherited from ILBaseArray.)
Public propertyReferenceCount
Get number of arrays, referencing the same underlying data storage

[ILNumerics Core Module]

(Inherited from ILDenseArrayElementType.)
Public propertyS
Size descriptor shortcut

[ILNumerics Core Module]

(Inherited from ILBaseArray.)
Public propertySize
Size descriptor specification

[ILNumerics Core Module]

(Inherited from ILBaseArray.)
Public propertyT
Return transposed version of this array

[ILNumerics Core Module]

(Inherited from ILDenseArrayElementType.)
Top
Methods

  NameDescription
Public methodAssign
Assign another array to this array variable. This is an optional, yet more efficient alternative to '='

[ILNumerics Core Module]

Public methodConcat
Concatenate this array

[ILNumerics Core Module]

(Inherited from ILDenseArrayElementType.)
Public methodDispose
Dispose this array and all its content

[ILNumerics Core Module]

(Inherited from ILBaseArray.)
Public methodStatic memberempty(Int32) Obsolete.
[deprecated] Create empty array of arbitrary size

[ILNumerics Core Module]

Public methodStatic memberempty(ILSize)
[deprecated] Create empty array of arbitrary size

[ILNumerics Core Module]

Public methodEquals
Compare elements and shape of this array with another array

[ILNumerics Core Module]

(Inherited from ILBaseArray.)
Public methodExportValues
Copy values of all elements into System.Array.

[ILNumerics Core Module]

(Inherited from ILDenseArrayElementType.)
Public methodGetArrayForRead
Get direct reference to inner System.Array storage for read access - use with care!

[ILNumerics Core Module]

(Inherited from ILDenseArrayElementType.)
Public methodGetArrayForWrite
Direct reference to inner System.Array storage for write access. Expert interface. Use with care!

[ILNumerics Core Module]

Public methodGetElementType
Gets the System.Type of the elements stored in this array

[ILNumerics Core Module]

(Inherited from ILBaseArrayElementType.)
Public methodCode exampleGetEnumerator
Enumerator returning elements as ElementType

[ILNumerics Core Module]

(Inherited from ILDenseArrayElementType.)
Public methodGetHashCode
Generate a hash code based on the current arrays values

[ILNumerics Core Module]

(Inherited from ILBaseArray.)
Public methodGetLimits
Get minimum and maximum value of all elements - if any

[ILNumerics Core Module]

(Inherited from ILBaseArrayElementType.)
Public methodGetValue(Int32)
Get single element from this array, sequential addressing.

[ILNumerics Core Module]

(Inherited from ILBaseArrayElementType.)
Public methodGetValue(Int32)
Get single element from this array

[ILNumerics Core Module]

(Inherited from ILBaseArrayElementType.)
Public methodGetValue(Int32, Int32)
Get single element from this array.

[ILNumerics Core Module]

(Inherited from ILBaseArrayElementType.)
Public methodReshape(Int32)
Reshaped copy of this array

[ILNumerics Core Module]

(Inherited from ILDenseArrayElementType.)
Public methodReshape(ILSize)
Reshaped copy of this array

[ILNumerics Core Module]

(Inherited from ILDenseArrayElementType.)
Public methodSerialize
Serialize this array into a binary stream.

[ILNumerics Core Module]

(Inherited from ILBaseArrayElementType.)
Public methodSetRange
Alter range of this array

[ILNumerics Core Module]

Public methodSetValue
Set single value to element at index specified

[ILNumerics Core Module]

Public methodShifted
Create array from this array and shift dimensions

[ILNumerics Core Module]

(Inherited from ILDenseArrayElementType.)
Public methodShortInfo
Short textual summary of this instance, used for debug output

[ILNumerics Core Module]

(Inherited from ILBaseArray.)
Public methodSubarray
Subarray creation

[ILNumerics Core Module]

(Inherited from ILDenseArrayElementType.)
Public methodToStream
Send values of this instance to stream.

[ILNumerics Core Module]

(Inherited from ILDenseArrayElementType.)
Public methodToString
Convert to string

[ILNumerics Core Module]

(Inherited from ILBaseArray.)
Public methodToString(Int32)
Convert to string with limited length

[ILNumerics Core Module]

(Inherited from ILBaseArray.)
Public methodToXML
Writes a XML string in XML file

[ILNumerics Core Module]

(Inherited from ILBaseArrayElementType.)
Top
Operators

  NameDescription
Public operatorStatic memberCode example(Array to ILArrayElementType)
Implicitly convert n-dimensional System.Array to ILNumerics ILArray

[ILNumerics Core Module]

Public operatorStatic member(ElementType to ILArrayElementType)
Implicitly convert scalar to array of size 1x1 (scalar).

[ILNumerics Core Module]

Public operatorStatic member(ElementType to ILArrayElementType)
Implicitly cast three dimensional System.Array to ILNumerics array

[ILNumerics Core Module]

Public operatorStatic member(ElementType to ILArrayElementType)
Implicitly cast two dimensional System.Array to ILNumerics array

[ILNumerics Core Module]

Public operatorStatic member(ElementType to ILArrayElementType)
Implicitly cast one dimensional System.Array to ILNumerics array (vector)

[ILNumerics Core Module]

Public operatorStatic member(ILArrayElementType to ILRetCell)
Convert dense array to scalar temporary cell

[ILNumerics Core Module]

Public operatorStatic member(ILInArrayElementType to ILArrayElementType)
"Persistence cast" make a steady array out of an input array

[ILNumerics Core Module]

Public operatorStatic member(ILOutArrayElementType to ILArrayElementType)
"Persistence cast" make a steady array out of an input array

[ILNumerics Core Module]

Public operatorStatic member(ILRetArrayElementType to ILArrayElementType)
"Persistence cast" make a steady array out of a temp array

[ILNumerics Core Module]

Top
Remarks

This class serves as the main rectilinear array, holding arbitrary elements (usually numeric types) in arbitrary dimensions.

Arrays of this type may use any type as generic element. However, common mathematical functions and operators are defined for a limited number of inner types only. All binary operations (+,-,*,/,<,>,<=,etc.) are defined for two arrays with the same numeric type, would it be from the System namespace (double, int,...) or ILNumerics.complex/ ILNumerics.fcomplex. Most algebraic functions require floating point types. See the ILMathInternal class for a list of all computational functions.

Arrays are capable of creating flexible subarrays and are mutable at runtime. Read about all details of ILNumerics arrays in the ILNumerics Array documentation.

Arrays of this type are dense arrays. Cloning arrays is done as lazy copy on write, i.e.: clones of existing arrays do only use new memory when attempting to alter one of them. Arrays integrate into the memory management of ILNumerics. Read about the most important simple rules for using arrays in custom computational functions.

Arrays come with overloaded mathematical operators, allowing for a convenient syntax. A sophisticated memory management in the back will make sure, that as little memory as needed is used, even in expressions like: a + c * 2 / abs(sin(c) * -b / log(a)). Here all arrays are of the same size. Evaluating this expression does only need the memory of twice the size of one array. Memory gets collected and reused for every subexpression evaluation. Further optimization options exist, as described in Optimizing Algorithm Performance.

[ILNumerics Core Module]

Examples

A simple example demonstrating some uses of arrays in a very simple application:

using System;
            using System.Collections.Generic;
            using System.Linq;
            using System.Text;
            using ILNumerics; 


            namespace ConsoleApplication1 {
                class Program : ILMath {
                    static void Main(string[] args) {
                        ILArray<double> A = rand(10,20);
                        ILArray<double> B = A * 30 + 100; 
                        ILLogical C = any(multiply(B,B.T)); 
                        Console.Out.Write(-B); 
                        Console.ReadKey(); 
                    }
                }
            }
See Also

Reference

Other Resources