SPRSAX is based on the routine sprsax described in section 2.7 of Numerical Recipes in C: The Art of Scientific Computing (Second Edition), published by Cambridge University Press, and is used by permission.
; Begin by creating an array A:
A = [[ 5.0, 0.0, 0.0], $
[ 3.0, -2.0, 0.0], $
[ 4.0, -1.0, 0.0]]
; Define the right-hand vector:
X = [1.0, 2.0, -1.0]
; Convert to sparse format, then multiply by X:
result = SPRSAX(SPRSIN(A),X)
; Print the result:
5.00000 -1.00000 2.00000
Result = SPRSAX( A, X [, /DOUBLE] )
Returns a n-element vector.
A row-indexed sparse array created by the SPRSIN function.
Note: If SPRSAX is complex then only the real part is used for the computation.
An n-element right hand vector.
Set this keyword to force the computation to be done in double-precision arithmetic.
This page has no comments yet. Be the first one!