Package jline.api.mc

Class Ctmc_bicgstab

java.lang.Object
jline.api.mc.Ctmc_bicgstab

public final class Ctmc_bicgstab extends Object
  • Field Details

    • BICGSTAB_DEFAULT_TOL

      public static final double BICGSTAB_DEFAULT_TOL
      Default linear-solve residual, as in Ctmc_gmres. Much tighter than the fixed-point tolerance options.iter_tol: switching solve method must not move a reported metric.
      See Also:
    • BICGSTAB_DEFAULT_MAXIT

      public static final int BICGSTAB_DEFAULT_MAXIT
      Default cap on complete iterations. BiCGSTAB storage is O(n) regardless of the count, so the cap bounds time rather than memory.
      See Also:
  • Method Details

    • ctmc_bicgstab

      public static Ctmc_bicgstab.BicgstabResult ctmc_bicgstab(Matrix A, Matrix b)
      Solve A*x = b by preconditioned BiCGSTAB with the default tolerance and iteration cap, starting from a uniform initial guess.
      Parameters:
      A - Coefficient matrix
      b - Right-hand side, as a column vector
      Returns:
      Solution, convergence flag, relative residual and matrix-vector product count
    • ctmc_bicgstab

      public static Ctmc_bicgstab.BicgstabResult ctmc_bicgstab(Matrix A, Matrix b, double tol, int maxit, Matrix x0)
      Solve A*x = b by preconditioned BiCGSTAB.
      Parameters:
      A - Coefficient matrix
      b - Right-hand side, as a column vector
      tol - Relative residual tolerance, nonpositive for the default 1e-12
      maxit - Maximum number of complete iterations, nonpositive for min(n,200)
      x0 - Initial guess, null for the uniform vector 1/n
      Returns:
      Solution, convergence flag, relative residual and matvec count
    • ctmc_bicgstab

      public static Matrix ctmc_bicgstab(Matrix A, Matrix B, double tol, int maxit)
      Solve A*X = B for every column of B, reusing one incomplete factorization across all of them and starting each column from the previous solution. This is the shape of the stochastic complement, whose right-hand side is a whole block of the generator: refactorizing per column would cost more than the direct solve it replaces.
      Parameters:
      A - Coefficient matrix
      B - Right-hand sides, one per column
      tol - Relative residual tolerance, nonpositive for the default 1e-12
      maxit - Maximum number of complete iterations, nonpositive for min(n,200)
      Returns:
      The solution block, or null if any column failed to converge. Returning null rather than a partial block keeps the caller's fallback all-or-nothing.