public inbox for gsl-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Edwin Robert Tisdale <E.Robert.Tisdale@jpl.nasa.gov>
To: gsl-discuss@sources.redhat.com
Subject: Re: sparce matrices
Date: Wed, 19 Dec 2001 13:20:00 -0000	[thread overview]
Message-ID: <3BBB597B.65232549@jpl.nasa.gov> (raw)

Matthew J. Doller wrote:

> I am about to begin a project at my school using gsl
> and my advising professor seems to be very interested in gsl.
> one question he did have was,
> "Are there any constructs to store sparces matrices?"
> It might be beneficial to have such a way to store them
> especially when dealing with matrices that are 10e8 x 10e8 in size.

First, let me point out that a matrix -- even a sparse matrix --
of that size has no physical relevance.
Even a matrix of size 10,000 by 10,000 is on shaky numerical ground.
More typically, large sparse matrices are on the order of 1,000 by
1,000.
If they are much larger than that,
the user is probably doing something very, very wrong.

There are two distinct considerations in sparse matrix libraries.
The primary consideration is to save time by avoiding algorithms
that move zeros in and out of memory.
The secondary consideration is to save memory
by storing only the non zero entries of the sparse matrix.
Modern computer architectures have fast floating-point pipelines
and large, fast and cheap memory so neither of these considerations
is worth pursuing unless the matrix is very large and very sparse
(i.e., less than 10% of the entries are non zero).
It is especially important to keep this in mind
when considering triangular and symmetric matrix representations.

There doesn't appear to be any suitable abstraction for sparse matrices.
Sparse matrix libraries are all about the specific data representation.
Take a look at Survey of Sparse Matrix Storage Formats

http://www.netlib.org/linalg/old_html_templates/subsection2.8.3.1.html

Low level vector and matrix arithmetic libraries like the GSL and
the Vector, Signal and Image Processing Library (VSIPL)

	http://www.vsipl.org/

don't support sparse matrix data types directly but the VSIPL API
specifies a gather operation which can be used to collect
the non zero elements of a sparse matrix into a dense vector
and a scatter operation which can be used to insert
the elements of a dense vector into a sparse matrix.
Otherwise, the only other truly useful operation
is sparse matrix - dense vector multiplication
which can be used to solve a system of equations iteratively --
see IML++ (Iterative Methods Library) v. 1.2a

	http://math.nist.gov/iml++/

for example.

             reply	other threads:[~2001-12-19 13:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-19 13:20 Edwin Robert Tisdale [this message]
2001-12-19 13:20 ` Peter Schmitteckert
  -- strict thread matches above, loose matches on Subject: below --
2001-12-19 13:20 Edwin Robert Tisdale
2001-12-19 13:20 Mikael Adlers
2001-12-19 13:20 Matthew J. Doller
2001-12-19 13:20 ` Brian Gough

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3BBB597B.65232549@jpl.nasa.gov \
    --to=e.robert.tisdale@jpl.nasa.gov \
    --cc=gsl-discuss@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).