Lacko
-
1 voteplanned ·
AdminChristoph Rüegg
(Admin, Math.NET)
responded
Confirmed, managed dense matrix implementations are missing a proper override of CopyTo (some other implementations already do override it). Needs a github ticket.
Lacko
shared this idea and gave it 1 vote
·
Actually, it's Clone and not CopyTo that has to be overridden, as CopyTo might be called with a matrix in another storage format.
I've just started using math.net a few days ago to replace my not so elaborate matrix implementation and mkl wrappers with something that's community supported. I'm pretty much satisfied but the first application already revealed some performance bootleneck. For instance, there's no direct access to the U and Vt matrices of the SVD class, only via a clone call which I think is unnecessary. I'd change the U() function to a simple property. To prevent changes to the matrix (which is probably not a big issue because users of math libs are usually aware of what they're doing) an immutable matrix class could be added to the lib. Unfortunately, changing U() to a property would break the interface. Well, Clone could be removed though. I've changed the clone function to do a block copy instead of an itemwise clone via the At function and still this single Copy uses 5% of my runtime.
I don't know how to contribute to the package but would happily implement some of these changes. Also, I have a piece of robust principal component code that I can port to math.net and make it part of the package if anyone's interested.