A fortran collection of functions for minimization problems
Note
MINPACK is a FORTRAN90 library which solves systems of nonlinear equations, or carries out the least squares minimization of the residual of a set of linear or nonlinear equations, by Jorge More, Danny Sorenson, Burton Garbow, Kenneth Hillstrom.
ENORM computes the Euclidean norm of a vector.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=4) | :: | n | ||||
real(kind=8) | :: | x(n) |
ENORM2 computes the Euclidean norm of a vector.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=4) | :: | n | ||||
real(kind=8) | :: | x(n) |
R8_UNIFORM_01 returns a unit pseudorandom R8.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=4) | :: | seed |
CHKDER checks the gradients of M functions of N variables.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=4) | :: | m | ||||
integer(kind=4) | :: | n | ||||
real(kind=8) | :: | x(n) | ||||
real(kind=8) | :: | fvec(m) | ||||
real(kind=8) | :: | fjac(ldfjac,n) | ||||
integer(kind=4) | :: | ldfjac | ||||
real(kind=8) | :: | xp(n) | ||||
real(kind=8) | :: | fvecp(m) | ||||
integer(kind=4) | :: | mode | ||||
real(kind=8) | :: | err(m) |
DOGLEG finds the minimizing combination of Gauss-Newton and gradient steps.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=4) | :: | n | ||||
real(kind=8) | :: | r(lr) | ||||
integer(kind=4) | :: | lr | ||||
real(kind=8) | :: | diag(n) | ||||
real(kind=8) | :: | qtb(n) | ||||
real(kind=8) | :: | delta | ||||
real(kind=8) | :: | x(n) |
FDJAC1 estimates an N by N jacobian matrix using forward differences.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real | :: | fcn | ||||
integer(kind=4) | :: | n | ||||
real(kind=8) | :: | x(n) | ||||
real(kind=8) | :: | fvec(n) | ||||
real(kind=8) | :: | fjac(ldfjac,n) | ||||
integer(kind=4) | :: | ldfjac | ||||
integer(kind=4) | :: | iflag | ||||
integer(kind=4) | :: | ml | ||||
integer(kind=4) | :: | mu | ||||
real(kind=8) | :: | epsfcn |
FDJAC2 estimates an M by N jacobian matrix using forward differences.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real | :: | fcn | ||||
integer(kind=4) | :: | m | ||||
integer(kind=4) | :: | n | ||||
real(kind=8) | :: | x(n) | ||||
real(kind=8) | :: | fvec(m) | ||||
real(kind=8) | :: | fjac(ldfjac,n) | ||||
integer(kind=4) | :: | ldfjac | ||||
integer(kind=4) | :: | iflag | ||||
real(kind=8) | :: | epsfcn |
HYBRD seeks a zero of N nonlinear equations in N variables.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real | :: | fcn | ||||
integer(kind=4) | :: | n | ||||
real(kind=8) | :: | x(n) | ||||
real(kind=8) | :: | fvec(n) | ||||
real(kind=8) | :: | xtol | ||||
integer(kind=4) | :: | maxfev | ||||
integer(kind=4) | :: | ml | ||||
integer(kind=4) | :: | mu | ||||
real(kind=8) | :: | epsfcn | ||||
real(kind=8) | :: | diag(n) | ||||
integer(kind=4) | :: | mode | ||||
real(kind=8) | :: | factor | ||||
integer(kind=4) | :: | nprint | ||||
integer(kind=4) | :: | info | ||||
integer(kind=4) | :: | nfev | ||||
real(kind=8) | :: | fjac(ldfjac,n) | ||||
integer(kind=4) | :: | ldfjac | ||||
real(kind=8) | :: | r(lr) | ||||
integer(kind=4) | :: | lr | ||||
real(kind=8) | :: | qtf(n) |
HYBRD1 seeks a zero of N nonlinear equations in N variables.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real | :: | fcn | ||||
integer(kind=4) | :: | n | ||||
real(kind=8) | :: | x(n) | ||||
real(kind=8) | :: | fvec(n) | ||||
real(kind=8) | :: | tol | ||||
integer(kind=4) | :: | info |
HYBRJ seeks a zero of N nonlinear equations in N variables.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real | :: | fcn | ||||
integer(kind=4) | :: | n | ||||
real(kind=8) | :: | x(n) | ||||
real(kind=8) | :: | fvec(n) | ||||
real(kind=8) | :: | fjac(ldfjac,n) | ||||
integer(kind=4) | :: | ldfjac | ||||
real(kind=8) | :: | xtol | ||||
integer(kind=4) | :: | maxfev | ||||
real(kind=8) | :: | diag(n) | ||||
integer(kind=4) | :: | mode | ||||
real(kind=8) | :: | factor | ||||
integer(kind=4) | :: | nprint | ||||
integer(kind=4) | :: | info | ||||
integer(kind=4) | :: | nfev | ||||
integer(kind=4) | :: | njev | ||||
real(kind=8) | :: | r(lr) | ||||
integer(kind=4) | :: | lr | ||||
real(kind=8) | :: | qtf(n) |
HYBRJ1 seeks a zero of N equations in N variables by Powell’s method.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real | :: | fcn | ||||
integer(kind=4) | :: | n | ||||
real(kind=8) | :: | x(n) | ||||
real(kind=8) | :: | fvec(n) | ||||
real(kind=8) | :: | fjac(ldfjac,n) | ||||
integer(kind=4) | :: | ldfjac | ||||
real(kind=8) | :: | tol | ||||
integer(kind=4) | :: | info |
LMDER minimizes M functions in N variables by the Levenberg-Marquardt method.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real | :: | fcn | ||||
integer(kind=4) | :: | m | ||||
integer(kind=4) | :: | n | ||||
real(kind=8) | :: | x(n) | ||||
real(kind=8) | :: | fvec(m) | ||||
real(kind=8) | :: | fjac(ldfjac,n) | ||||
integer(kind=4) | :: | ldfjac | ||||
real(kind=8) | :: | ftol | ||||
real(kind=8) | :: | xtol | ||||
real(kind=8) | :: | gtol | ||||
integer(kind=4) | :: | maxfev | ||||
real(kind=8) | :: | diag(n) | ||||
integer(kind=4) | :: | mode | ||||
real(kind=8) | :: | factor | ||||
integer(kind=4) | :: | nprint | ||||
integer(kind=4) | :: | info | ||||
integer(kind=4) | :: | nfev | ||||
integer(kind=4) | :: | njev | ||||
integer(kind=4) | :: | ipvt(n) | ||||
real(kind=8) | :: | qtf(n) |
LMDER1 minimizes M functions in N variables by Levenberg-Marquardt method.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real | :: | fcn | ||||
integer(kind=4) | :: | m | ||||
integer(kind=4) | :: | n | ||||
real(kind=8) | :: | x(n) | ||||
real(kind=8) | :: | fvec(m) | ||||
real(kind=8) | :: | fjac(ldfjac,n) | ||||
integer(kind=4) | :: | ldfjac | ||||
real(kind=8) | :: | tol | ||||
integer(kind=4) | :: | info |
LMDIF minimizes M functions in N variables by the Levenberg-Marquardt method.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real | :: | fcn | ||||
integer(kind=4) | :: | m | ||||
integer(kind=4) | :: | n | ||||
real(kind=8) | :: | x(n) | ||||
real(kind=8) | :: | fvec(m) | ||||
real(kind=8) | :: | ftol | ||||
real(kind=8) | :: | xtol | ||||
real(kind=8) | :: | gtol | ||||
integer(kind=4) | :: | maxfev | ||||
real(kind=8) | :: | epsfcn | ||||
real(kind=8) | :: | diag(n) | ||||
integer(kind=4) | :: | mode | ||||
real(kind=8) | :: | factor | ||||
integer(kind=4) | :: | nprint | ||||
integer(kind=4) | :: | info | ||||
integer(kind=4) | :: | nfev | ||||
real(kind=8) | :: | fjac(ldfjac,n) | ||||
integer(kind=4) | :: | ldfjac | ||||
integer(kind=4) | :: | ipvt(n) | ||||
real(kind=8) | :: | qtf(n) |
LMDIF1 minimizes M functions in N variables using Levenberg-Marquardt method.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real | :: | fcn | ||||
integer(kind=4) | :: | m | ||||
integer(kind=4) | :: | n | ||||
real(kind=8) | :: | x(n) | ||||
real(kind=8) | :: | fvec(m) | ||||
real(kind=8) | :: | tol | ||||
integer(kind=4) | :: | info |
LMPAR computes a parameter for the Levenberg-Marquardt method.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=4) | :: | n | ||||
real(kind=8) | :: | r(ldr,n) | ||||
integer(kind=4) | :: | ldr | ||||
integer(kind=4) | :: | ipvt(n) | ||||
real(kind=8) | :: | diag(n) | ||||
real(kind=8) | :: | qtb(n) | ||||
real(kind=8) | :: | delta | ||||
real(kind=8) | :: | par | ||||
real(kind=8) | :: | x(n) | ||||
real(kind=8) | :: | sdiag(n) |
LMSTR minimizes M functions in N variables using Levenberg-Marquardt method.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real | :: | fcn | ||||
integer(kind=4) | :: | m | ||||
integer(kind=4) | :: | n | ||||
real(kind=8) | :: | x(n) | ||||
real(kind=8) | :: | fvec(m) | ||||
real(kind=8) | :: | fjac(ldfjac,n) | ||||
integer(kind=4) | :: | ldfjac | ||||
real(kind=8) | :: | ftol | ||||
real(kind=8) | :: | xtol | ||||
real(kind=8) | :: | gtol | ||||
integer(kind=4) | :: | maxfev | ||||
real(kind=8) | :: | diag(n) | ||||
integer(kind=4) | :: | mode | ||||
real(kind=8) | :: | factor | ||||
integer(kind=4) | :: | nprint | ||||
integer(kind=4) | :: | info | ||||
integer(kind=4) | :: | nfev | ||||
integer(kind=4) | :: | njev | ||||
integer(kind=4) | :: | ipvt(n) | ||||
real(kind=8) | :: | qtf(n) |
LMSTR1 minimizes M functions in N variables using Levenberg-Marquardt method.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real | :: | fcn | ||||
integer(kind=4) | :: | m | ||||
integer(kind=4) | :: | n | ||||
real(kind=8) | :: | x(n) | ||||
real(kind=8) | :: | fvec(m) | ||||
real(kind=8) | :: | fjac(ldfjac,n) | ||||
integer(kind=4) | :: | ldfjac | ||||
real(kind=8) | :: | tol | ||||
integer(kind=4) | :: | info |
QFORM produces the explicit QR factorization of a matrix.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=4) | :: | m | ||||
integer(kind=4) | :: | n | ||||
real(kind=8) | :: | q(ldq,m) | ||||
integer(kind=4) | :: | ldq |
QRFAC computes a QR factorization using Householder transformations.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=4) | :: | m | ||||
integer(kind=4) | :: | n | ||||
real(kind=8) | :: | a(lda,n) | ||||
integer(kind=4) | :: | lda | ||||
logical | :: | pivot | ||||
integer(kind=4) | :: | ipvt(lipvt) | ||||
integer(kind=4) | :: | lipvt | ||||
real(kind=8) | :: | rdiag(n) | ||||
real(kind=8) | :: | acnorm(n) |
QRSOLV solves a rectangular linear system A*x=b in the least squares sense.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=4) | :: | n | ||||
real(kind=8) | :: | r(ldr,n) | ||||
integer(kind=4) | :: | ldr | ||||
integer(kind=4) | :: | ipvt(n) | ||||
real(kind=8) | :: | diag(n) | ||||
real(kind=8) | :: | qtb(n) | ||||
real(kind=8) | :: | x(n) | ||||
real(kind=8) | :: | sdiag(n) |
R1MPYQ computes A*Q, where Q is the product of Householder transformations.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=4) | :: | m | ||||
integer(kind=4) | :: | n | ||||
real(kind=8) | :: | a(lda,n) | ||||
integer(kind=4) | :: | lda | ||||
real(kind=8) | :: | v(n) | ||||
real(kind=8) | :: | w(n) |
R1UPDT re-triangularizes a matrix after a rank one update.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=4) | :: | m | ||||
integer(kind=4) | :: | n | ||||
real(kind=8) | :: | s(ls) | ||||
integer(kind=4) | :: | ls | ||||
real(kind=8) | :: | u(m) | ||||
real(kind=8) | :: | v(n) | ||||
real(kind=8) | :: | w(m) | ||||
logical | :: | sing |
R8MAT_PRINT prints an R8MAT.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=4) | :: | m | ||||
integer(kind=4) | :: | n | ||||
real(kind=8) | :: | a(m,n) | ||||
character(len=*) | :: | title |
R8MAT_PRINT_SOME prints some of an R8MAT.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=4) | :: | m | ||||
integer(kind=4) | :: | n | ||||
real(kind=8) | :: | a(m,n) | ||||
integer(kind=4) | :: | ilo | ||||
integer(kind=4) | :: | jlo | ||||
integer(kind=4) | :: | ihi | ||||
integer(kind=4) | :: | jhi | ||||
character(len=*) | :: | title |
R8VEC_PRINT prints an R8VEC.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=4) | :: | n | ||||
real(kind=8) | :: | a(n) | ||||
character(len=*) | :: | title |
RWUPDT computes the decomposition of triangular matrix augmented by one row.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=4) | :: | n | ||||
real(kind=8) | :: | r(ldr,n) | ||||
integer(kind=4) | :: | ldr | ||||
real(kind=8) | :: | w(n) | ||||
real(kind=8) | :: | b(n) | ||||
real(kind=8) | :: | alpha | ||||
real(kind=8) | :: | c(n) | ||||
real(kind=8) | :: | s(n) |
TIMESTAMP prints the current YMDHMS date as a time stamp.