Tensor.AddProduct<T> Method

Multiplies two tensors elementwise and multiplies the result by a third.

Definition

Namespace: Numerics.NET.Tensors
Assembly: Numerics.NET.Tensors (in Numerics.NET.Tensors.dll) Version: 9.0.3
C#
public static Tensor<T> AddProduct<T>(
	Tensor<T> first,
	Tensor<T> left,
	Tensor<T> right,
	Tensor<T>? result = null,
	Tensor<bool>? mask = null,
	TensorElementOrder order = TensorElementOrder.Automatic
)

Parameters

first  Tensor<T>
A tensor that serves as the first operand..
left  Tensor<T>
A tensor that serves as the left operand..
right  Tensor<T>
A tensor that serves as the right operand..
result  Tensor<T>  (Optional)
Optional. The tensor that is to hold the result. May be null.
mask  Tensor<Boolean>  (Optional)
Optional. A boolean tensor that specifies for which elements should be included in the operation. If null (the default), the operation is applied everywhere.
order  TensorElementOrder  (Optional)
Optional. If result is null, the desired ordering in memory of the result.

Type Parameters

T
The type of the elements of the tensors.

Return Value

Tensor<T>
A tensor of the same shape as first, left, and right whose elements are equal to the result of the corresponding elements of first, left, and right

Exceptions

ArgumentNullException

first is null.

-or-

left is null.

-or-

right is null.

See Also