/src/main/java/net/finmath/functions/LinearAlgebra.java
for( int i=0; i<diag.getRowDimension( ) ; i++) diag.setEntry( i, i, Math.exp( diag.setEntry( numberOfCols , i) ) ) ;
for ( int i=0; i<diag.getRowDimension ( ) ; i++ ) diag.setEntry ( i, i, Math.exp ( diag.getEntry ( i, i ) ) ) ;
return matrixLog(new Array2DRowRealMatrix(matrix)).getData(); } private static RealMatrix matrixExp(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 exp = MatrixUtils.createRealIdentityMatrix(matrix.getRowDimension());; double factor = 1.0; for(int k=1; k<15; k++) {