High-Speed Sparse Linear Algebra
Mathematica 5 utilizes specialized techniques to make
computations involving sparse matrices (matrices in which most of the
elements are zero) vastly more efficient for large-scale
problems. These improvements make Mathematica highly suitable
for large-scale simulations, optimization, or solving of partial or
ordinary differential equations--all examples in which sparse
matrices are typically involved.
Mathematica 5's implementation of sparse linear algebra is
unique because:
- Symbolic preprocessing optimizes the formation of sparse matrices.
- Sparse algorithms are automatically utilized where they would
improve performance, without user intervention. (They can be manually
evoked where required, too--for example, for comparison with
traditional numerical systems.)
- Any dimension (or rank) of array is handled.
The performance in speed and memory utilization of sparse linear algebra
operations is on a par with, or better than, those in dedicated
numerical systems.
The following graph shows the large difference in size between sparse
and dense representations of a matrix with three nonzero elements per
row.
Many common matrix operations on sparse arrays are significantly
faster than operations on dense arrays. The following graph shows the
time it takes to invert a matrix with three nonzero elements per row
in Mathematica 5 and 4.2.
|