9.2 Rectangular Arrays 通常行主序 存储方式较普遍 1 Row-major and column-major Orderi COS Rectangular are table Row-major ordering Column-major ordering C a sea a e Fig 9.1 pg 381
9.2 Rectangular Arrays 1 Row-major and Column-major Ordering: Fig 9.1 pg.381 通常行主序 存储方式较普遍
存储位置 2 indexing Rectangular table Pg 382 (地址) Suppose position of Entry(0,0)is Loc/,0), every entry store c cell, then Entry(i,j) position voc(i,j) 序号 index Loc(j)=Loc(0,0)+(*3+j)*c Row-major order Loc(i,j)=Loc(0,0)+(i+2*j)*c( Column-major ord\ ing In row-major ordering, entry ei j] goes to position nit+
2 indexing Rectangular table Pg.382 Suppose position of Entry(0,0) is Loc(0,0), every entry store c cell,then Entry(i,j) position Loc(i,j) Loc(i,j)=Loc(0,0)+(i*3+j)*c (Row-major ordering) Loc(i,j)=Loc(0,0)+(i+2*j)*c (Column-major ordering ) In row-major ordering, entry [i, j ] goes to position ni+j . 存储位置 (地址) 序号 index
3 Variation: A Access Arrays Pg382 In row-major ordering, entry [i, jI goes to position ni+j CoS is represented in row-major order as costrel e a Access array Fig 9.2 pg 383
3 Variation: A Access Arrays Pg.382 Fig 9.2 pg.383
9.3 Tables of Various Shapes XXX XX X XX XXX XX XX XX X XX XXX Tri-diagonal matrix Block diagonal matrix XX 0 ower triangular matrix Strictly upper triangular matrix Fig 9. 3 pg 384
9.3 Tables of Various Shapes Fig 9.3 pg.384
1 triangular table oweI triangular table 的的 Contiguous implementation Access table Fig 9. 4 pg 384
1 triangular table Fig 9.4 pg.384