You are on page 1of 1

773100-1.

2-9P AID: 8522 | 25/01/2023

The objective is to develop a compact storage scheme for symmetric band matrices.

One compact storage scheme for symmetric band matrices is the half-bandwidth storage
scheme. In this scheme, only the lower or upper triangular part of the matrix, along with
the diagonal, is stored in an array. The size of the array is equal to the number of non-
zero elements in the triangular part plus the number of diagonal elements.

The corresponding gaxpy algorithm for a symmetric band matrix stored in the half-
bandwidth storage scheme is as follows:

The explanation for the algorithm is as follows:

1. Initialize the integer variable to 0.


2. Iterate over a range of from to :
 Initialize the integer variable to the maximum value between and
.
 Iterate over a range of from the value obtained in above step to the
minimum value between and :
 Add the product of to the .
 End of the loop
End of the loop

Here is the dimension of the matrix, is the array storing the matrix, is the half-
bandwidth, is the input vector, and is the output vector. The nested loops iterate over
the non-zero elements of the matrix, and the indices are adjusted based on the half-
bandwidth storage scheme.

Hence, the compact storage scheme for symmetric band matrices is the half-bandwidth
storage scheme. The corresponding algorithm is given above.

You might also like