Class SORSweep


  • public class SORSweep
    extends Object
    This is a building block for SOR and SSOR to perform the forward or backward sweep. That is, solving the n equations in Ax = b sequentially (forward or backward), while using the updated components of x as soon as they are available.
    • Constructor Detail

      • SORSweep

        public SORSweep​(Matrix A,
                        Vector b,
                        double omega)
        Construct an instance to perform forward or backward sweep for a linear system Ax = b.
        Parameters:
        A - the coefficient matrix
        b - a vector
        omega - the extrapolation factor
    • Method Detail

      • forward

        public Vector forward​(Vector x)
        Perform a forward sweep.
        Parameters:
        x - the original iterate
        Returns:
        the next iterate
      • backward

        public Vector backward​(Vector x)
        Perform a backward sweep.
        Parameters:
        x - the original iterate
        Returns:
        the next iterate