public static Matrix grayOutCEOrig ( Atom [ ] ca2 , int rows , int cols , CECalculator calculator , Matrix origM , int blankWindowSize , double [ ] gradientPolyCoeff , double gradientExpCoeff ) { if ( origM == null ) { origM = new Matrix ( calculator . getMatMatrix ( ) ) ; } // symmetry hack, disable main diagonal for ( int i = 0 ; i < rows ; i ++ ) { for ( int j = 0 ; j < cols ; j ++ ) { int diff = Math . abs ( i - j ) ; double resetVal = getResetVal ( origM . get ( i , j ) , diff , gradientPolyCoeff , gradientExpCoeff ) ; if ( diff < blankWindowSize ) { origM . set ( i , j , origM . get ( i , j ) + resetVal ) ; } int diff2 = Math . abs ( i - ( j - ca2 . length / 2 ) ) ; // other side double resetVal2 = getResetVal ( origM . get ( i , j ) , diff2 , gradientPolyCoeff , gradientExpCoeff ) ; if ( diff2 < blankWindowSize ) { origM . set ( i , j , origM . get ( i , j ) + resetVal2 ) ; } } } return origM ; }
Grays out the main diagonal of a duplicated distance matrix .