All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----optimization.Uncmin_f77
This class contains Java translations of the UNCMIN unconstrained optimization routines. See R.B. Schnabel, J.E. Koontz, and B.E. Weiss, A Modular System of Algorithms for Unconstrained Minimization, Report CU-CS-240-82, Comp. Sci. Dept., University of Colorado at Boulder, 1982.
IMPORTANT: The "_f77" suffixes indicate that these routines use FORTRAN style indexing. For example, you will see
for (i = 1; i <= n; i++)rather than
for (i = 0; i < n; i++)To use the "_f77" routines you will have to declare your vectors and matrices to be one element larger (e.g., v[101] rather than v[100], and a[101][101] rather than a[100][100]), and you will have to fill elements 1 through n rather than elements 0 through n - 1. Versions of these programs that use C/Java style indexing will eventually be available. They will end with the suffix "_j".
This class was translated by a statistician from a FORTRAN version of UNCMIN. It is NOT an official translation. It wastes memory by failing to use the first elements of vectors. When public domain Java optimization routines become available from the people who produced UNCMIN, then THE CODE PRODUCED BY THE NUMERICAL ANALYSTS SHOULD BE USED.
Meanwhile, if you have suggestions for improving this code, please contact Steve Verrill at sverrill@fs.fed.us.
The bakslv_f77 method solves Ax = b where A is an upper triangular matrix.
The chlhsn_f77 method finds "THE L(L-TRANSPOSE) [WRITTEN LL+] DECOMPOSITION OF THE PERTURBED MODEL HESSIAN MATRIX A+MU*I(WHERE MU\0 AND I IS THE IDENTITY MATRIX) WHICH IS SAFELY POSITIVE DEFINITE.
The choldc_f77 method finds "THE PERTURBED L(L-TRANSPOSE) [WRITTEN LL+] DECOMPOSITION OF A+D, WHERE D IS A NON-NEGATIVE DIAGONAL MATRIX ADDED TO A IF NECESSARY TO ALLOW THE CHOLESKY DECOMPOSITION TO CONTINUE." Translated by Steve Verrill, April 15, 1998.
The dfault_f77 method sets default values for each input variable to the minimization algorithm.
The dogdrv_f77 method finds the next Newton iterate (xpls) by the double dogleg method.
The dogstp_f77 method finds the new step by the double dogleg appproach.
The forslv_f77 method solves Ax = b where A is a lower triangular matrix.
The fstocd_f77 method finds a central difference approximation to the gradient of the function to be minimized.
This version of the fstofd_f77 method finds first order finite difference approximations for gradients.
This version of the fstofd_f77 method finds a finite difference approximation to the Hessian.
The grdchk_f77 method checks the analytic gradient supplied by the user.
The heschk_f77 method checks the analytic Hessian supplied by the user.
The hookdr_f77 method finds a next Newton iterate (xpls) by the More-Hebdon technique.
The hookst_f77 method finds a new step by the More-Hebdon algorithm.
The hsnint_f77 method provides the initial Hessian when secant updates are being used.
The lltslv_f77 method solves Ax = b where A has the form L(L transpose) but only the lower triangular part, L, is stored.
The lnsrch_f77 method finds a next Newton iterate by line search.
The mvmltl_f77 method computes y = Lx where L is a lower triangular matrix stored in A.
The mvmlts_f77 method computes y = Ax where A is a symmetric matrix stored in its lower triangular part.
The mvmltu_f77 method computes Y = (L transpose)X where L is a lower triangular matrix stored in A (L transpose is taken implicitly).
The optchk_f77 method checks the input for reasonableness.
The optdrv_f77 method is the driver for the nonlinear optimization problem.
The optif0_f77 method minimizes a smooth nonlinear function of n variables.
The optif9_f77 method minimizes a smooth nonlinear function of n variables.
The optstp_f77 method determines whether the algorithm should terminate due to any of the following: 1) problem solved within user tolerance 2) convergence within user tolerance 3) iteration limit reached 4) divergence or too restrictive maximum step (stepmx) suspected Translated by Steve Verrill, May 12, 1998.
The qraux1_f77 method interchanges rows i,i+1 of the upper Hessenberg matrix r, columns i to n.
The qraux2_f77 method pre-multiplies r by the Jacobi rotation j(i,i+1,a,b).
The qrupdt_f77 method finds an orthogonal n by n matrix, Q*, and an upper triangular n by n matrix, R*, such that (Q*)(R*) = R+U(V+).
The result_f77 method prints information.
The sclmul_f77 method multiplies a vector by a scalar.
The secfac_f77 method updates the Hessian by the BFGS factored technique.
The secunf_f77 method updates the Hessian by the BFGS unfactored approach.
The sndofd_f77 method finds second order forward finite difference approximations to the Hessian.
The tregup_f77 method decides whether to accept xpls = x + sc as the next iterate and update the trust region dlt.
public Uncmin_f77()
public static void optif0_f77(int n,
double x[],
Uncmin_methods minclass,
double xpls[],
double fpls[],
double gpls[],
int itrmcd[],
double a[][],
double udiag[])
The optif0_f77 method minimizes a smooth nonlinear function of n variables. A method that computes the function value at any point must be supplied. (See Uncmin_methods.java and UncminTest.java.) Derivative values are not required. The optif0_f77 method provides the simplest user access to the UNCMIN minimization routines. Without a recompile, the user has no control over options. For details, see the Schnabel et al reference and the comments in the code. Translated by Steve Verrill, August 4, 1998.
public static void optif9_f77(int n,
double x[],
Uncmin_methods minclass,
double typsiz[],
double fscale[],
int method[],
int iexp[],
int msg[],
int ndigit[],
int itnlim[],
int iagflg[],
int iahflg[],
double dlt[],
double gradtl[],
double stepmx[],
double steptl[],
double xpls[],
double fpls[],
double gpls[],
int itrmcd[],
double a[][],
double udiag[])
The optif9_f77 method minimizes a smooth nonlinear function of n variables. A method that computes the function value at any point must be supplied. (See Uncmin_methods.java and UncminTest.java.) Derivative values are not required. The optif9 method provides complete user access to the UNCMIN minimization routines. The user has full control over options. For details, see the Schnabel et al reference and the comments in the code. Translated by Steve Verrill, August 4, 1998.
public static void bakslv_f77(int n,
double a[][],
double x[],
double b[])
The bakslv_f77 method solves Ax = b where A is an upper triangular matrix. Note that A is input as a lower triangular matrix and this method takes its transpose implicitly. Translated by Steve Verrill, April 14, 1998.
public static void chlhsn_f77(int n,
double a[][],
double epsm,
double sx[],
double udiag[])
The chlhsn_f77 method finds "THE L(L-TRANSPOSE) [WRITTEN LL+] DECOMPOSITION OF THE PERTURBED MODEL HESSIAN MATRIX A+MU*I(WHERE MU\0 AND I IS THE IDENTITY MATRIX) WHICH IS SAFELY POSITIVE DEFINITE. IF A IS SAFELY POSITIVE DEFINITE UPON ENTRY, THEN MU=0." Translated by Steve Verrill, April 14, 1998.
public static void choldc_f77(int n,
double a[][],
double diagmx,
double tol,
double addmax[])
The choldc_f77 method finds "THE PERTURBED L(L-TRANSPOSE) [WRITTEN LL+] DECOMPOSITION OF A+D, WHERE D IS A NON-NEGATIVE DIAGONAL MATRIX ADDED TO A IF NECESSARY TO ALLOW THE CHOLESKY DECOMPOSITION TO CONTINUE." Translated by Steve Verrill, April 15, 1998.
public static void dfault_f77(int n,
double x[],
double typsiz[],
double fscale[],
int method[],
int iexp[],
int msg[],
int ndigit[],
int itnlim[],
int iagflg[],
int iahflg[],
double dlt[],
double gradtl[],
double stepmx[],
double steptl[])
The dfault_f77 method sets default values for each input variable to the minimization algorithm. Translated by Steve Verrill, August 4, 1998.
public static void dogdrv_f77(int n,
double x[],
double f[],
double g[],
double a[][],
double p[],
double xpls[],
double fpls[],
Uncmin_methods minclass,
double sx[],
double stepmx[],
double steptl[],
double dlt[],
int iretcd[],
boolean mxtake[],
double sc[],
double wrk1[],
double wrk2[],
double wrk3[])
The dogdrv_f77 method finds the next Newton iterate (xpls) by the double dogleg method. It drives dogstp_f77. Translated by Steve Verrill, April 15, 1998.
public static void dogstp_f77(int n,
double g[],
double a[][],
double p[],
double sx[],
double rnwtln,
double dlt[],
boolean nwtake[],
boolean fstdog[],
double ssd[],
double v[],
double cln[],
double eta[],
double sc[],
double stepmx[])
The dogstp_f77 method finds the new step by the double dogleg appproach. Translated by Steve Verrill, April 21, 1998.
public static void forslv_f77(int n,
double a[][],
double x[],
double b[])
The forslv_f77 method solves Ax = b where A is a lower triangular matrix. Translated by Steve Verrill, April 21, 1998.
public static void fstocd_f77(int n,
double x[],
Uncmin_methods minclass,
double sx[],
double rnoise,
double g[])
The fstocd_f77 method finds a central difference approximation to the gradient of the function to be minimized. Translated by Steve Verrill, April 21, 1998.
public static void fstofd_f77(int n,
double xpls[],
Uncmin_methods minclass,
double fpls[],
double a[][],
double sx[],
double rnoise,
double fhat[])
This version of the fstofd_f77 method finds a finite difference approximation to the Hessian. Translated by Steve Verrill, April 22, 1998.
public static void fstofd_f77(int n,
double xpls[],
Uncmin_methods minclass,
double fpls[],
double g[],
double sx[],
double rnoise)
This version of the fstofd_f77 method finds first order finite difference approximations for gradients. Translated by Steve Verrill, April 22, 1998.
public static void grdchk_f77(int n,
double x[],
Uncmin_methods minclass,
double f[],
double g[],
double typsiz[],
double sx[],
double fscale[],
double rnf,
double analtl,
double gest[])
The grdchk_f77 method checks the analytic gradient supplied by the user. Translated by Steve Verrill, April 22, 1998.
public static void heschk_f77(int n,
double x[],
Uncmin_methods minclass,
double f[],
double g[],
double a[][],
double typsiz[],
double sx[],
double rnf,
double analtl,
int iagflg[],
double udiag[],
double wrk1[],
double wrk2[])
The heschk_f77 method checks the analytic Hessian supplied by the user. Translated by Steve Verrill, April 23, 1998.
public static void hookdr_f77(int n,
double x[],
double f[],
double g[],
double a[][],
double udiag[],
double p[],
double xpls[],
double fpls[],
Uncmin_methods minclass,
double sx[],
double stepmx[],
double steptl[],
double dlt[],
int iretcd[],
boolean mxtake[],
double amu[],
double dltp[],
double phi[],
double phip0[],
double sc[],
double xplsp[],
double wrk0[],
double epsm,
int itncnt[])
The hookdr_f77 method finds a next Newton iterate (xpls) by the More-Hebdon technique. It drives hookst_f77. Translated by Steve Verrill, April 23, 1998.
public static void hookst_f77(int n,
double g[],
double a[][],
double udiag[],
double p[],
double sx[],
double rnwtln,
double dlt[],
double amu[],
double dltp[],
double phi[],
double phip0[],
boolean fstime[],
double sc[],
boolean nwtake[],
double wrk0[],
double epsm)
The hookst_f77 method finds a new step by the More-Hebdon algorithm. It is driven by hookdr_f77. Translated by Steve Verrill, April 24, 1998.
public static void hsnint_f77(int n,
double a[][],
double sx[],
int method[])
The hsnint_f77 method provides the initial Hessian when secant updates are being used. Translated by Steve Verrill, April 27, 1998.
public static void lltslv_f77(int n,
double a[][],
double x[],
double b[])
The lltslv_f77 method solves Ax = b where A has the form L(L transpose) but only the lower triangular part, L, is stored. Translated by Steve Verrill, April 27, 1998.
public static void lnsrch_f77(int n,
double x[],
double f[],
double g[],
double p[],
double xpls[],
double fpls[],
Uncmin_methods minclass,
boolean mxtake[],
int iretcd[],
double stepmx[],
double steptl[],
double sx[])
The lnsrch_f77 method finds a next Newton iterate by line search. Translated by Steve Verrill, May 15, 1998.
public static void mvmltl_f77(int n,
double a[][],
double x[],
double y[])
The mvmltl_f77 method computes y = Lx where L is a lower triangular matrix stored in A. Translated by Steve Verrill, April 27, 1998.
public static void mvmlts_f77(int n,
double a[][],
double x[],
double y[])
The mvmlts_f77 method computes y = Ax where A is a symmetric matrix stored in its lower triangular part. Translated by Steve Verrill, April 27, 1998.
public static void mvmltu_f77(int n,
double a[][],
double x[],
double y[])
The mvmltu_f77 method computes Y = (L transpose)X where L is a lower triangular matrix stored in A (L transpose is taken implicitly). Translated by Steve Verrill, April 27, 1998.
public static void optchk_f77(int n,
double x[],
double typsiz[],
double sx[],
double fscale[],
double gradtl[],
int itnlim[],
int ndigit[],
double epsm,
double dlt[],
int method[],
int iexp[],
int iagflg[],
int iahflg[],
double stepmx[],
int msg[])
The optchk_f77 method checks the input for reasonableness. Translated by Steve Verrill, May 12, 1998.
public static void optdrv_f77(int n,
double x[],
Uncmin_methods minclass,
double typsiz[],
double fscale[],
int method[],
int iexp[],
int msg[],
int ndigit[],
int itnlim[],
int iagflg[],
int iahflg[],
double dlt[],
double gradtl[],
double stepmx[],
double steptl[],
double xpls[],
double fpls[],
double gpls[],
int itrmcd[],
double a[][],
double udiag[],
double g[],
double p[],
double sx[],
double wrk0[],
double wrk1[],
double wrk2[],
double wrk3[])
The optdrv_f77 method is the driver for the nonlinear optimization problem. Translated by Steve Verrill, May 18, 1998.
public static void optstp_f77(int n,
double xpls[],
double fpls[],
double gpls[],
double x[],
int itncnt[],
int icscmx[],
int itrmcd[],
double gradtl[],
double steptl[],
double sx[],
double fscale[],
int itnlim[],
int iretcd[],
boolean mxtake[],
int msg[])
The optstp_f77 method determines whether the algorithm should terminate due to any of the following: 1) problem solved within user tolerance 2) convergence within user tolerance 3) iteration limit reached 4) divergence or too restrictive maximum step (stepmx) suspected Translated by Steve Verrill, May 12, 1998.
public static void qraux1_f77(int n,
double r[][],
int i)
The qraux1_f77 method interchanges rows i,i+1 of the upper Hessenberg matrix r, columns i to n. Translated by Steve Verrill, April 29, 1998.
public static void qraux2_f77(int n,
double r[][],
int i,
double a,
double b)
The qraux2_f77 method pre-multiplies r by the Jacobi rotation j(i,i+1,a,b). Translated by Steve Verrill, April 29, 1998.
public static void qrupdt_f77(int n,
double a[][],
double u[],
double v[])
The qrupdt_f77 method finds an orthogonal n by n matrix, Q*, and an upper triangular n by n matrix, R*, such that (Q*)(R*) = R+U(V+). Translated by Steve Verrill, May 11, 1998.
public static void result_f77(int n,
double x[],
double f[],
double g[],
double a[][],
double p[],
int itncnt[],
int iflg)
The result_f77 method prints information. Translated by Steve Verrill, May 11, 1998.
public static void sclmul_f77(int n,
double s,
double v[],
double z[])
The sclmul_f77 method multiplies a vector by a scalar. Translated by Steve Verrill, May 8, 1998.
public static void secfac_f77(int n,
double x[],
double g[],
double a[][],
double xpls[],
double gpls[],
double epsm,
int itncnt[],
double rnf,
int iagflg[],
boolean noupdt[],
double s[],
double y[],
double u[],
double w[])
The secfac_f77 method updates the Hessian by the BFGS factored technique. Translated by Steve Verrill, May 14, 1998.
public static void secunf_f77(int n,
double x[],
double g[],
double a[][],
double udiag[],
double xpls[],
double gpls[],
double epsm,
int itncnt[],
double rnf,
int iagflg[],
boolean noupdt[],
double s[],
double y[],
double t[])
The secunf_f77 method updates the Hessian by the BFGS unfactored approach. Translated by Steve Verrill, May 8, 1998.
public static void sndofd_f77(int n,
double xpls[],
Uncmin_methods minclass,
double fpls[],
double a[][],
double sx[],
double rnoise,
double stepsz[],
double anbr[])
The sndofd_f77 method finds second order forward finite difference approximations to the Hessian. For optimization use this method to estimate the Hessian of the optimization function if no analytical user function has been supplied for either the gradient or the Hessian, and the optimization function is inexpensive to evaluate. Translated by Steve Verrill, May 8, 1998.
public static void tregup_f77(int n,
double x[],
double f[],
double g[],
double a[][],
Uncmin_methods minclass,
double sc[],
double sx[],
boolean nwtake[],
double stepmx[],
double steptl[],
double dlt[],
int iretcd[],
double xplsp[],
double fplsp[],
double xpls[],
double fpls[],
boolean mxtake[],
int method,
double udiag[])
The tregup_f77 method decides whether to accept xpls = x + sc as the next iterate and update the trust region dlt. Translated by Steve Verrill, May 11, 1998.
All Packages Class Hierarchy This Package Previous Next Index