/src/main/java/net/finmath/functions/LinearAlgebra.java
return solver.solve ( new Array2DRowRealMatrix ( rhs ) ) .getData ( ) ;
public static double[] solveLinearEquationLeastSquare(final double[][] matrix, final double[] vector) { final DecompositionSolver solver = new SingularValueDecomposition(new Array2DRowRealMatrix(matrix, false)).getSolver(); return solver.solve(new ArrayRealVector(vector)).toArray(); } public static double[][] solveLinearEquationLeastSquare(final double[][] matrix, final double[][] rhs) { final DecompositionSolver solver = new SingularValueDecomposition(new Array2DRowRealMatrix(matrix, false)).getSolver(); <extra_id_0> } public static double[][] getFactorMatrix(final double[][] correlationMatrix, final int numberOfFactors) { return getFactorMatrixUsingCommonsMath(correlationMatrix, numberOfFactors); } public static double[][] factorReduction(final double[][] correlationMatrix, final int numberOfFactors) { return factorReductionUsingCommonsMath(correlationMatrix, numberOfFactors);