octave: Specialized Solvers

 
 18.5 Specialized Solvers
 ========================
 
  -- : X = bicg (A, B, RTOL, MAXIT, M1, M2, X0)
  -- : X = bicg (A, B, RTOL, MAXIT, P)
  -- : [X, FLAG, RELRES, ITER, RESVEC] = bicg (A, B, ...)
      Solve ‘A x = b’ using the Bi-conjugate gradient iterative method.
 
         − RTOL is the relative tolerance, if not given or set to [] the
           default value 1e-6 is used.
 
         − MAXIT the maximum number of outer iterations, if not given or
           set to [] the default value ‘min (20, numel (b))’ is used.
 
         − X0 the initial guess, if not given or set to [] the default
           value ‘zeros (size (b))’ is used.
 
      A can be passed as a matrix or as a function handle or inline
      function ‘f’ such that ‘f(x, "notransp") = A*x’ and ‘f(x, "transp")
      = A'*x’.
 
      The preconditioner P is given as ‘P = M1 * M2’.  Both M1 and M2 can
      be passed as a matrix or as a function handle or inline function
      ‘g’ such that ‘g(x, "notransp") = M1 \ x’ or ‘g(x, "notransp") = M2
      \ x’ and ‘g(x, "transp") = M1' \ x’ or ‘g(x, "transp") = M2' \ x’.
 
      If called with more than one output parameter
 
         − FLAG indicates the exit status:
 
              − 0: iteration converged to the within the chosen tolerance
 
              − 1: the maximum number of iterations was reached before
                convergence
 
              − 3: the algorithm reached stagnation
 
           (the value 2 is unused but skipped for compatibility).
 
         − RELRES is the final value of the relative residual.
 
         − ITER is the number of iterations performed.
 
         − RESVEC is a vector containing the relative residual at each
           iteration.
 
DONTPRINTYET       See also: Seebicgstab XREFbicgstab, Seecgs XREFcgs, *noteDONTPRINTYET       See also: Seebicgstab XREFbicgstab, Seecgs XREFcgs, See
      gmres XREFgmres, Seepcg XREFpcg, Seeqmr XREFqmr.
 
  -- : X = bicgstab (A, B, RTOL, MAXIT, M1, M2, X0)
  -- : X = bicgstab (A, B, RTOL, MAXIT, P)
  -- : [X, FLAG, RELRES, ITER, RESVEC] = bicgstab (A, B, ...)
      Solve ‘A x = b’ using the stabilizied Bi-conjugate gradient
      iterative method.
 
         − RTOL is the relative tolerance, if not given or set to [] the
           default value 1e-6 is used.
 
         − MAXIT the maximum number of outer iterations, if not given or
           set to [] the default value ‘min (20, numel (b))’ is used.
 
         − X0 the initial guess, if not given or set to [] the default
           value ‘zeros (size (b))’ is used.
 
      A can be passed as a matrix or as a function handle or inline
      function ‘f’ such that ‘f(x) = A*x’.
 
      The preconditioner P is given as ‘P = M1 * M2’.  Both M1 and M2 can
      be passed as a matrix or as a function handle or inline function
      ‘g’ such that ‘g(x) = M1 \ x’ or ‘g(x) = M2 \ x’.
 
      If called with more than one output parameter
 
         − FLAG indicates the exit status:
 
              − 0: iteration converged to the within the chosen tolerance
 
              − 1: the maximum number of iterations was reached before
                convergence
 
              − 3: the algorithm reached stagnation
 
           (the value 2 is unused but skipped for compatibility).
 
         − RELRES is the final value of the relative residual.
 
         − ITER is the number of iterations performed.
 
         − RESVEC is a vector containing the relative residual at each
           iteration.
 
DONTPRINTYET       See also: Seebicg XREFbicg, Seecgs XREFcgs, *notegmres:
DONTPRINTYET       See also: Seebicg XREFbicg, Seecgs XREFcgs, Seegmres

      XREFgmres, Seepcg XREFpcg, Seeqmr XREFqmr.
 
  -- : X = cgs (A, B, RTOL, MAXIT, M1, M2, X0)
  -- : X = cgs (A, B, RTOL, MAXIT, P)
  -- : [X, FLAG, RELRES, ITER, RESVEC] = cgs (A, B, ...)
      Solve ‘A x = b’, where A is a square matrix, using the Conjugate
      Gradients Squared method.
 
         − RTOL is the relative tolerance, if not given or set to [] the
           default value 1e-6 is used.
 
         − MAXIT the maximum number of outer iterations, if not given or
           set to [] the default value ‘min (20, numel (b))’ is used.
 
         − X0 the initial guess, if not given or set to [] the default
           value ‘zeros (size (b))’ is used.
 
      A can be passed as a matrix or as a function handle or inline
      function ‘f’ such that ‘f(x) = A*x’.
 
      The preconditioner P is given as ‘P = M1 * M2’.  Both M1 and M2 can
      be passed as a matrix or as a function handle or inline function
      ‘g’ such that ‘g(x) = M1 \ x’ or ‘g(x) = M2 \ x’.
 
      If called with more than one output parameter
 
         − FLAG indicates the exit status:
 
              − 0: iteration converged to the within the chosen tolerance
 
              − 1: the maximum number of iterations was reached before
                convergence
 
              − 3: the algorithm reached stagnation
 
           (the value 2 is unused but skipped for compatibility).
 
         − RELRES is the final value of the relative residual.
 
         − ITER is the number of iterations performed.
 
         − RESVEC is a vector containing the relative residual at each
           iteration.
 
