Defined in File ConjugateGradient.hpp
public NetworKit::LinearSolver< Matrix >
(Template Class LinearSolver)
Implementation of Conjugate Gradient.
Public Functions
Sets the solver up for the specified matrix.
matrix –
Sets the solver up for the specified matrix where the underlying graph has to be connected.
matrix –
Solves the linear system \(Ax = b\) using the conjugate gradient method with a given preconditioner and with initial value \((0, \dots, 0)^T\). We the return the solution \(x\). The solution \(x\) fulfils \(\frac{\Vert Ax - b\Vert}{\Vert b \Vert} \leq relative\_residual\) if the algorithm has converged.
Obviously, A needs to have the same number of rows as b and status.residual must be nonnegative. You may also request that the algorithm does not run for more than status.max_iters iterations.
Solves the linear systems in parallel.
rhs –
results –
maxConvergenceTime –
maxIterations –
Abstract parallel solve function that computes and processes results using resultProcessor for the matrix currently setup and the right-hand sides (size of rhsSize) provided by rhsLoader. The maximum spent time for each system can be specified by maxConvergenceTime and the maximum number of iterations can be set by maxIterations.
Note
If the solver does not support parallelism during solves, this function falls back to solving the systems sequentially.
rhsLoader –
resultProcessor –
rhsSize –
maxConvergenceTime –
maxIterations –