Array storage structure, compressed storage of special matrices and sparse matrices

1. Storage structure of arrays, compressed storage of special matrices and sparse matrices

1.1 Storage structure of array

1.1.1 Storage structure relationship of one-dimensional array

1.1.2 Storage structure relationship of multi-dimensional arrays

Take a two-dimensional array as an example, the row subscript range: [ 0 , h 1 ] [0,h_1] [0,h1], column subscript range: [ 0 , h 2 ] [0,h_2] [0,h2]
Mapping method one: row-first

Mapping method two: column-first

1.2 Compressed storage of special matrices

describematrix element, row and column numbers usually start from 1
Descriptionarrayelements, the subscripts usually start from 0

1.2.1 Symmetric matrix



1.2.2 Lower triangular matrix


1.2.3 Upper triangular matrix


1.2.4 Tridiagonal matrix


1.3 Compressed storage of sparse matrices

1.3.1 Triplets (sequential storage)

1.3.2 Cross linked list (linked storage)

Guess you like

Origin blog.csdn.net/weixin_48524215/article/details/134252310