TensorPrimitives.Product 方法

定义

重载

Product(ReadOnlySpan<Single>)

计算指定非空浮点数中所有元素的乘积。

Product<T>(ReadOnlySpan<T>)

计算指定非空数值张量中的所有元素的乘积。

Product(ReadOnlySpan<Single>)

Source:
TensorPrimitives.cs
Source:
TensorPrimitives.Single.cs
Source:
TensorPrimitives.Single.cs

计算指定非空浮点数中所有元素的乘积。

public:
 static float Product(ReadOnlySpan<float> x);
public static float Product (ReadOnlySpan<float> x);
static member Product : ReadOnlySpan<single> -> single
Public Shared Function Product (x As ReadOnlySpan(Of Single)) As Single

参数

x
ReadOnlySpan<Single>

张量,表示为范围。

返回

x中的所有元素相乘的结果。

例外

x 长度必须大于零。

注解

如果任一输入值等于 NaN,则结果值也为 NaN。

此方法可以调用基础 C 运行时,或使用特定于当前体系结构的说明。 不同的操作系统或体系结构之间的确切结果可能有所不同。

适用于

Product<T>(ReadOnlySpan<T>)

Source:
TensorPrimitives.Product.cs
Source:
TensorPrimitives.Product.cs

计算指定非空数值张量中的所有元素的乘积。

public:
generic <typename T>
 where T : System::Numerics::IMultiplyOperators<T, T, T>, System::Numerics::IMultiplicativeIdentity<T, T> static T Product(ReadOnlySpan<T> x);
public static T Product<T> (ReadOnlySpan<T> x) where T : System.Numerics.IMultiplyOperators<T,T,T>, System.Numerics.IMultiplicativeIdentity<T,T>;
static member Product : ReadOnlySpan<'T (requires 'T :> System.Numerics.IMultiplyOperators<'T, 'T, 'T> and 'T :> System.Numerics.IMultiplicativeIdentity<'T, 'T>)> -> 'T (requires 'T :> System.Numerics.IMultiplyOperators<'T, 'T, 'T> and 'T :> System.Numerics.IMultiplicativeIdentity<'T, 'T>)
Public Shared Function Product(Of T As {IMultiplyOperators(Of T, T, T), IMultiplicativeIdentity(Of T, T)}) (x As ReadOnlySpan(Of T)) As T

类型参数

T

参数

x
ReadOnlySpan<T>

张量,表示为范围。

返回

T

x中的所有元素相乘的结果。

例外

x 长度必须大于零。

注解

如果任一输入值等于 NaN,则结果值也为 NaN。

此方法可以调用基础 C 运行时,或使用特定于当前体系结构的说明。 不同的操作系统或体系结构之间的确切结果可能有所不同。

适用于