next up previous
Next: Implementation with Householder and Up: The algorithms and operation Previous: The algorithms and operation

Implementation with Givens rotations

The algorithm can be implemented completely with Givens rotations, as described in Theorem 1.1. When we perform everything with Givens rotations we have the following algorithm:

algorithm 1   Suppose we have the following function:
A=SymGiv(A,k,l,m)
Which transforms $ A$ into $ G*A*G^T$ where $ G$ is the Givens rotation sucht that $ A*G^T$ eliminates the element in position $ (k,m)$ with the element $ (l,m)$. Using this function our algorithm looks like: (in matlab style notation)
for j=n:-1:2
  for i=2:(j-1)
    A=SymGiv(A,i-1,i,j);
  end
  for i=j:1:n
    A=SymGiv(A,i-1,i,i);
  end
end

The calculation cost can now be calculated. When exploiting the symmetry and the fact that the lower part always becomes semi separable ( which can easily be stored in two vectors, rather than in a complete matrix), we come to the following count:

$\displaystyle \sum_{j=n:-1:2}\left(\sum_{i=2:j-1}\left(6*(j-1)+\alpha\right)+\sum_{i=j:n} \beta \right)$    

Where $ \alpha$ and $ \beta$ are two constants. This gives us the following complexity:

$\displaystyle 2n^3+O(n^2)$    



Raf Vandebril 2004-04-19