ConjugateGradientPolicy

class probnum.linalg.solvers.policies.ConjugateGradientPolicy(reorthogonalization_fn_residual=None, reorthogonalization_fn_action=None)

Bases: LinearSolverPolicy

Policy returning \(A\)-conjugate actions.

Selects the negative gradient / residual as an initial action \(s_0 = b - A x_0\) and then successively generates \(A\)-conjugate actions, i.e. the actions satisfy \(s_i^\top A s_j = 0\) iff \(i \neq j\).

Parameters:
  • reorthogonalization_fn_residual (Callable[[ndarray, Iterable[ndarray], LinearOperator], ndarray] | None) – Reorthogonalization function, which takes a vector, an orthogonal basis and optionally an inner product and returns a reorthogonalized vector. If not None the residuals are reorthogonalized before the action is computed.

  • reorthogonalization_fn_action (Callable[[ndarray, Iterable[ndarray], LinearOperator], ndarray] | None) – Reorthogonalization function, which takes a vector, an orthogonal basis and optionally an inner product and returns a reorthogonalized vector. If not None the computed action is reorthogonalized.

Methods Summary

__call__(solver_state[, rng])

Return an action for a given solver state.

Methods Documentation

__call__(solver_state, rng=None)[source]

Return an action for a given solver state.

Parameters:
Returns:

Next action to take.

Return type:

action