4.1 v1 Sparse Vector and Matrix Algebra

Procedure use multiple switch technique to

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

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: olically add row by row. Symbolic result is data structure for numerical result. – Using created data structure perform numerical result. – (For something this simple, symbolic and numerical routines would be interwoven; however they will be kept separate in this example to emphasis the difference between symbolic and numerical operations.) © Copyright 1999 Daniel Tylavsky Sparse Vector & Matrix Algebra Initialize: Switch=0, End=0, IR=0 IR=IR+1 For two matrices, A & BMerge RIndxA and RIndxB using multiple use switch technique with IR as switch value. Save merged indices as RIndxC. Increment End on each entry into RIndxC. Mark end of row of C data structure: ERP(IR)=End IR=N? No Yes Perform numerical segment. © Copyright 1999 Daniel Tylavsky Sparse Vector & Matrix Algebra The “R*Indx” arrays should read “C*Indx” arrays to represent column indices. • Symbolically add the following matrices stored in RR(C)U. 6.0 1.0 5.0 2.0 7.0 11. 8.0 2.0 14. 23. A= B= 5.0 3.0 7.0 16. 7.0 88. 9.0 10. 4.0 Pos: 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 88 99 10 11 10 11 A(k): 1.0 5.0 6.0 2.0 8.0 3.0 7.0 9.0 10.0 4....
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online