4.1 v1 Sparse Vector and Matrix Algebra

# 0 50 60 20 80 30 70 90 100 40 10 50 60 20 80 30

This preview shows page 1. Sign up to view the full content.

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 0 1.0 5.0 6.0 2.0 8.0 3.0 7.0 9.0 10.0 4.0 RAIndx(k): 1 1 2 2 4 4 2 2 1 1 3 3 4 4 11 33 44 ERPA(K): 0 3 3 5 5 7 7 10 10 B(k): RBIndx(k): ERPB(K): Switch(k): RCIndx(k): ERPC(K): 0 0 12 12 2.0 7.0 11.0 23.0 14.0 5.0 16.0 7.0 88.0 2.0 7.0 11.0 23.0 14.0 5.0 16.0 7.0 88.0 1 1 2 2 3 4 3 2 2 1 1 1 3 1 3 4 3 3 13 34 4 3 3 5 5 7 7 9 9 3 2 1 0 4 1 1 4 3 4 2 1 0 2 2 2 6 6 3 1 0 4 4 4 9 8 9 3 1 0 4 3 3 12 2 2 1 1 3 3 44 11 1 3 4 © Copyright 1999 Daniel Tylavsky Sparse Vector & Matrix Algebra Initialize: Switch=0, IR=0 Clear C(k) from 1 to N IR=IR+1 Use Switch array to point to where each col. is stored in C(k). Add A and B to appropriate locations in C from ERPA/B(IR-1)+1 to ERPA(IR). N IR=N? Y End © Copyright 1999 Daniel Tylavsky Sparse Vector & Matrix Algebra The “R*Indx” arrays should read “C*Indx” arrays to represent column indices. You can show that the arrays at completion have the form: Pos: A(k): RAIndx(k): ERPA(K): B(k): RBIndx(k): ERPB(K): Switch(k): RCIndx(k): ERPC(K): C(k): IR: 0 0 1 1.0 1 3 2 5.0 2 5 0 2.0 1 3 7.0 11.0 23.0 14.0 5.0 16.0 7.0 88.0 2 3 2 1 1 3 3 4 5 7 9 0 4 2 1 0 3 6.0 4 7...
View Full Document

## This note was uploaded on 12/05/2012 for the course EEE 571 taught by Professor Tylavsky during the Spring '12 term at ASU.

Ask a homework question - tutors are online