IDL

SPRSAX

SPRSAX

The SPRSAX function takes a row-indexed sparse array created by the SPRSIN function and multiplies it by an n-element vector to its right.

Examples


; 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:
PRINT, result

IDL prints:

5.00000     -1.00000      2.00000

Syntax


Result = SPRSAX( A, X [, /DOUBLE] )

Return Value


Returns a n-element vector.

Arguments


A

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.

X

An n-element right hand vector.

Keywords


DOUBLE

Set this keyword to force the computation to be done in double-precision arithmetic.

Version History


4.0

Introduced

Resources and References


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.

See Also


FULSTR, LINBCG, SPRSAB, SPRSIN, SPRSTP, READ_SPR, WRITE_SPR

Notes


This page has no user notes yet. Be the first one!


This information is not subject to the controls of the International Traffic in Arms Regulations (ITAR) or the Export Administration Regulations (EAR). However, it may be restricted from transfer to various embargoed countries under U.S. laws and regulations.
© 2014 Exelis Visual Information Solutions