Прочитать на английском

Поделиться через


IReadOnlyTensor<TSelf,T>.Item[ReadOnlySpan Property

Definition

Overloads

Item[ReadOnlySpan<NIndex>]

Gets the value at the specified indexes.

Item[ReadOnlySpan<NRange>]

Gets the values at the specified ranges.

Item[ReadOnlySpan<IntPtr>]

Gets a reference to the specified element of the tensor.

Item[ReadOnlySpan<NIndex>]

Source:
IReadOnlyTensor.cs
Source:
IReadOnlyTensor.cs

Gets the value at the specified indexes.

public ref readonly T this[scoped ReadOnlySpan<System.Buffers.NIndex> indexes] { get; }

Parameters

indexes
ReadOnlySpan<NIndex>

The indexes to be used.

Property Value

T

A reference to the element that exists at indexes.

Applies to

.NET 10 (package-provided) и другие версии
Продукт Версии
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)

Item[ReadOnlySpan<NRange>]

Source:
IReadOnlyTensor.cs
Source:
IReadOnlyTensor.cs

Gets the values at the specified ranges.

public TSelf this[scoped ReadOnlySpan<System.Buffers.NRange> ranges] { get; }

Parameters

ranges
ReadOnlySpan<NRange>

The ranges to be used.

Property Value

TSelf

A tensor that consists of all elements of the current tensor in ranges.

Applies to

.NET 10 (package-provided) и другие версии
Продукт Версии
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)

Item[ReadOnlySpan<IntPtr>]

Source:
IReadOnlyTensor.cs
Source:
IReadOnlyTensor.cs

Gets a reference to the specified element of the tensor.

public ref readonly T this[scoped ReadOnlySpan<IntPtr> indexes] { get; }

Parameters

indexes

ReadOnlySpan<IntPtr>

The index of the element for which to get a reference.

Property Value

T

A reference to the element that exists at indexes.

Exceptions

Thrown when one of the following conditions is met:

  • indexes does not contain Rank elements
  • indexes contains an element that is negative or greater than or equal to the corresponding dimension length

Applies to

.NET 10 (package-provided) и другие версии
Продукт Версии
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)