Re: API for matrix manipulation

On 3/14/11 10:56 AM, João Eiras wrote:
> Math.mAdd(m1, m2)
> Math.mSub(m1, m2)
> Math.mMult(m1, m2)

Presumably throwing on size mismatches?

> Math.mDiv(m1, m2)

I don't think we should add this.  Matrix "division" is a pretty fuzzy 
concept with non-square matrices.  And if you stick to square matrices, 
it's easy to clearly do whatever you're trying to do with inverses.

> Math.mInverse(m1)

Presumably throwing for non-square matrices?

> Math.mGaussianReduce(m1)

This could be "fun" to define.  Are you actually talking about Gaussian 
elimination, or Gauss-Jordan?  For either one the output is not uniquely 
defined (at least not if you might want to make it fast), last I checked....

-Boris

Received on Monday, 14 March 2011 15:08:53 UTC