共用方式為


TensorPrimitives.RootN<T> 方法

定義

計算指定張量中值的第 n 個元素根。

public:
generic <typename T>
 where T : System::Numerics::IRootFunctions<T> static void RootN(ReadOnlySpan<T> x, int n, Span<T> destination);
public static void RootN<T>(ReadOnlySpan<T> x, int n, Span<T> destination) where T : System.Numerics.IRootFunctions<T>;
static member RootN : ReadOnlySpan<'T (requires 'T :> System.Numerics.IRootFunctions<'T>)> * int * Span<'T (requires 'T :> System.Numerics.IRootFunctions<'T>)> -> unit (requires 'T :> System.Numerics.IRootFunctions<'T>)
Public Shared Sub RootN(Of T As IRootFunctions(Of T)) (x As ReadOnlySpan(Of T), n As Integer, destination As Span(Of T))

類型參數

T

參數

x
ReadOnlySpan<T>

以範圍表示的張量。

n
Int32

要計算之根系的程度,以純量表示。

destination
Span<T>

目的地張量,以範圍表示。

例外狀況

xdestination 參考重疊的記憶體位置,而且不會從相同的位置開始。

備註

這個方法會有效地計算 destination[i] = T.RootN(x[i], n)

適用於