Documentation of 'jsat.linear.solvers.ConjugateGradient' Java class
ConjugateGradient
jsat.linear.solvers

Class ConjugateGradient



  • public class ConjugateGradient
    extends java.lang.Object
    Provides an iterative implementation of the COnjugate Gradient Method.

    The Conjugate method, if using exact arithmetic, produces the exact result after a finite number of iterations that is no more then the number of rows in the matrix. Because of this, no max iteration parameter is given.

    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static Vec solve(double eps, Matrix A, Vec x, Vec b)
      Uses the Conjugate Gradient method to solve a linear system of equations involving a symmetric positive definite matrix.

      A symmetric positive definite matrix is a matrix A such that:
      AT = A xT * A * x > 0 for all x != 0

      NOTE: No checks will be performed to confirm these properties of the given matrix.
      static Vec solve(double eps, Matrix A, Vec x, Vec b, Matrix Minv)
      Uses the Conjugate Gradient method to solve a linear system of equations involving a symmetric positive definite matrix.

      A symmetric positive definite matrix is a matrix A such that:
      AT = A xT * A * x > 0 for all x != 0

      NOTE: No checks will be performed to confirm these properties of the given matrix.
      static Vec solve(Matrix A, Vec b) 
      static Vec solveCGNR(double eps, Matrix A, Vec x, Vec b)
      Uses the Conjugate Gradient method to compute the least squares solution to a system of linear equations.
      Computes the least squares solution to A x = b.
      static Vec solveCGNR(Matrix A, Vec b) 
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ConjugateGradient

        public ConjugateGradient()
    • Method Detail

      • solve

        public static Vec solve(double eps,
                                Matrix A,
                                Vec x,
                                Vec b)
        Uses the Conjugate Gradient method to solve a linear system of equations involving a symmetric positive definite matrix.

        A symmetric positive definite matrix is a matrix A such that:
        • AT = A
        • xT * A * x > 0 for all x != 0


        NOTE: No checks will be performed to confirm these properties of the given matrix. If a matrix is given that does not meet this requirements, invalid results may be returned.
        Parameters:
        eps - the precision of the desired result.
        A - the symmetric positive definite matrix
        x - an initial guess for x, can be all zeros. This vector will be altered
        b - the target values
        Returns:
        the approximate solution to the equation A x = b
      • solve

        public static Vec solve(double eps,
                                Matrix A,
                                Vec x,
                                Vec b,
                                Matrix Minv)
        Uses the Conjugate Gradient method to solve a linear system of equations involving a symmetric positive definite matrix.

        A symmetric positive definite matrix is a matrix A such that:
        • AT = A
        • xT * A * x > 0 for all x != 0


        NOTE: No checks will be performed to confirm these properties of the given matrix. If a matrix is given that does not meet this requirements, invalid results may be returned.
        Parameters:
        eps - the precision of the desired result.
        A - the symmetric positive definite matrix
        x - an initial guess for x, can be all zeros. This vector will be altered
        b - the target values
        Minv - the of a matric M, such that M is a symmetric positive definite matrix. Is applied as M-1( A x - b = 0) to increase convergence and stability. These increases are soley a property of M-1
        Returns:
        the approximate solution to the equation A x = b
      • solveCGNR

        public static Vec solveCGNR(double eps,
                                    Matrix A,
                                    Vec x,
                                    Vec b)
        Uses the Conjugate Gradient method to compute the least squares solution to a system of linear equations.
        Computes the least squares solution to A x = b. Where A is an m x n matrix and b is a vector of length m and x is a vector of length n

        NOTE: Unlike solve(double, jsat.linear.Matrix, jsat.linear.Vec, jsat.linear.Vec), the CGNR method does not need any special properties of the matrix. Because of this, slower convergence or numerical error can occur.
        Parameters:
        eps - the desired precision for the result
        A - any m x n matrix
        x - the initial guess for x, can be all zeros. This vector will be altered
        b - the target values
        Returns:
        the least squares solution to A x = b
      • solveCGNR

        public static Vec solveCGNR(Matrix A,
                                    Vec b)

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.