共用方式為


TensorPrimitives.Hypot<T> 方法

定義

從代表右角三角形中較短側邊長度的兩個張量計算元素的低階乘法。

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

類型參數

T

參數

x
ReadOnlySpan<T>

第一個張量,以範圍表示。

y
ReadOnlySpan<T>

第二個張量,以範圍表示。

destination
Span<T>

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

例外狀況

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

備註

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

適用於