private IntIntPair nonZeroPivotSearch ( int k ) { int i , j ; double absValue ; for ( i = k ; i < coeff . length ; i ++ ) { for ( j = k ; j < coeff [ 0 ] . length ; j ++ ) { // compute absolute value of // current entry in absValue absValue = Math . abs ( coeff [ row [ i ] ] [ col [ j ] ] ) ; // check if absValue is non-zero if ( absValue > 0 ) { // found a pivot element return new IntIntPair ( i , j ) ; } // end if } // end for j } // end for k return new IntIntPair ( k , k ) ; }
Method for trivial pivot search searches for non - zero entry .