org.apache.commons.math.linear

## Class EigenDecompositionImpl.Solver

- java.lang.Object
- - org.apache.commons.math.linear.EigenDecompositionImpl.Solver

All Implemented Interfaces:
  DecompositionSolver

Enclosing class:
  EigenDecompositionImpl

    private static class EigenDecompositionImpl.Solver
    extends java.lang.Object
    implements DecompositionSolver

Specialized solver.

### Field Summary

Fields
`private ArrayRealVector[]` `eigenvectors` Eigenvectors.
`private double[]` `imagEigenvalues` Imaginary part of the realEigenvalues.
`private double[]` `realEigenvalues` Real part of the realEigenvalues.

### Constructor Summary

Constructors
`private` `EigenDecompositionImpl.Solver(double[] realEigenvalues, double[] imagEigenvalues, ArrayRealVector[] eigenvectors)` Build a solver from decomposed matrix.

### Method Summary

Methods
`RealMatrix` `getInverse()` Get the inverse of the decomposed matrix.
`boolean` `isNonSingular()` Check if the decomposed matrix is non-singular.
`double[]` `solve(double[] b)` Solve the linear equation A × X = B for symmetric matrices A.
`RealMatrix` `solve(RealMatrix b)` Solve the linear equation A × X = B for symmetric matrices A.
`RealVector` `solve(RealVector b)` Solve the linear equation A × X = B for symmetric matrices A.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### realEigenvalues

    private double[] realEigenvalues

Real part of the realEigenvalues.

#### imagEigenvalues

    private double[] imagEigenvalues

Imaginary part of the realEigenvalues.

#### eigenvectors

    private final ArrayRealVector[] eigenvectors

Eigenvectors.

### Constructor Detail

#### EigenDecompositionImpl.Solver

    private EigenDecompositionImpl.Solver(double[] realEigenvalues,
                                 double[] imagEigenvalues,
                                 ArrayRealVector[] eigenvectors)

Build a solver from decomposed matrix.

Parameters:
  `realEigenvalues` - real parts of the eigenvalues
  `imagEigenvalues` - imaginary parts of the eigenvalues
  `eigenvectors` - eigenvectors

### Method Detail

#### solve

    public double[] solve(double[] b)
                   throws java.lang.IllegalArgumentException,
                          InvalidMatrixException

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.

Specified by:
  `solve` in interface `DecompositionSolver`
Parameters:
  `b` - right-hand side of the equation A × X = B
Returns:
  a vector X that minimizes the two norm of A × X - B
Throws:
  `java.lang.IllegalArgumentException` - if matrices dimensions don't match
  `InvalidMatrixException` - if decomposed matrix is singular

#### solve

    public RealVector solve(RealVector b)
                     throws java.lang.IllegalArgumentException,
                            InvalidMatrixException

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.

Specified by:
  `solve` in interface `DecompositionSolver`
Parameters:
  `b` - right-hand side of the equation A × X = B
Returns:
  a vector X that minimizes the two norm of A × X - B
Throws:
  `java.lang.IllegalArgumentException` - if matrices dimensions don't match
  `InvalidMatrixException` - if decomposed matrix is singular

#### solve

    public RealMatrix solve(RealMatrix b)
                     throws java.lang.IllegalArgumentException,
                            InvalidMatrixException

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.

Specified by:
  `solve` in interface `DecompositionSolver`
Parameters:
  `b` - right-hand side of the equation A × X = B
Returns:
  a matrix X that minimizes the two norm of A × X - B
Throws:
  `java.lang.IllegalArgumentException` - if matrices dimensions don't match
  `InvalidMatrixException` - if decomposed matrix is singular

#### isNonSingular

    public boolean isNonSingular()

Check if the decomposed matrix is non-singular.

Specified by:
  `isNonSingular` in interface `DecompositionSolver`
Returns:
  true if the decomposed matrix is non-singular

#### getInverse

    public RealMatrix getInverse()
                          throws InvalidMatrixException

Get the inverse of the decomposed matrix.

Specified by:
  `getInverse` in interface `DecompositionSolver`
Returns:
  inverse matrix
Throws:
  `InvalidMatrixException` - if decomposed matrix is singular