Array Slice<T> Structure
Represents a slice of elements in a one-dimensional array.
Definition
Namespace: Numerics.NET.Collections
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4
C#
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4
public readonly struct ArraySlice<T> : IStorageSlice<T, ArraySlice<T>>,
IStorageSlice<T>
- Implements
- IStorageSlice<T>, IStorageSlice<T, ArraySlice<T>>
Type Parameters
- T
- The element type of the array.
Constructors
Array | Constructs a new array slice. |
Array | Constructs a new array slice. |
Array | Constructs a new array. |
Properties
Item | Gets or sets the element at the specified position. |
Offset | Gets the offset of the first element in the storage array. |
Span | Gets the step between successive elements in the storage array. |
Stride | Gets the step between successive elements in the storage array. |
Values | Gets the storage array. |
Methods
AsArray1D | Returns the array as a linear array with offset. |
AsArray2D | Constructs a 2D array with the specified leading dimension. |
AsSpan | Converts an array slice to a span. |
Clone | Returns an array slice over a copy of the values in the current slice. |
Equals | Indicates whether this instance and a specified object are equal. (Overrides ValueType.Equals(Object)) |
From( | Returns an array slice starting at the specified index. |
From( | Returns an array slice starting at the specified index. |
Get | Returns the hash code for this instance. (Overrides ValueType.GetHashCode()) |
Get | Gets the index in the storage array of the element at the specified position. |
Get | Gets the Type of the current instance. (Inherited from Object) |
ToArray | Returns the elements of the array slice in an array. |
ToString | Returns the fully qualified type name of this instance. (Inherited from ValueType) |
Operators
Equality( | Checks whether two array slices are equal. |
Implicit(T[] to ArraySlice<T>) | Implicitly converts a .NET array to an array slice. |
Inequality( | Checks whether two array slices are not equal. |
Fields
Empty | Returns an array slice with no elements. |