question: private void assignRandomUpperTriangularMatrix ( int n , SecureRandom sr ) { numRows = n ; numColumns = n ; length = ( n + 31 ) > > > 5 ; matrix = new int [ numRows ] [ length ] ; int rest = n & 0x1f ; int help ; if ( rest == 0 ) { help = 0xffffffff ; } else { help = ( 1 << rest ) - 1 ; } for ( int i = 0 ; i < numRows ; i ++ ) { int q = i > > > 5 ; int r = i & 0x1f ; int s = r ; r = 1 << r ; for ( int j = 0 ; j < q ; j ++ ) { matrix [ i ] [ j ] = 0 ; } matrix [ i ] [ q ] = ( sr . nextInt ( ) << s ) | r ; for ( int j = q + 1 ; j < length ; j ++ ) { matrix [ i ] [ j ] = sr . nextInt ( ) ; } matrix [ i ] [ length - 1 ] &= help ; } }
target:  Create a nxn random upper triangular matrix.