Tensor<T>.Item[] Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
Item[ReadOnlySpan<NIndex>] |
Returns a reference to specified element of the Tensor. |
Item[ReadOnlySpan<NRange>] |
Returns a slice of the Tensor. |
Item[ReadOnlySpan<IntPtr>] |
Returns a reference to specified element of the Tensor. |
Item[ReadOnlySpan<NIndex>]
- Source:
- Tensor_1.cs
- Source:
- Tensor.cs
Returns a reference to specified element of the Tensor.
public:
property T % default[ReadOnlySpan<System::Buffers::NIndex>] { T % get(ReadOnlySpan<System::Buffers::NIndex> indexes); };
public ref T this[scoped ReadOnlySpan<System.Buffers.NIndex> indexes] { get; }
member this.Item(ReadOnlySpan<System.Buffers.NIndex>) : 'T
Default Public ReadOnly Property Item(indexes As ReadOnlySpan(Of NIndex)) As T
Parameters
- indexes
- ReadOnlySpan<NIndex>
The indexes to use.
Property Value
A reference to the element that exists at indexes
.
Implements
Exceptions
Thrown when index less than 0 or index greater than or equal to FlattenedLength
Applies to
Item[ReadOnlySpan<NRange>]
- Source:
- Tensor_1.cs
- Source:
- Tensor.cs
Returns a slice of the Tensor.
public:
property System::Numerics::Tensors::Tensor<T> ^ default[ReadOnlySpan<System::Buffers::NRange>] { System::Numerics::Tensors::Tensor<T> ^ get(ReadOnlySpan<System::Buffers::NRange> ranges); void set(ReadOnlySpan<System::Buffers::NRange> ranges, System::Numerics::Tensors::Tensor<T> ^ value); };
public System.Numerics.Tensors.Tensor<T> this[scoped ReadOnlySpan<System.Buffers.NRange> ranges] { get; set; }
member this.Item(ReadOnlySpan<System.Buffers.NRange>) : System.Numerics.Tensors.Tensor<'T> with get, set
Default Public Property Item(ranges As ReadOnlySpan(Of NRange)) As Tensor(Of T)
Parameters
- ranges
- ReadOnlySpan<NRange>
The range of which to slice.
Property Value
A tensor that consists of all elements of the current tensor in ranges
.
Implements
Exceptions
Thrown when any index is less than 0 or any index is greater than or equal to FlattenedLength
Applies to
Item[ReadOnlySpan<IntPtr>]
- Source:
- Tensor_1.cs
- Source:
- Tensor.cs
Returns a reference to specified element of the Tensor.
public:
property T % default[ReadOnlySpan<IntPtr>] { T % get(ReadOnlySpan<IntPtr> indexes); };
public ref T this[scoped ReadOnlySpan<IntPtr> indexes] { get; }
member this.Item(ReadOnlySpan<nativeint>) : 'T
Default Public ReadOnly Property Item(indexes As ReadOnlySpan(Of IntPtr)) As T
Parameters
- indexes
-
ReadOnlySpan<nativeint>
The indexes to use.
Property Value
A reference to the element that exists at indexes
.
Implements
Exceptions
Thrown when index less than 0 or index greater than or equal to FlattenedLength