Matrix/Linear Algebra Library?
Fawzi Mohamed
fmohamed at mac.com
Fri Oct 3 02:46:11 PDT 2008
On 2008-10-03 10:27:27 +0200, Don Clugston <nospam at nospam.com> said:
> Bill Baxter wrote:
>> Oh, and Blade is a very low-level library aimed at optimizing the very
>> simplest linear algebra expressions like vector+vector. Last I
>> checked it didn't contain any matrix ops at all. And it seems like
>> Don is frying different fish these days (like Tango BigInt).
>
> It's pretty much obselete now that array ops are in the language. That
> always happens to my most interesting, sophisticated code -- Walter
> turns it into a one-liner.
>
> BTW BigInt will eventually get to Phobos, too.
>
>
>>
>> --bb
>>
>> On Fri, Oct 3, 2008 at 6:50 AM, Benji Smith <dlanguage at benjismith.net> wrote:
>>> Does anyone have a recommendation for a linear algebra library in D?
>>>
>>> I need to do a singular value decomposition on large sparse matrices (approx
>>> 100,000 x 100,000).
>>>
>>> I've glanced at the Blade library, on DSource, but my linear algebra is a
>>> bit rusty, and I can't tell whether the library simply lacks the ability to
>>> do an SVD or whether it can be done, but only by composing other operations.
>>>
>>> Thanks!
>>>
>>> --benji
I have written dense multidimensional arrays in D.
They provide some wrapper to various Lapack functions (through Bill's
wrappers).
The library is available at
http://github.com/fawzi
SVD is also there, but just for *dense* matrixes.
Bill's wrappers and his dflat also work with sparse matrixes.
Actually I think that you should think more about your problem
If you need full SVD U and V matrixes are *full* even if A is sparse.
100'000x100'000 double matrix ~74GB, floats is half of it, but you have
at least two matrixes.
Either you have really big resources, or you switch to a cluster and
scalapack, or (better) you reformulate your problem so that you either
need just a partial decomposition, or you can solve it iteratively.
Fawzi
More information about the Digitalmars-d
mailing list