Outer Product in MatrixMath.cpp

I was looking at the MatrixMath library, looking for an outer product function (multiply two vectors to form a matrix). I realised that I could use

MatrixMath::Multiply(mtx_type* A, mtx_type* B, int m, int p, int n, mtx_type* C)

with p set to 1 (1 column in A and 2 row in B), but I find it easier to understand to have an explicit OuterProduct function, which I think is this:

// Outer product 
// C = A*B
void OuterProduct(mtx_type* A, mtx_type* B, int m, int n, mtx_type* C)
{
  int ra, cb; // ra= Row in vector A and, cb=Column in vector B
  for (ra = 0; ra < m; ra++) {
    for(cb = 0; cb < n; cb++)
    {
      // In real money....
      // C[ra][cb] = C[ra][cb] + (A[ra] * B[cb]);
      C[n * ra + cb] = A[ra] * B[cb];
    }
  }
}

It would be good to add this to MatrixMath I think, if it is correct, but how is that done officially?

Maybe you can create a feature request on github to implement it in a newer version.

Matrix multiplication isn't that hard, as you've already noticed a vector is a special type of matrix (1xn, nx1). I don't really like the approach of the MatrixMath library, because the properties of the matrix really should be stored inside the class.
Then you could overwrite the +, -, /, * operators and have something like (although the outer product would be a function then).

Matrix vector(1,3);
Matrix matrix(3,3);
Matrix result = matrix * vector;