Package jline.api.mc
Class Ctmc_bicgstab
java.lang.Object
jline.api.mc.Ctmc_bicgstab
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classOutcome of a BiCGSTAB solve. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDefault cap on complete iterations.static final doubleDefault linear-solve residual, as in Ctmc_gmres. -
Method Summary
Modifier and TypeMethodDescriptionstatic Ctmc_bicgstab.BicgstabResultctmc_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.static Matrixctmc_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.static Ctmc_bicgstab.BicgstabResultctmc_bicgstab(Matrix A, Matrix b, double tol, int maxit, Matrix x0) Solve A*x = b by preconditioned BiCGSTAB.
-
Field Details
-
BICGSTAB_DEFAULT_TOL
public static final double BICGSTAB_DEFAULT_TOLDefault 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_MAXITDefault 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
Solve A*x = b by preconditioned BiCGSTAB with the default tolerance and iteration cap, starting from a uniform initial guess.- Parameters:
A- Coefficient matrixb- 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 matrixb- Right-hand side, as a column vectortol- Relative residual tolerance, nonpositive for the default 1e-12maxit- 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
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 matrixB- Right-hand sides, one per columntol- Relative residual tolerance, nonpositive for the default 1e-12maxit- 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.
-