public void performImplicitDoubleStep ( int x1 , int x2 , double real , double img ) { double a11 = A . get ( x1 , x1 ) ; double a21 = A . get ( x1 + 1 , x1 ) ; double a12 = A . get ( x1 , x1 + 1 ) ; double a22 = A . get ( x1 + 1 , x1 + 1 ) ; double a32 = A . get ( x1 + 2 , x1 + 1 ) ; double p_plus_t = 2.0 * real ; double p_times_t = real * real + img * img ; double b11 , b21 , b31 ; if ( useStandardEq ) { b11 = ( a11 * a11 - p_plus_t * a11 + p_times_t ) / a21 + a12 ; b21 = a11 + a22 - p_plus_t ; b31 = a32 ; } else { // this is different from the version in the book and seems in my testing to be more resilient to // over flow issues b11 = ( a11 * a11 - p_plus_t * a11 + p_times_t ) + a12 * a21 ; b21 = ( a11 + a22 - p_plus_t ) * a21 ; b31 = a32 * a21 ; } performImplicitDoubleStep ( x1 , x2 , b11 , b21 , b31 ) ; }
Performs an implicit double step given the set of two imaginary eigenvalues provided . Since one eigenvalue is the complex conjugate of the other only one set of real and imaginary numbers is needed .