Next: The shift
Up: An implicit algorithm for
Previous: Proof of the correctness
Effective
implementation of the implicit
algorithm
The
implementation can be downloaded at
http://www.cs.kuleuven.ac.be/
marc/. Not all the details of the
implementation are given, but the mathematical ideas, behind the
algorithm are included, and they should make it possible for the
reader to implement this algorithm.
The following function in Matlab5-style notation
[Gnew,dnew]=CRep(G,d)
will perform the first sequence of Givens transformations. The input
consists of the Givens vector representation of the matrix, the output
is the representation of the new matrix, but from bottom to top.
Suppose our semiseparable matrix
is built up with the Givens
transformations
and the vector elements
. We will now perform
the first
Givens transformations on both sides of the matrix,
and we will retrieve the representation of the resulting semiseparable
matrix. The matrix
has the following structure:
 |
(13) |
And the Givens transformations are denoted in the same way as in
(6). Remark that the Givens transformations needed for the
first step of the
algorithm are exactly the Givens
transformations
from the representation. This is a huge
advantage, because these Givens transformations do not need to be
calculated anymore.
Applying the first transformation
to the left of matrix
(13) gives us the following equations
and the matrix looks like:
Applying the transformation to the right gives the following
equations:
with
When denoting now the new representation with
and
,
we get:
and
. This procedure can now be continued to find the
full new matrix
and the vector
. Remark once more
that this representation is constructed from bottom to top.
The following function
[Gnew,dnew]=PerSeqGiv(G,d,specgiv)
in the algorithm performs in fact the next
Givens
transformations on the matrix. This function starts with one special
Givens transformation
. Because the following
sequence of Givens transformations will divide the matrix into two
semiseparable parts, we have to store twice a semiseparable matrix.
The decreasing lower right semiseparable matrix will be stored in
the Givens and vector representation. While the growing upper left
part will also be stored in a the Givens vector representation
.
Suppose we want to perform the first special Givens transformation
on the matrix
, which looks like (this is different
from above, because the representation is from bottom to top now):
 |
(14) |
Applying now the first special Givens transformation
to the
left of the matrix (14), we get the following matrix:
Applying the Givens transformation
on the right gives, for
the following matrix:
The element
can already be stored in the Givens vector
representation of the new semiseparable matrix. The lower right
reduced semiseparable matrix can still be constructed by the old
representation and the knowledge of
and the factor
. The upper left
block can now be used to
construct the next Givens transformation according to Theorem
3.2. One can clearly see that this procedure, can be repeated to
find the new diagonal element
and the first subdiagonal
element
, and so on.
In the practical implementation the factor
is not used, instead the
Givens
transformation is applied directly on the vector
from which the value of the first element of
can be calculated and also the other elements in
the same column.
Also the new representation is built up at the same time, by storing
extra information concerning the values of
and
. For a full understanding the software can be
downloaded and investigated.
Next: The shift
Up: An implicit algorithm for
Previous: Proof of the correctness
Raf Vandebril
2004-04-19