List of usage examples for org.apache.commons.math.linear SingularMatrixException getLocalizedMessage
@Override
public String getLocalizedMessage()
From source file:org.deegree.geometry.linearization.CurveLinearizer.java
private double[] solveLinearEquation(double[][] matrixA, double[] vectorb) { RealMatrix coefficients = new Array2DRowRealMatrix(matrixA, false); // LU-decomposition DecompositionSolver solver = new LUDecompositionImpl(coefficients).getSolver(); RealVector constants = new ArrayRealVector(vectorb, false); RealVector solution = null;/*from w w w . j ava 2 s . c om*/ try { solution = solver.solve(constants); } catch (SingularMatrixException e) { LOG.error(e.getLocalizedMessage()); e.printStackTrace(); } return solution.getData(); }