dot
ABSTRACT
Calculates the dot product between two vectors of the same length. This is done by taking the sum of the element-wise products of entries in u and v. If their lengths are zero, the ouput is also zero. In some countries, the dot product is known as the scalar product.
PARAMETERS
u | a vector of numbers |
v | a vector of numbers with the same length as u |
RETURN
the dot product between u and v
DECLARATION
func dot(u,v)