IStorageSlice<T> Interface

Represents the common methods and properties for types that serve as the storage for an array slice of the specified type.

Definition

Namespace: Numerics.NET.Collections
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3
C#
public interface IStorageSlice<T>

Type Parameters

T
The type of the elements of the array slice.

Remarks

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

  Caution

Types that implement IStorageSlice<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.
MemorySlice Returns a memory slice over the storage.
SpanSlice Returns a span slice over the storage.
Stride Gets the step between successive elements in the storage array.

Methods

AsSpan Converts an array slice to a span.
GetIndex Gets the index in the storage array of the element at the specified position.
ToArray Returns the elements of the array slice in an array.

See Also