Tensor.Sum<T>(ReadOnlyTensorSpan<T>) 方法

定义

对指定张量元素求和。

public:
generic <typename T>
 where T : System::Numerics::IAdditionOperators<T, T, T>, System::Numerics::IAdditiveIdentity<T, T> static T Sum(System::Numerics::Tensors::ReadOnlyTensorSpan<T> % x);
public static T Sum<T> (scoped in System.Numerics.Tensors.ReadOnlyTensorSpan<T> x) where T : System.Numerics.IAdditionOperators<T,T,T>, System.Numerics.IAdditiveIdentity<T,T>;
static member Sum : ReadOnlyTensorSpan -> 'T (requires 'T :> System.Numerics.IAdditionOperators<'T, 'T, 'T> and 'T :> System.Numerics.IAdditiveIdentity<'T, 'T>)
Public Function Sum(Of T As {IAdditionOperators(Of T, T, T), IAdditiveIdentity(Of T, T)}) (ByRef x As ReadOnlyTensorSpan(Of T)) As T

类型参数

T

参数

x
ReadOnlyTensorSpan<T>

要求和的张量

返回

T

适用于