Package com.imsl.test.example.math
Class GenMinResEx4
java.lang.Object
com.imsl.test.example.math.GenMinResEx4
- All Implemented Interfaces:
GenMinRes.Function,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 inSparseMatrix form is found. An initial guess of ones
is set before solving the system and preconditioning is used.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidamultp(double[] p, double[] z) Obtains the multiplication of the matrixaand the inputp.static voidvoidpreconditioner(double[] r, double[] z) Defines a preconditioning operation for the problem.
-
Constructor Details
-
GenMinResEx4
public GenMinResEx4()
-
-
Method Details
-
amultp
public void amultp(double[] p, double[] z) Obtains the multiplication of the matrixaand the inputp. The result is returned inz.- Specified by:
amultpin interfaceGenMinRes.Function- Parameters:
p- adoublearray withp.length=a[0].lengthz- adoublearray
-
preconditioner
public void preconditioner(double[] r, double[] z) Defines a preconditioning operation for the problem.- Specified by:
preconditionerin interfaceGenMinRes.Preconditioner- Parameters:
r-z-
-
main
- Throws:
Exception
-