[ILNumerics Core Module]
ILNumericsBaseArray
ILNumericsBaseArrayT
ILNumerics.Core.ArraysConcreteArrayT, ArrayT, InArrayT, OutArrayT, RetArrayT, StorageT
ILNumerics.Core.ArraysMutableT, ArrayT, InArrayT, OutArrayT, RetArrayT, StorageT
ILNumericsArrayT
Namespace: ILNumerics
Assembly: ILNumerics.Core (in ILNumerics.Core.dll) Version: 5.5.0.0 (5.5.7503.3146)
[SerializableAttribute] public sealed class Array<T> : Mutable<T, Array<T>, InArray<T>, OutArray<T>, RetArray<T>, Storage<T>>
Type Parameters
- T
- 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 ArrayT type exposes the following members.
Name | Description | |
---|---|---|
a |
Assign another array to this array variable. This is an optional, yet more efficient alternative to using '=' for assigning to the array directly.
(Inherited from MutableT1, LocalT, InT, OutT, RetT, StorageT.)[ILNumerics Core Module] | |
C |
Create lazy, shallow clone of this array.
(Inherited from ConcreteArrayT1, LocalT, InT, OutT, RetT, StorageT.)[ILNumerics Core Module] | |
data |
[numpy API][Expert API!] Gives a reference to the memory handle used to store elements of this array on the host.
(Inherited from MutableT1, LocalT, InT, OutT, RetT, StorageT.)[ILNumerics Core Module] | |
flat |
Readonly iterator over the elements of this array in row-major order.
(Inherited from MutableT1, LocalT, InT, OutT, RetT, StorageT.)[ILNumerics Core Module] | |
IsColumnVector |
Determines whether this array represents a column vector.
(Inherited from ConcreteArrayT1, LocalT, InT, OutT, RetT, StorageT.)[ILNumerics Core Module] | |
IsComplex |
Returns true if elements of this array store a real and an imaginary part each.
(Inherited from ConcreteArrayT1, LocalT, InT, OutT, RetT, StorageT.)[ILNumerics Core Module] | |
IsDisposed |
This flag indicates that an array is not to be used anymore.
(Inherited from BaseArray.)[ILNumerics Core Module] | |
IsEmpty |
Determines whether this array stores no elements.
(Inherited from ConcreteArrayT1, LocalT, InT, OutT, RetT, StorageT.)[ILNumerics Core Module] | |
IsMatrix |
Determines whether this array is a matrix.
(Inherited from ConcreteArrayT1, LocalT, InT, OutT, RetT, StorageT.)[ILNumerics Core Module] | |
IsNumeric |
Gets whether this array stores elements of a numeric type.
(Inherited from ConcreteArrayT1, LocalT, InT, OutT, RetT, StorageT.)[ILNumerics Core Module] | |
IsRowVector |
Gets whether this array represents a row vector [readonly].
(Inherited from ConcreteArrayT1, LocalT, InT, OutT, RetT, StorageT.)[ILNumerics Core Module] | |
IsScalar |
Gets whether this array has exactly one element.
(Inherited from ConcreteArrayT1, LocalT, InT, OutT, RetT, StorageT.)[ILNumerics Core Module] | |
IsVector |
Determines if this array represents a vector.
(Inherited from ConcreteArrayT1, LocalT, InT, OutT, RetT, StorageT.)[ILNumerics Core Module] | |
ItemInt64 |
Retrieves the value(s) of the element(s) at the position specified by d0 or sets them.
(Inherited from MutableT1, LocalT, InT, OutT, RetT, StorageT.)[ILNumerics Core Module] | |
ItemUInt32 |
Retrieves the value(s) of the element(s) at the position specified by d0 or sets them.
(Inherited from MutableT1, LocalT, InT, OutT, RetT, StorageT.)[ILNumerics Core Module] | |
ItemBaseArray |
Gets a subarray from this array or replaces the values of parts of this array.
(Inherited from MutableT1, LocalT, InT, OutT, RetT, StorageT.)[ILNumerics Core Module] | |
ItemBaseArray |
Gets a subarray from this array or replaces the values of part of this array.
(Inherited from MutableT1, LocalT, InT, OutT, RetT, StorageT.)[ILNumerics Core Module] | |
ItemDimSpec |
Gets a subarray from this array or replaces the values of part of this array.
(Inherited from MutableT1, LocalT, InT, OutT, RetT, StorageT.)[ILNumerics Core Module] | |
ItemDimSpec |
Gets a subarray from this array or replaces the values of part of this array.
(Inherited from MutableT1, LocalT, InT, OutT, RetT, StorageT.)[ILNumerics Core Module] | |
ItemInt64, Int64 |
Retrieves the value(s) of the element(s) at the position specified by d0 and d1 or sets them.
(Inherited from MutableT1, LocalT, InT, OutT, RetT, StorageT.)[ILNumerics Core Module] | |
ItemUInt32, UInt32 |
Retrieves the value(s) of the element(s) at the position specified by d0 and d1 or sets them.
(Inherited from MutableT1, LocalT, InT, OutT, RetT, StorageT.)[ILNumerics Core Module] | |
ItemBaseArray, BaseArray |
Gets a subarray from this array or replaces the values of part of this array.
(Inherited from MutableT1, LocalT, InT, OutT, RetT, StorageT.)[ILNumerics Core Module] | |
ItemDimSpec, DimSpec |
Gets a subarray from this array or replaces the values of part of this array.
(Inherited from MutableT1, LocalT, InT, OutT, RetT, StorageT.)[ILNumerics Core Module] | |
ItemInt64, Int64, Int64 |
Retrieves the value(s) of the element(s) at the position specified by d0 ... d2 or sets them.
(Inherited from MutableT1, LocalT, InT, OutT, RetT, StorageT.)[ILNumerics Core Module] | |
ItemUInt32, UInt32, UInt32 |
Retrieves the value(s) of the element(s) at the position specified by d0 ... d2 or sets them.
(Inherited from MutableT1, LocalT, InT, OutT, RetT, StorageT.)[ILNumerics Core Module] | |
ItemBaseArray, BaseArray, BaseArray |
Gets a subarray from this array or replaces the values of part of this array.
(Inherited from MutableT1, LocalT, InT, OutT, RetT, StorageT.)[ILNumerics Core Module] | |
ItemDimSpec, DimSpec, DimSpec |
Gets a subarray from this array or replaces the values of part of this array.
(Inherited from MutableT1, LocalT, InT, OutT, RetT, StorageT.)[ILNumerics Core Module] | |
ItemInt64, Int64, Int64, Int64 |
Retrieves the value(s) of the element(s) at the position specified by d0 ... d3 or sets them.
(Inherited from MutableT1, LocalT, InT, OutT, RetT, StorageT.)[ILNumerics Core Module] | |
ItemUInt32, UInt32, UInt32, UInt32 |
Retrieves the value(s) of the element(s) at the position specified by d0 ... d3 or sets them.
(Inherited from MutableT1, LocalT, InT, OutT, RetT, StorageT.)[ILNumerics Core Module] | |
ItemBaseArray, BaseArray, BaseArray, BaseArray |
Gets a subarray from this array or replaces the values of part of this array.
(Inherited from MutableT1, LocalT, InT, OutT, RetT, StorageT.)[ILNumerics Core Module] | |
ItemDimSpec, DimSpec, DimSpec, DimSpec |
Gets a subarray from this array or replaces the values of part of this array.
(Inherited from MutableT1, LocalT, InT, OutT, RetT, StorageT.)[ILNumerics Core Module] | |
ItemInt64, Int64, Int64, Int64, Int64 |
Retrieves the value(s) of the element(s) at the position specified by d0 ... d4 or sets them.
(Inherited from MutableT1, LocalT, InT, OutT, RetT, StorageT.)[ILNumerics Core Module] | |
ItemUInt32, UInt32, UInt32, UInt32, UInt32 |
Retrieves the value(s) of the element(s) at the position specified by d0 ... d4 or sets them.
(Inherited from MutableT1, LocalT, InT, OutT, RetT, StorageT.)[ILNumerics Core Module] | |
ItemBaseArray, BaseArray, BaseArray, BaseArray, BaseArray |
Gets a subarray from this array or replaces the values of part of this array.
(Inherited from MutableT1, LocalT, InT, OutT, RetT, StorageT.)[ILNumerics Core Module] | |
ItemDimSpec, DimSpec, DimSpec, DimSpec, DimSpec |
Gets a subarray from this array or replaces the values of part of this array.
(Inherited from MutableT1, LocalT, InT, OutT, RetT, StorageT.)[ILNumerics Core Module] | |
ItemInt64, Int64, Int64, Int64, Int64, Int64 |
Retrieves the value(s) of the element(s) at the position specified by d0 ... d5 or sets them.
(Inherited from MutableT1, LocalT, InT, OutT, RetT, StorageT.)[ILNumerics Core Module] | |
ItemUInt32, UInt32, UInt32, UInt32, UInt32, UInt32 |
Retrieves the value(s) of the element(s) at the position specified by d0 ... d5 or sets them.
(Inherited from MutableT1, LocalT, InT, OutT, RetT, StorageT.)[ILNumerics Core Module] | |
ItemBaseArray, BaseArray, BaseArray, BaseArray, BaseArray, BaseArray |
Gets a subarray from this array or replaces the values of part of this array.
(Inherited from MutableT1, LocalT, InT, OutT, RetT, StorageT.)[ILNumerics Core Module] | |
ItemDimSpec, DimSpec, DimSpec, DimSpec, DimSpec, DimSpec |
Gets a subarray from this array or replaces the values of part of this array.
(Inherited from MutableT1, LocalT, InT, OutT, RetT, StorageT.)[ILNumerics Core Module] | |
ItemInt64, Int64, Int64, Int64, Int64, Int64, Int64 |
Retrieves the value(s) of the element(s) at the position specified by d0 ... d6 or sets them.
(Inherited from MutableT1, LocalT, InT, OutT, RetT, StorageT.)[ILNumerics Core Module] | |
ItemUInt32, UInt32, UInt32, UInt32, UInt32, UInt32, UInt32 |
Retrieves the value(s) of the element(s) at the position specified by d0 ... d6 or sets them.
(Inherited from MutableT1, LocalT, InT, OutT, RetT, StorageT.)[ILNumerics Core Module] | |
ItemBaseArray, BaseArray, BaseArray, BaseArray, BaseArray, BaseArray, BaseArray |
Gets a subarray from this array or replaces the values of part of this array.
(Inherited from MutableT1, LocalT, InT, OutT, RetT, StorageT.)[ILNumerics Core Module] | |
ItemDimSpec, DimSpec, DimSpec, DimSpec, DimSpec, DimSpec, DimSpec |
Gets a subarray from this array or replaces the values of part of this array.
(Inherited from MutableT1, LocalT, InT, OutT, RetT, StorageT.)[ILNumerics Core Module] | |
itemsize |
[numpy API] The number of bytes required to store a single element T1 in memory. [readonly]
(Inherited from MutableT1, LocalT, InT, OutT, RetT, StorageT.)[ILNumerics Core Module] | |
Length |
Gets the number of elements stored in the longest dimension [readonly].
(Inherited from ConcreteArrayT1, LocalT, InT, OutT, RetT, StorageT.)[ILNumerics Core Module] | |
MaxValue | Obsolete.
Retrieves the maximum value among all elements of this array.
(Inherited from ConcreteArrayT1, LocalT, InT, OutT, RetT, StorageT.)[ILNumerics Core Module] | |
MinValue | Obsolete.
Retrieves the minimum value among all elements of this array.
(Inherited from ConcreteArrayT1, LocalT, InT, OutT, RetT, StorageT.)[ILNumerics Core Module] | |
nbytes |
[numpy API] The total number of bytes required to store all elements of this array. [readonly]
(Inherited from MutableT1, LocalT, InT, OutT, RetT, StorageT.)[ILNumerics Core Module] | |
ndim |
[numpy API] The number of dimensions stored for this array.
(Inherited from MutableT1, LocalT, InT, OutT, RetT, StorageT.)[ILNumerics Core Module] | |
ReferenceCount |
Gets the number of arrays currently sharing the storage with this array.
(Inherited from ConcreteArrayT1, LocalT, InT, OutT, RetT, StorageT.)[ILNumerics Core Module] | |
S |
Gets the dimension descriptor for this array (readonly). This is an alias for Size.
(Inherited from ConcreteArrayT1, LocalT, InT, OutT, RetT, StorageT.)[ILNumerics Core Module] | |
shape |
[numpy API] The dimension lengths as ILNumerics vector of length corresponding to NumberOfDimensions.
(Inherited from MutableT1, LocalT, InT, OutT, RetT, StorageT.)[ILNumerics Core Module] | |
Size |
Gets the dimension descriptor for this array. [readonly]
(Inherited from ConcreteArrayT1, LocalT, InT, OutT, RetT, StorageT.)[ILNumerics Core Module] | |
size_ |
[numpy API] Gives the number of elements in this array. This attribute is an alias for NumberOfElements. [readonly]
(Inherited from MutableT1, LocalT, InT, OutT, RetT, StorageT.)[ILNumerics Core Module] | |
strides |
[numpy API] The strides of elements within the dimensions. Unit: element size.
(Inherited from MutableT1, LocalT, InT, OutT, RetT, StorageT.)[ILNumerics Core Module] | |
T |
Return transposed version of this array.
(Inherited from ConcreteArrayT1, LocalT, InT, OutT, RetT, StorageT.)[ILNumerics Core Module] |
Name | Description | |
---|---|---|
(Array to ArrayT) |
Implicitly convert n-dimensional System.Array to ILNumerics array.
[ILNumerics Core Module] | |
(T to ArrayT) |
Wraps single value into scalar array.
[ILNumerics Core Module] | |
(InArrayT to ArrayT) |
Convert input array (immutable) to local array (mutable).
[ILNumerics Core Module] | |
(OutArrayT to ArrayT) |
Convert output array to a new local array (mutable).
[ILNumerics Core Module] | |
(RetArrayT to ArrayT) |
"Persistence cast" make a steady array out of a temp array
[ILNumerics Core Module] |
Name | Description | |
---|---|---|
flattenT |
[numpy API] Returns a flattened copy of the source array. This is the same as ravelT1(BaseArrayT1, StorageOrders). See remarks for details.
(Defined by ExtensionMethods.)[ILNumerics numpy Module] | |
GetValueT(Int64) | Overloaded.
Retrieves the value of the element at the position as specified by d0. Int64 indexing.
(Defined by ExtensionMethods.)[ILNumerics Core Module] | |
GetValueT(Int64, Int64) | Overloaded.
Retrieve the value of the element at the position specified by d0 and d1. Int64 indexing.
(Defined by ExtensionMethods.)[ILNumerics Core Module] | |
GetValueT(Int64, Int64, Int64) | Overloaded.
Retrieve the value of the element at the position specified by d0 ... d2. Int64 indexing.
(Defined by ExtensionMethods.)[ILNumerics Core Module] | |
GetValueT(Int64, Int64, Int64, Int64) | Overloaded.
Retrieve the value of the element at the position specified by d0 ... d3. Int64 indexing.
(Defined by ExtensionMethods.)[ILNumerics Core Module] | |
GetValueT(Int64, Int64, Int64, Int64, Int64) | Overloaded.
Retrieve the value of the element at the position specified by d0 ... d4. Int64 indexing.
(Defined by ExtensionMethods.)[ILNumerics Core Module] | |
GetValueT(Int64, Int64, Int64, Int64, Int64, Int64) | Overloaded.
Retrieve the value of the element at the position specified by d0 ... d5. Int64 indexing.
(Defined by ExtensionMethods.)[ILNumerics Core Module] | |
GetValueT(Int64, Int64, Int64, Int64, Int64, Int64, Int64) | Overloaded.
Retrieve the value of the element at the position specified by d0 ... d6. Int64 indexing.
(Defined by ExtensionMethods.)[ILNumerics Core Module] | |
IndexIteratorT |
Efficient iterator over generic (but numeric!) type elements for use in indexing.
(Defined by ExtensionMethods.)[ILNumerics Core Module] | |
itemT(Int64) | Overloaded.
[numpy API] Returns a single element from this array according to the provided dimension index.
(Defined by ExtensionMethods.)[ILNumerics numpy Module] | |
itemT(Int64) | Overloaded.
[numpy API] Returns a single element from this array according to the provided dimension indices.
(Defined by ExtensionMethods.)[ILNumerics numpy Module] | |
itemT(Int64, Int64) | Overloaded.
[numpy API] Returns a single element from this array according to the provided dimension indices.
(Defined by ExtensionMethods.)[ILNumerics numpy Module] | |
itemT(Int64, Int64, Int64) | Overloaded.
[numpy API] Returns a single element from this array according to the provided dimension indices.
(Defined by ExtensionMethods.)[ILNumerics numpy Module] | |
itemT(Int64, Int64, Int64, Int64) | Overloaded.
[numpy API] Returns a single element from this array according to the provided dimension indices.
(Defined by ExtensionMethods.)[ILNumerics numpy Module] | |
itemT(Int64, Int64, Int64, Int64, Int64) | Overloaded.
[numpy API] Returns a single element from this array according to the provided dimension indices.
(Defined by ExtensionMethods.)[ILNumerics numpy Module] | |
itemT(Int64, Int64, Int64, Int64, Int64, Int64) | Overloaded.
[numpy API] Returns a single element from this array according to the provided dimension indices.
(Defined by ExtensionMethods.)[ILNumerics numpy Module] | |
itemT(Int64, Int64, Int64, Int64, Int64, Int64, Int64) | Overloaded.
[numpy API] Returns a single element from this array according to the provided dimension indices.
(Defined by ExtensionMethods.)[ILNumerics numpy Module] | |
IteratorT |
Efficient iterator over generic type elements for use in foreach loops.
(Defined by ExtensionMethods.)[ILNumerics Core Module] | |
ravelT |
[numpy API] Returns a flattened copy of the source array. This is the same as flattenT1(BaseArrayT1, StorageOrders). See remarks for details.
(Defined by ExtensionMethods.)[ILNumerics numpy Module] |
Arrays of this type may use any type as generic element. However, common mathematical functions and operators are defined for a limited number of value type elements only. All binary operations (+,-,*,/,<,>,<=,etc.) are defined for two arrays with the same numeric type, would it be from the System namespace (Double, Int32, ...) or complex/ fcomplex. Most algebraic functions require floating point types. See the ILNumerics.Math 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 is used as absolutely needed, even in non-trivial expressions, like: a + c * 2 / abs(sin(c) * -b / log(a)). Here all arrays are of the same or broadcastable 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]
A simple example demonstrating the uses of Array<double> in a very simple application:
using System; using System.Collections.Generic; using System.Linq; using System.Text; using ILNumerics; using static ILNumerics.ILMath; using static ILNumerics.Globals; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { using (Scope.Enter()) { Array<double> A = rand(10,20); Array<double> B = A * 30 + 100; Logical C = any(multiply(B,B.T)); Console.Out.Write(-B); Console.ReadKey(); } } } }