GSoC 2012 Proposal: Continued Work on a D Linear Algebra library (SciD - std.linalg)

Caligo iteronvexor at gmail.com
Mon Apr 2 18:37:52 PDT 2012


I've read **Proposed Changes and Additions**, and I would like to
comment and ask a few questions if that's okay.  BTW, I've used Eigen
a lot and I see some similarities here, but a direct rewrite may not
be the best thing because D > C++.

2.  Change the matrix & vector types, adding fixed-sized matrix
support in the process.

This is a step in the right direction I think, and by that I'm talking
about the decision to remove the difference between a Vector and a
Matrix.  Also, fixed-size matrices are also a must.  There is
compile-time optimization that you won't be able to do for
dynamic-size matrices.


3. Add value arrays (or numeric arrays, we can come up with a good name).

I really don't see the point for these.  We have the built-in arrays
and the one in Phobos (which will get even better soon).


4. Add reductions, partial reductions, and broadcasting for matrices and arrays.

This one is similar to what we have in Eigen, but I don't understand
why the operations are member functions (even in Eigen).  I much
rather have something like this:

rowwise!sum(mat);

Also, that way the users can use their own custom functions with much ease.


6. Add support for interoperation with D built-in arrays (or pointers).

So I take that Matrix is not a sub-type?  why? If we have something like this:

struct Matrix(Real, size_t row, size_t col) {

  Real[row*col] data;
  alias data this;
}

then we wouldn't need any kind of interoperation with built-in arrays,
would we?  I think this would save us a lot of headache.

That's just me and I could be wrong.

I've got to tell you though, I'm very excited about this project and
I'll be watching it closely.

cheers.


More information about the Digitalmars-d mailing list