protected boolean checkForAndHandleZeros ( ) { // check for zeros along off diagonal for ( int i = x2 - 1 ; i >= x1 ; i -- ) { if ( isOffZero ( i ) ) { // System.out.println("steps at split = "+steps); resetSteps ( ) ; splits [ numSplits ++ ] = i ; x1 = i + 1 ; return true ; } } // check for zeros along diagonal for ( int i = x2 - 1 ; i >= x1 ; i -- ) { if ( isDiagonalZero ( i ) ) { // System.out.println("steps at split = "+steps); pushRight ( i ) ; resetSteps ( ) ; splits [ numSplits ++ ] = i ; x1 = i + 1 ; return true ; } } return false ; }
Checks to see if either the diagonal element or off diagonal element is zero . If one is then it performs a split or pushes it off the matrix .