code: public static double[] solveLinearEquationSVD(double[][] matrixA, double[] b) {
  
  		if(isSolverUseApacheCommonsMath) {
  			Array2DRowRealMatrix matrix = new Array2DRowRealMatrix(matrixA);
  
  			// Using SVD - very slow
  			DecompositionSolver solver = new SingularValueDecomposition(matrix).getSolver();
  
  			return solver.solve(new Array2DRowRealMatrix(b)).getColumn(0);
  		}
  		else {
  			return org.jblas.Solve.solve(new org.jblas.DoubleMatrix(matrixA), new org.jblas.DoubleMatrix(b)).data;
  
  			// For use of colt:
  			// cern.colt.matrix.linalg.Algebra linearAlgebra = new cern.colt.matrix.linalg.Algebra();
  			// return linearAlgebra.solve(new DenseDoubleMatrix2D(A), linearAlgebra.transpose(new DenseDoubleMatrix2D(new double[][] { b }))).viewColumn(0).toArray();
  
  			// For use of parallel colt:
  			// return new cern.colt.matrix.tdouble.algo.decomposition.DenseDoubleLUDecomposition(new cern.colt.matrix.tdouble.impl.DenseDoubleMatrix2D(A)).solve(new cern.colt.matrix.tdouble.impl.DenseDoubleMatrix1D(b)).toArray();
  		}
  	}
docs: Find a solution of the linear equation A x = b where
  <ul>
  <li>A is an n x m - matrix given as double[n][m]</li>
  <li>b is an m - vector given as double[m],</li>
  <li>x is an n - vector given as double[n],</li>
  </ul>
  
  @param matrixA The matrix A (left hand side of the linear equation).
  @param b The vector (right hand of the linear equation).
  @return A solution x to A x = b.