Deila með


TensorSpan<T>.Slice Method

Definition

Overloads

Slice(ReadOnlySpan<NIndex>)

Returns a reference to specified element of the TensorSpan.

Slice(ReadOnlySpan<NRange>)

Forms a slice out of the given span

Slice(ReadOnlySpan<NIndex>)

Source:
TensorSpan.cs
Source:
TensorSpan.cs

Returns a reference to specified element of the TensorSpan.

public:
 System::Numerics::Tensors::TensorSpan<T> Slice(ReadOnlySpan<System::Buffers::NIndex> indexes);
public System.Numerics.Tensors.TensorSpan<T> Slice (scoped ReadOnlySpan<System.Buffers.NIndex> indexes);
member this.Slice : ReadOnlySpan<System.Buffers.NIndex> -> System.Numerics.Tensors.TensorSpan<'T>
Public Function Slice (indexes As ReadOnlySpan(Of NIndex)) As TensorSpan(Of T)

Parameters

indexes
ReadOnlySpan<NIndex>

The indexes for the slice.

Returns

Exceptions

Thrown when any index is less than 0 or any index is greater than or equal to FlattenedLength

Applies to

Slice(ReadOnlySpan<NRange>)

Source:
TensorSpan.cs
Source:
TensorSpan.cs

Forms a slice out of the given span

public:
 System::Numerics::Tensors::TensorSpan<T> Slice(ReadOnlySpan<System::Buffers::NRange> ranges);
public System.Numerics.Tensors.TensorSpan<T> Slice (scoped ReadOnlySpan<System.Buffers.NRange> ranges);
member this.Slice : ReadOnlySpan<System.Buffers.NRange> -> System.Numerics.Tensors.TensorSpan<'T>
Public Function Slice (ranges As ReadOnlySpan(Of NRange)) As TensorSpan(Of T)

Parameters

ranges
ReadOnlySpan<NRange>

The ranges for the slice

Returns

A ReadOnlyTensorSpan<T> based on the provided ranges

Applies to