DONTPRINTYET       See also: Seepcg XREFpcg, Seebicgstab XREFbicgstab, *noteDONTPRINTYET       See also: Seepcg XREFpcg, Seebicgstab XREFbicgstab, See
      bicg XREFbicg, Seegmres XREFgmres, Seeqmr XREFqmr.
 
  -- : X = gmres (A, B, M, RTOL, MAXIT, M1, M2, X0)
  -- : X = gmres (A, B, M, RTOL, MAXIT, P)
  -- : [X, FLAG, RELRES, ITER, RESVEC] = gmres (...)
      Solve ‘A x = b’ using the Preconditioned GMRES iterative method
      with restart, a.k.a.  PGMRES(m).
 
         − RTOL is the relative tolerance, if not given or set to [] the
           default value 1e-6 is used.
 
         − MAXIT is the maximum number of outer iterations, if not given
           or set to [] the default value ‘min (10, numel (b) / restart)’
           is used.
 
         − X0 is the initial guess, if not given or set to [] the default
           value ‘zeros (size (b))’ is used.
 
         − M is the restart parameter, if not given or set to [] the
           default value ‘numel (b)’ is used.
 
      Argument A can be passed as a matrix, function handle, or inline
      function ‘f’ such that ‘f(x) = A*x’.
 
      The preconditioner P is given as ‘P = M1 * M2’.  Both M1 and M2 can
      be passed as a matrix, function handle, or inline function ‘g’ such
      that ‘g(x) = M1\x’ or ‘g(x) = M2\x’.
 
      Besides the vector X, additional outputs are:
 
         − FLAG indicates the exit status:
 
           0 : iteration converged to within the specified tolerance
 
           1 : maximum number of iterations exceeded
 
           2 : unused, but skipped for compatibility
 
           3 : algorithm reached stagnation (no change between iterations)
 
         − RELRES is the final value of the relative residual.
 
         − ITER is a vector containing the number of outer iterations and
           total iterations performed.
 
         − RESVEC is a vector containing the relative residual at each
           iteration.
 
DONTPRINTYET       See also: Seebicg XREFbicg, Seebicgstab XREFbicgstab, *noteDONTPRINTYET DONTPRINTYET       See also: Seebicg XREFbicg, Seebicgstab XREFbicgstab, See
      cgs XREFcgs, Seepcg XREFpcg, Seepcr XREFpcr, *noteqmr:
DONTPRINTYET DONTPRINTYET       See also: Seebicg XREFbicg, Seebicgstab XREFbicgstab, See
      cgs XREFcgs, Seepcg XREFpcg, Seepcr XREFpcr, Seeqmr

      XREFqmr.
 
  -- : X = qmr (A, B, RTOL, MAXIT, M1, M2, X0)
  -- : X = qmr (A, B, RTOL, MAXIT, P)
  -- : [X, FLAG, RELRES, ITER, RESVEC] = qmr (A, B, ...)
      Solve ‘A x = b’ using the Quasi-Minimal Residual iterative method
      (without look-ahead).
 
         − RTOL is the relative tolerance, if not given or set to [] the
           default value 1e-6 is used.
 
         − MAXIT the maximum number of outer iterations, if not given or
           set to [] the default value ‘min (20, numel (b))’ is used.
 
         − X0 the initial guess, if not given or set to [] the default
           value ‘zeros (size (b))’ is used.
 
      A can be passed as a matrix or as a function handle or inline
      function ‘f’ such that ‘f(x, "notransp") = A*x’ and ‘f(x, "transp")
      = A'*x’.
 
      The preconditioner P is given as ‘P = M1 * M2’.  Both M1 and M2 can
      be passed as a matrix or as a function handle or inline function
      ‘g’ such that ‘g(x, "notransp") = M1 \ x’ or ‘g(x, "notransp") = M2
      \ x’ and ‘g(x, "transp") = M1' \ x’ or ‘g(x, "transp") = M2' \ x’.
 
      If called with more than one output parameter
 
         − FLAG indicates the exit status:
 
              − 0: iteration converged to the within the chosen tolerance
 
              − 1: the maximum number of iterations was reached before
                convergence
 
              − 3: the algorithm reached stagnation
 
           (the value 2 is unused but skipped for compatibility).
 
         − RELRES is the final value of the relative residual.
 
         − ITER is the number of iterations performed.
 
         − RESVEC is a vector containing the residual norms at each
           iteration.
 
      References:
 
        1. R. Freund and N. Nachtigal, ‘QMR: a quasi-minimal residual
           method for non-Hermitian linear systems’, Numerische
           Mathematik, 1991, 60, pp.  315-339.
 
        2. R. Barrett, M. Berry, T. Chan, J. Demmel, J. Donato, J.
           Dongarra, V. Eijkhour, R. Pozo, C. Romine, and H. van der
           Vorst, ‘Templates for the solution of linear systems: Building
           blocks for iterative methods’, SIAM, 2nd ed., 1994.
 
DONTPRINTYET       See also: Seebicg XREFbicg, Seebicgstab XREFbicgstab, *noteDONTPRINTYET       See also: Seebicg XREFbicg, Seebicgstab XREFbicgstab, See
      cgs XREFcgs, Seegmres XREFgmres, Seepcg XREFpcg.