SSPR2/DSPR2/CHPR2/ZHPR2 |
Upper triangular storage
If the upper triangle of A is
11 12 13 14
22 23 24
33 34
44
then A is packed
k | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
ap(k) | 11 | 12 | 22 | 13 | 23 | 33 | 14 | 24 | 34 | 44 |
|
|
|
|
|
|
|
|
|
|
|
Upper triangular matrix element aij is stored in array element ap(i+(j⋅(j−1))/2).
Lower triangular storage
If the lower triangle of A is
11
21 22
31 32 33
41 42 43 44
then A is packed
k | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
ap(k) | 11 | 21 | 31 | 41 | 22 | 32 | 42 | 33 | 43 | 44 |
|
|
|
|
|
|
|
|
|
|
|
Lower triangular matrix element aij is stored in array element ap(i+((j−1)⋅(2n−j))/2).
260HP MLIB User’s Guide