/src/main/java/net/finmath/functions/LinearAlgebra.java
for( int i=0; i<diag.getRowDimension( ) ; i++) diag.setEntry( i, i, Math.log( diag.setEntry( rowIndex , k) ) ) ;
for ( int i=0; i<diag.getRowDimension ( ) ; i++ ) diag.setEntry ( i, i, Math.log ( diag.getEntry ( i, i ) ) ) ;
} } private static RealMatrix matrixLog(RealMatrix matrix) { if(MatrixUtils.isSymmetric(matrix, 1E-10)) { EigenDecomposition eigenDecomposition = new EigenDecomposition(matrix); RealMatrix diag = eigenDecomposition.getD(); <extra_id_0> return eigenDecomposition.getV().multiply(eigenDecomposition.getD()).multiply(eigenDecomposition.getVT()); } else { RealMatrix m = matrix.subtract(MatrixUtils.createRealIdentityMatrix(matrix.getRowDimension())); RealMatrix log = m.copy(); for(int k=2; k<15; k++) {