Share via


ReadOnlyTensorSpan<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:
ReadOnlyTensorSpan.cs

Returns a reference to specified element of the TensorSpan.

public:
 System::Numerics::Tensors::ReadOnlyTensorSpan<T> Slice(ReadOnlySpan<System::Buffers::NIndex> indexes);
public System.Numerics.Tensors.ReadOnlyTensorSpan<T> Slice (scoped ReadOnlySpan<System.Buffers.NIndex> indexes);
member this.Slice : ReadOnlySpan<System.Buffers.NIndex> -> System.Numerics.Tensors.ReadOnlyTensorSpan<'T>
Public Function Slice (indexes As ReadOnlySpan(Of NIndex)) As ReadOnlyTensorSpan(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:
ReadOnlyTensorSpan.cs

Forms a slice out of the given span

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

Parameters

ranges
ReadOnlySpan<NRange>

The ranges for the slice

Returns

A ReadOnlyTensorSpan<T> based on the provided ranges

Applies to