ReadOnlyTensorSpan<T>.Slice 方法

定义

重载

Slice(ReadOnlySpan<NIndex>)

返回对 TensorSpan 的指定元素的引用。

Slice(ReadOnlySpan<NRange>)

从给定范围形成切片

Slice(ReadOnlySpan<NIndex>)

Source:
ReadOnlyTensorSpan.cs

返回对 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)

参数

indexes
ReadOnlySpan<NIndex>

切片的索引。

返回

例外

当任何索引小于 0 或任何索引大于或等于 FlattenedLength 时引发

适用于

Slice(ReadOnlySpan<NRange>)

Source:
ReadOnlyTensorSpan.cs

从给定范围形成切片

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)

参数

ranges
ReadOnlySpan<NRange>

切片的范围

返回

基于提供的 rangesReadOnlyTensorSpan<T>

适用于