Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Looking for a sparse-matrix template-based C++ library

10 views
Skip to first unread message

Jugoslav Dujic

unread,
Oct 3, 2006, 12:06:13 PM10/3/06
to
Apologies if this is off-topic, but it's certainly off-topic in
comp.lang.c++ (you know...), so...

I'm looking for a C++ library for solving sparse linear equations
systems with the following properties:

1) Ideally, it would be template (and/or STL)-based so that the
interfaces are easy to write, read and debug
2) having a free license
3) reasonably fast and stable
4) containing a symmetric linear LU or QR solver (iterative ones
are also fine, but they might be an overkill for the use)

I'd really like to hear some recommendations before I proceed
(I can kind of glue some of the ones below, but I'd rather not
reinvent the wheel).

So far, I've found:

http://math.nist.gov/spblas/ - NIST sparse BLAS. Powerful, fast, a bit
ugly interface (heck, 5 arguments for a matrix/vector multiplication,
and reuse of input storage for output, but that is wrappable). However,
it doesn't contain symmetric solvers, only triangular ones.

http://math.nist.gov/sparselib++ - Older SparseLib++ package (not maintained).
Arcane to build and difficult to port; has a LU solver based on a
"home-grown BLAS" routines (quote from the source). The ugliest thing
about it is really awkward filling of matrices; it doesn't do any dynamic
storage (std::vector or like) within, so to add an element to the matrix
after the painful construction is a pain++.

http://math.nist.gov/iml++/ - Didn't look at it in detail, but iterative
methods kind of scared me, plus SparseLib++ is a requirement.

http://www.cise.ufl.edu/research/sparse/umfpack/ - unsymmetric, non-template,
difficult to build. Didn't really look at it.

--
Jugoslav
___________
www.xeffort.com

Please reply to the newsgroup.
You can find my real e-mail on my home page above.

Sudarshan Raghunathan

unread,
Oct 3, 2006, 1:17:12 PM10/3/06
to
Have you looked into Trilinos (http://software.sandia.gov/trilinos/)?
The Amesos package provides a bunch of direct solvers and AztecOO, the
iterative ones.

Alternatively, you might consider PETsc
(http://www-unix.mcs.anl.gov/petsc/petsc-as/). It's not C++, but
emulates object-oriented concepts in C.

Neither has a QR solver. The only one that I know of that has sparse QR
is CSparse/CXSparse, which again is C and not C++. Not much experience
with it, yet.

0 new messages