diff --git a/src/main/java/org/apache/commons/math/linear/EigenDecompositionImpl.java b/src/main/java/org/apache/commons/math/linear/EigenDecompositionImpl.java index 67dd96c12..7941ee956 100644 --- a/src/main/java/org/apache/commons/math/linear/EigenDecompositionImpl.java +++ b/src/main/java/org/apache/commons/math/linear/EigenDecompositionImpl.java @@ -268,43 +268,6 @@ public class EigenDecompositionImpl implements EigenDecomposition { this.eigenvectors = eigenvectors; } - /** - * Solve the linear equation A × X = B for symmetric matrices A. - *
- * This method only find exact linear solutions, i.e. solutions for - * which ||A × X - B|| is exactly 0. - *
- * @param b Right-hand side of the equation A × X = B - * @return a Vector X that minimizes the two norm of A × X - B - * @throws DimensionMismatchException if the matrices dimensions do not match. - * @throws SingularMatrixException if the decomposed matrix is singular. - */ - public double[] solve(final double[] b) { - - if (!isNonSingular()) { - throw new SingularMatrixException(); - } - - final int m = realEigenvalues.length; - if (b.length != m) { - throw new DimensionMismatchException(b.length, m); - } - - final double[] bp = new double[m]; - final ArrayRealVector bVector = new ArrayRealVector(b, false); - for (int i = 0; i < m; ++i) { - final ArrayRealVector v = eigenvectors[i]; - final double[] vData = v.getDataRef(); - final double s = v.dotProduct(bVector) / realEigenvalues[i]; - for (int j = 0; j < m; ++j) { - bp[j] += s * vData[j]; - } - } - - return bp; - - } - /** * Solve the linear equation A × X = B for symmetric matrices A. *