Array 1D<T> Structure
Represents an array starting at an offset in an existing array.
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 struct Array1D<T> : IStorageSlice<T>
- Implements
- IStorageSlice<T>
Type Parameters
- T
- The element type of the array.
Constructors
Array1D<T>(Int32) | Constructs a new array of the specified length with offset zero. |
Array1D<T>(T[], Int32) | Constructs a new array. |
Array1D<T>(Int32, Boolean) | Constructs a new array of the specified length with offset zero. |
Properties
Item | Gets or sets the element at the specified index. |
Offset | Gets the offset of the first element in the array. |
Span | Returns a span slice over the storage. |
Stride | Gets the step between successive elements in the storage array. |
Values | Gets the storage array. |
Methods
AsArray2D | Returns a 2D array with first element at the specified index and the specified leading dimension. |
AsSpan( | Returns a span of the specified length from the beginning of the array. |
AsSpan( | Returns a span of the specified length from the specified start index. |
Clear | Sets the specified number of elements to their default value. |
Equals | Indicates whether this instance and a specified object are equal. (Inherited from ValueType) |
From( | Returns an array that starts at the specified index in the current array. |
From( | Returns an array slice that starts at the specified index in the current array. |
Get | Returns the hash code for this instance. (Inherited from ValueType) |
Get | Gets the index of an element into the storage array. |
Get | Gets the Type of the current instance. (Inherited from Object) |
Read | Gets a read-only span of the specified length over the array. |
Span | Gets a span of the specified length over the array. |
ToArray | Copies the specified number of elements to a .NET array. |
ToString | Returns the fully qualified type name of this instance. (Inherited from ValueType) |
Operators
Implicit(T[] to Array1D<T>) | Implicitly converts a .NET array to an array with zero offset. |
Implicit(Array1D<T> to ArraySlice<T>) | Converts an array to an array slice with unit stride. |
Implicit(Array1D<T> to ReadOnlySpan<T>) | Implicitly converts a 1D array to a read-only span. |
Implicit(Array1D<T> to Span<T>) | Implicitly converts a 1D array to a (writable) span. |
Fields
Empty | Represents an empty array. |