public void apply ( Vector x , int i1 , int i2 ) { double temp = c * x . get ( i1 ) + s * x . get ( i2 ) ; x . set ( i2 , - s * x . get ( i1 ) + c * x . get ( i2 ) ) ; x . set ( i1 , temp ) ; }
Applies the Givens rotation to two elements of a vector