Vector-vector multiply

The multiplication operator (*), like all the other operators, is an elementwise operator. When manipulating mathematical vectors, however, there are two kinds of vector product: inner product (also called a dot product) and outer product (also called a cross product). The inner product produces a scalar, and the outer product produces a matrix. DAPPLE has methods for both:

intVector A(N), B(N), C(N), D(M); intMatrix E(N,M); ... C = inner(A, B); // inner product of A and B C = sum(A * B); // inner product of A and B ... E = outer(C, D); // outer product of C and D