@PublicationReference(author="Jonathan Richard Shewchuk", title="An Introduction to the Conjugate Gradient Method Without the Agonizing Pain", type=WebPage, year=1994, url="http://www.cs.cmu.edu/~quake-papers/painless-conjugate-gradient.pdf\u200e") public final class SteepestDescentMatrixSolver extends IterativeMatrixSolver<MatrixVectorMultiplier>
iterationCounter, listeners, maxIterations, rhs, shouldStop, tolerance, x0
Constructor and Description |
---|
SteepestDescentMatrixSolver(Vector x0,
Vector rhs)
Initializes a steepest-descent solver with the minimum values
|
SteepestDescentMatrixSolver(Vector x0,
Vector rhs,
double tolerance)
Initializes a steepest-descent solver with some additional parameters
|
SteepestDescentMatrixSolver(Vector x0,
Vector rhs,
double tolerance,
int maxIterations)
Initializes a steepest-descent solver with all user-definable parameters
|
Modifier and Type | Method and Description |
---|---|
CloneableSerializable |
clone()
Creates a new clone (shallow copy) of this object.
|
protected InputOutputPair<Vector,Vector> |
completeSolver()
Called after the final iteration.
|
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
protected void |
initializeSolver(MatrixVectorMultiplier function)
Called before iterations begin in learn.
|
protected double |
iterate()
Called during each step of the iterative solver.
|
addIterativeAlgorithmListener, getInitialGuess, getIteration, getMaxIterations, getResult, getTolerance, isResultValid, learn, removeIterativeAlgorithmListener, setInitialGuess, setMaxIterations, setTolerance, stop
public SteepestDescentMatrixSolver(Vector x0, Vector rhs)
x0
- The initial guess for xrhs
- The "b" to solve topublic SteepestDescentMatrixSolver(Vector x0, Vector rhs, double tolerance)
x0
- The initial guess for xrhs
- The "b" to solve totolerance
- The minimum tolerance that this must reach before
stopping (unless maxIterations is exceeded).public SteepestDescentMatrixSolver(Vector x0, Vector rhs, double tolerance, int maxIterations)
x0
- The initial guess for xrhs
- The "b" to solve totolerance
- The minimum tolerance that this must reach before
stopping (unless maxIterations is exceeded).maxIterations
- The maximum number of iterations to makeprotected final void initializeSolver(MatrixVectorMultiplier function)
IterativeMatrixSolver
initializeSolver
in class IterativeMatrixSolver<MatrixVectorMultiplier>
function
- The matrix wrapper to save for iterate.protected final double iterate()
IterativeMatrixSolver
iterate
in class IterativeMatrixSolver<MatrixVectorMultiplier>
protected final InputOutputPair<Vector,Vector> completeSolver()
IterativeMatrixSolver
completeSolver
in class IterativeMatrixSolver<MatrixVectorMultiplier>
public final CloneableSerializable clone()
CloneableSerializable
clone
in interface CloneableSerializable
clone
in class IterativeMatrixSolver<MatrixVectorMultiplier>
CloneableSerializable.clone()
public boolean equals(java.lang.Object o)
equals
in class IterativeMatrixSolver<MatrixVectorMultiplier>
public int hashCode()
hashCode
in class IterativeMatrixSolver<MatrixVectorMultiplier>
Object.hashCode()