LocalLinSolver

class trainsum.locallinsolver.LocalLinSolver(*args, **kwargs)

Protocol for a local linear solver.

__call__(mat, rhs, guess=None, /)

Solve a linear problem for a linear map with a right-hand side and an optional initial guess.

Parameters:
  • mat (Callable[[S], S])

  • rhs (S)

  • guess (S | None)

Return type:

T