Contents

la_inner_product(_:_:)

Declaration

func la_inner_product(_ vector_left: la_object_t, _ vector_right: la_object_t) -> la_object_t

Discussion

Compute the inner product of two vectors.

If either operand is a matrix that is not 1xn or nx1, the result has the status LA_INVALID_PARAMETER_ERROR.

If either operand is not a vector or matrix or splat, or if both operands are splats, the result has the status LA_INVALID_PARAMETER_ERROR.

If the lengths of the two operands do not match, the result has the status LA_DIMENSION_MISMATCH_ERROR.

Otherwise the result is a 1x1 matrix containing the inner product:

   sum_{i=0...length} vector_left[i] * vector_right[i]

See Also

Functions