Class GenMinResEx4

java.lang.Object
com.imsl.test.example.math.GenMinResEx4
All Implemented Interfaces:
GenMinRes.Function, GenMinRes.Preconditioner

public class GenMinResEx4 extends Object implements GenMinRes.Preconditioner

Solves a small linear system stored in sparse form with preconditioning.

A solution to a small linear system in which the coefficient matrix has been stored in SparseMatrix form is found. An initial guess of ones is set before solving the system and preconditioning is used.
See Also:
  • Constructor Details

    • GenMinResEx4

      public GenMinResEx4()
  • Method Details

    • amultp

      public void amultp(double[] p, double[] z)
      Obtains the multiplication of the matrix a and the input p. The result is returned in z.
      Specified by:
      amultp in interface GenMinRes.Function
      Parameters:
      p - a double array with p.length=a[0].length
      z - a double array
    • preconditioner

      public void preconditioner(double[] r, double[] z)
      Defines a preconditioning operation for the problem.
      Specified by:
      preconditioner in interface GenMinRes.Preconditioner
      Parameters:
      r -
      z -
    • main

      public static void main(String[] args) throws Exception
      Throws:
      Exception