>> org.apache.mahout.math.matrix.DoubleMatrix1D.toArray())
>>
>> org.apache.mahout.math.matrix.DoubleMatrix2D.toStringShort())
> The first one can be supported very easily. At least, in looking through
> your list it seems like we already do, or could trivially support everything
> in your list.
I guess it wouldn't be too difficult, yes. The only problem is that,
like Staszek mentioned, we do rely on the internal representation of
matrices (and access it directly via a subclass). This said, I think
we will remove the current implementation of the native matrix
routines because they rely on an obsolete compilation of Atlas
(Blas/Lapack). A much better idea would be to implement native-code
backed matrices in Mahout (at least for the basic ops like mults).
This is a tedious, but also fun task (requires a good knowledge of
various technologies - JNI, native linkers, etc.), good for a GSoC,
for example...
> Can you say what the toStringShort method gives you? Are you serializing or
> are you just trying to provide a readable form?
Nothing to worry about, just debugging stuff like this:
throw new IllegalArgumentException("Matrix2D inner
dimensions must agree:"
+ toStringShort() + ", " + B.toStringShort());
> Also, I thought you mentioned earlier that you were depending on the
> internal storage layout of DoubleMatrix2D. Am I confused on that point?
We currently do, but I think we will drop the native computation
support until Mahout itself supports it... The code we currently have
for native matrices is so ugly that my eyes pop (it's nobody's fault,
we needed to work around Colt's, then Mahout Math's matrix classes
infrastructure to access the internals).
Dawid