public static double computeRowMax ( ZMatrixRMaj A , int row , int col0 , int col1 ) { double max = 0 ; int indexA = A . getIndex ( row , col0 ) ; double h [ ] = A . data ; for ( int i = col0 ; i < col1 ; i ++ ) { double realVal = h [ indexA ++ ] ; double imagVal = h [ indexA ++ ] ; double magVal = realVal * realVal + imagVal * imagVal ; if ( max < magVal ) { max = magVal ; } } return Math . sqrt ( max ) ; }
Finds the magnitude of the largest element in the row