public abstract class IterativeLinearSolver extends Object
| Constructor and Description | 
|---|
| IterativeLinearSolver(int maxIterations)Creates a new instance of this class, with default iteration manager. | 
| IterativeLinearSolver(IterationManager manager)Creates a new instance of this class, with custom iteration manager. | 
| Modifier and Type | Method and Description | 
|---|---|
| protected static void | checkParameters(RealLinearOperator a,
               RealVector b,
               RealVector x0)Performs all dimension checks on the parameters of
  solveandsolveInPlace,
 and throws an exception if one of the checks fails. | 
| IterationManager | getIterationManager()Returns the iteration manager attached to this solver. | 
| RealVector | solve(RealLinearOperator a,
     RealVector b)Returns an estimate of the solution to the linear system A · x =
 b. | 
| RealVector | solve(RealLinearOperator a,
     RealVector b,
     RealVector x0)Returns an estimate of the solution to the linear system A · x =
 b. | 
| abstract RealVector | solveInPlace(RealLinearOperator a,
            RealVector b,
            RealVector x0)Returns an estimate of the solution to the linear system A · x =
 b. | 
public IterativeLinearSolver(int maxIterations)
maxIterations - the maximum number of iterationspublic IterativeLinearSolver(IterationManager manager) throws NullArgumentException
manager - the custom iteration managerNullArgumentException - if manager is nullprotected static void checkParameters(RealLinearOperator a, RealVector b, RealVector x0) throws MathIllegalArgumentException, NullArgumentException
solve and
 solveInPlace,
 and throws an exception if one of the checks fails.a - the linear operator A of the systemb - the right-hand side vectorx0 - the initial guess of the solutionNullArgumentException - if one of the parameters is nullMathIllegalArgumentException - if a is not squareMathIllegalArgumentException - if b or x0 have
 dimensions inconsistent with apublic IterationManager getIterationManager()
public RealVector solve(RealLinearOperator a, RealVector b) throws MathIllegalArgumentException, NullArgumentException, MathIllegalStateException
a - the linear operator A of the systemb - the right-hand side vectorNullArgumentException - if one of the parameters is nullMathIllegalArgumentException - if a is not squareMathIllegalArgumentException - if b has dimensions
 inconsistent with aMathIllegalStateException - at exhaustion of the iteration count,
 unless a custom
 callback
 has been set at construction of the IterationManagerpublic RealVector solve(RealLinearOperator a, RealVector b, RealVector x0) throws MathIllegalArgumentException, NullArgumentException, MathIllegalStateException
a - the linear operator A of the systemb - the right-hand side vectorx0 - the initial guess of the solutionNullArgumentException - if one of the parameters is nullMathIllegalArgumentException - if a is not squareMathIllegalArgumentException - if b or x0 have
 dimensions inconsistent with aMathIllegalStateException - at exhaustion of the iteration count,
 unless a custom
 callback
 has been set at construction of the IterationManagerpublic abstract RealVector solveInPlace(RealLinearOperator a, RealVector b, RealVector x0) throws MathIllegalArgumentException, NullArgumentException, MathIllegalStateException
a - the linear operator A of the systemb - the right-hand side vectorx0 - initial guess of the solutionx0 (shallow copy) updated with the
 solutionNullArgumentException - if one of the parameters is nullMathIllegalArgumentException - if a is not squareMathIllegalArgumentException - if b or x0 have
 dimensions inconsistent with aMathIllegalStateException - at exhaustion of the iteration count,
 unless a custom
 callback
 has been set at construction of the IterationManagerCopyright © 2016–2020 Hipparchus.org. All rights reserved.