Download presentation
Presentation is loading. Please wait.
Published byชาติชาย วอชิงตัน Modified over 5 years ago
1
Matrices An appeaser is one who feeds a crocodile—hoping it will eat him last. Winston Churchhill
2
Types of Sparse Matrices
Random Distribution.
3
Types of Sparse Matrices Cont...
Multiple bands Vertical Banding: Diagonal Horizontal
4
Types of Sparse Matrices Cont...
Blocking: Corners Diagonal
5
Bit Map Compression B Z 5 2 4 9 6 1 3 8 R 1 3 5 6 8 Compressed Matrix
Raw Matrix B Z R
6
Address Map Compression
Compressed Matrix Raw Matrix A Array Index Z R
7
Dealing with Empty Rows
R must contain place holders into Z. Values are set to next non empty row. Z R
8
Dealing with Empty Rows
When a value is entered in row r Values in Z belonging to r +1 and above are shifted right. Row index in R is also adjusted +1 for rows above r In practice, R would contain a dummy column at the end so the last row is not special cased. 7 Z 1 R
9
Orthogonal Linked Lists
Data Down Row Col Right Nodes used in the structure Matrix indices. Right & down pointers. Each non-zero entry to the left will be represented by the above node structure. Structure is linked together using the pointer fields
10
0 1 12 10 5 0 2 0 8 0 6 0 0 6 0 9 0 2 11 0 0 4 5 2 2 2 2 9 4 5 1 9 5 4 6 6 6 1 8 1 3 8 9 8 11 2
11
Adding [6,4] Find correct row Add Links Find correct Column Add links
0 1 12 10 5 0 2 0 8 0 6 0 0 6 0 9 0 2 11 0 0 4 Adding [6,4] 5 2 2 2 2 9 NEW 6 4 Find correct row Add Links 4 5 1 9 5 4 6 6 6 1 8 1 3 8 9 8 11 2
12
Relative Compression of Sparse Matrix
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.