IStorage2D<T, TStorage2D> Interface

Represents the contract for storage of two-dimensional arrays.

Definition

Namespace: Numerics.NET.Collections
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4
C#
public interface IStorage2D<T, TStorage2D> : IStorage2D<T>
where TStorage2D : Object, IStorage2D<T, TStorage2D>
Implements
IStorage2D<T>

Type Parameters

T
The element type of the array.
TStorage2D
The type that implements the interface.

Remarks

Implement the IStorage2D<T> interface to enable using the storage for implementations of linear algebra and other operations. The format should be suitable for calling external libraries like BLAS and LAPACK.

In general, the two-dimensional array is stored in a linear block of memory. Columns are stored in contuguous blocks with a fixed number of elements between them.

IStorage2D<T> objects do not have a size. The actual dimensions must be supplied separately.

  Caution

Types that implement IStorage2D<T> are generally meant for performance-critical code. No bounds checks or other validation is performed.

Properties

Item Gets or sets the element at the specified position.
(Inherited from IStorage2D<T>)
LeadingDimension Gets the number of elements between the start of successive columns.
(Inherited from IStorage2D<T>)
Memory2D Gets a 2D memory block over the elements of the array.

Return Value

A Memory2D<T>.
(Inherited from IStorage2D<T>)
Offset Gets the position of the first stored element in the array
(Inherited from IStorage2D<T>)
Span2D Gets a 2D span over the elements of the array.

Return Value

A Span2D<T>.
(Inherited from IStorage2D<T>)

Methods

Clear Sets the specified number of elements to their default value.
(Inherited from IStorage2D<T>)
Clone Creates a deep copy of the array.
Obsolete.
CloneData Returns a new contiguous 2D array with the specified elements of the current array.
Create(Int32, Int32, Boolean) Constructs a new storage array of the specified dimensions.
Create(T[], Int32, Int32) Creates an array over a segment in a regular array.
From(Int32, Int32) Returns the array starting at the specified position.
From(Int32, Int32, Int32) Returns the array starting at the specified position with the specified leading dimension.
GetIndex Gets the index in the storage array of the element at the specified position.
(Inherited from IStorage2D<T>)
Resize Returns a new array with the specified size and leading dimension. Elements are copied to the new array.
Span Gets a span over the elements of the array.

Return Value

A Span<T>.
(Inherited from IStorage2D<T>)
Transpose Transposes the elements of the 2D array and returns the result.
TransposeTo Transposes the elements of the 2D array and returns the result in the specified array.
WithLeadingDimension Returns the array at the current position with the specified leading dimension.

See Also