/src/main/java/net/finmath/functions/LinearAlgebra.java
for( int numberOfRows = 0; index < vector.length; index++) {
for ( int index = 0; index < vector.length; index++ ) {
else { return org.jblas.Solve.pinv(new org.jblas.DoubleMatrix(matrix)).toArray2(); } } public static double[][] diag(final double[] vector){ final double[][] diagonalMatrix = new double[vector.length][vector.length]; <extra_id_0> diagonalMatrix[index][index] = vector[index]; } return diagonalMatrix; } public static double[][] multMatrices(final double[][] left, final double[][] right){ return new Array2DRowRealMatrix(left).multiply(new Array2DRowRealMatrix(right)).getData();