IStorage 2D<T> 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.2
C#
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.2
public interface IStorage2D<T>
Type Parameters
- T
- The element type of the array.
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.
Properties
Item | Gets or sets the element at the specified position. |
Leading | Gets the number of elements between the start of successive columns. |
Memory2D |
Gets a 2D memory block over the elements of the array.
Return ValueA Memory2D<T>. |
Offset | Gets the position of the first stored element in the array |
Span2D |
Gets a 2D span over the elements of the array.
Return ValueA Span2D<T>. |
Methods
Clear | Sets the specified number of elements to their default value. |
Get | Gets the index in the storage array of the element at the specified position. |
Span |
Gets a span over the elements of the array.
Return ValueA Span<T>. |