public Complex contraction ( ) { int i , j ; Complex result = new Complex ( 0d , 0d ) ; for ( i = 0 ; i < rows ; i ++ ) for ( j = 0 ; j < columns ; j ++ ) { result . real += realmatrix [ i ] [ j ] ; result . imag += imagmatrix [ i ] [ j ] ; } return result ; }
Calculates the contraction from a matrix