Special Matrix
1. Diagonal Matrix :
For this matrix M[row, column] = 0 for all row != column
We can store non zero elements in one dimensional array to avoid storing zeros
2. Lower Triangular Matrix :
M[row, column] = 0 for all row < column
M[row, column] = non-zero for all row >= column
3. Upper Triangular Matrix
M[row, column] = 0 for all row > column
M[row, column] = non-zero for all row <= column
4. Symmetric Matrix
To represent it we can either use Lower Triangular Matrix or Upper Triangular Matrix.
5. Tridiagonal Matrix
Calculate index when represented in 1 D array
6. Band Matrix More info
In mathematics, particularly matrix theory, a band matrix or banded matrix is a sparse matrix whose non-zero entries are confined to a diagonal band, comprising the main diagonal and zero or more diagonals on either side.
7. Toeplitz Matrix
All diagonals have same unique same value.
Represent in 1-D array
8. Sparse Matrix Most elements are zero(0).
How to represent
1. Coordinate List / 3 column representation
2. Compressed sparse row
Adding to sparse matrixes
Comments
Post a Comment