![]() |
A conjugate gradient solver.TODO: description TODO: Problem formulation: !!
More...
#include <CG.h>
Inherits blaze::Solver.
Public Member Functions | |
Constructors | |
CG () | |
The default constructor for the conjugate gradient solver. | |
Solver functions | |
bool | solve (LSE &lse) |
TODO. More... | |
bool | solve (const CMatMxN &A, const VecN &b, VecN &x) |
TODO. More... | |
Get functions | |
size_t | getMaxIterations () const |
Returns the maximum number of iterations the solver may spend solving the problem. More... | |
size_t | getLastIterations () const |
Returns the number of iterations spent in the last solution process. More... | |
real | getLastPrecision () const |
Returns the precision of the solution after the solution process. More... | |
real | getThreshold () const |
Returns the threshold that classifies a solution as good enough. More... | |
Set functions | |
void | setMaxIterations (size_t maxIterations) |
Sets the maximum number of iterations the solver may spend solving the problem. More... | |
void | setThreshold (real threshold) |
Sets the threshold which classifies a solution as good enough. More... | |
Protected Attributes | |
Member variables | |
size_t | maxIterations_ |
The maximum number of iterations. More... | |
size_t | lastIterations_ |
The number of iterations spent in the last solution process. | |
real | lastPrecision_ |
The precision of the solution after the solution process. | |
real | threshold_ |
Precision threshold for the solution. | |
Private Attributes | |
Member variables | |
VecN | r_ |
TODO. | |
VecN | d_ |
TODO. | |
VecN | h_ |
TODO. | |
A conjugate gradient solver.
TODO: description TODO: Problem formulation: !!
|
inlineinherited |
Returns the number of iterations spent in the last solution process.
|
inlineinherited |
Returns the precision of the solution after the solution process.
The solver is not enforced to compute the precision after the solution. Instead it can just report infinity as the last precision.
|
inlineinherited |
Returns the maximum number of iterations the solver may spend solving the problem.
|
inlineinherited |
Returns the threshold that classifies a solution as good enough.
|
inlineinherited |
Sets the maximum number of iterations the solver may spend solving the problem.
maxIterations | The maximum number of iterations spent in the solver. |
|
inlineinherited |
Sets the threshold which classifies a solution as good enough.
threshold | The threshold for the solution quality. |
|
inline |
TODO.
lse | TODO |
TODO: description TODO: Problem formulation: !!
TODO.
A | TODO |
b | TODO |
x | TODO |
std::invalid_argument | System matrix is not square. |
std::invalid_argument | System matrix is not symmetric. |
std::invalid_argument | Invalid right-hand side vector size. |
TODO: description TODO: Problem formulation: !!
|
protectedinherited |
The maximum number of iterations.
This is the maximum number of iterations the solver will spend for solving the given problem.