亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? lm.f90

?? 開發(fā)的lm算法,很有用的一種優(yōu)化算法. 對非線性優(yōu)化有很大用處
?? F90
?? 第 1 頁 / 共 5 頁
字號:
MODULE Levenberg_Marquardt
! MINPACK routines which are used by both LMDIF & LMDER
! 25 October 2001:
!    Changed INTENT of iflag in several places to IN OUT.
!    Changed INTENT of fvec to IN OUT in user routine FCN.
!    Removed arguments diag and qtv from LMDIF & LMDER.
!    Replaced several DO loops with array operations.
! amiller @ bigpond.net.au

IMPLICIT NONE
INTEGER, PARAMETER :: dp = SELECTED_REAL_KIND(12, 60)

PRIVATE
PUBLIC :: dp, lmdif1, lmdif, lmder1, lmder, enorm

CONTAINS


SUBROUTINE lmdif1(fcn, m, n, x, fvec, tol, info, iwa)
 
! Code converted using TO_F90 by Alan Miller
! Date: 1999-12-11  Time: 00:51:44

! N.B. Arguments WA & LWA have been removed.

INTEGER, INTENT(IN)        :: m
INTEGER, INTENT(IN)        :: n
REAL (dp), INTENT(IN OUT)  :: x(:)
REAL (dp), INTENT(OUT)     :: fvec(:)
REAL (dp), INTENT(IN)      :: tol
INTEGER, INTENT(OUT)       :: info
INTEGER, INTENT(OUT)       :: iwa(:)

! EXTERNAL fcn

INTERFACE
  SUBROUTINE fcn(m, n, x, fvec, iflag)
    IMPLICIT NONE
    INTEGER, PARAMETER         :: dp = SELECTED_REAL_KIND(12, 60)
    INTEGER, INTENT(IN)        :: m, n
    REAL (dp), INTENT(IN)      :: x(:)
    REAL (dp), INTENT(IN OUT)  :: fvec(:)
    INTEGER, INTENT(IN OUT)    :: iflag
  END SUBROUTINE fcn
END INTERFACE

!  **********

!  subroutine lmdif1

!  The purpose of lmdif1 is to minimize the sum of the squares of m nonlinear
!  functions in n variables by a modification of the Levenberg-Marquardt
!  algorithm.  This is done by using the more general least-squares
!  solver lmdif.  The user must provide a subroutine which calculates the
!  functions.  The jacobian is then calculated by a forward-difference
!  approximation.

!  the subroutine statement is

!    subroutine lmdif1(fcn, m, n, x, fvec, tol, info, iwa)

!  where

!    fcn is the name of the user-supplied subroutine which calculates
!      the functions.  fcn must be declared in an external statement in the
!      user calling program, and should be written as follows.

!      subroutine fcn(m, n, x, fvec, iflag)
!      integer m, n, iflag
!      REAL (dp) x(n), fvec(m)
!      ----------
!      calculate the functions at x and return this vector in fvec.
!      ----------
!      return
!      end

!      the value of iflag should not be changed by fcn unless
!      the user wants to terminate execution of lmdif1.
!      In this case set iflag to a negative integer.

!    m is a positive integer input variable set to the number of functions.

!    n is a positive integer input variable set to the number of variables.
!      n must not exceed m.

!    x is an array of length n.  On input x must contain an initial estimate
!      of the solution vector.  On output x contains the final estimate of
!      the solution vector.

!    fvec is an output array of length m which contains
!      the functions evaluated at the output x.

!    tol is a nonnegative input variable.  Termination occurs when the
!      algorithm estimates either that the relative error in the sum of
!      squares is at most tol or that the relative error between x and the
!      solution is at most tol.

!    info is an integer output variable.  If the user has terminated execution,
!      info is set to the (negative) value of iflag.  See description of fcn.
!      Otherwise, info is set as follows.

!      info = 0  improper input parameters.

!      info = 1  algorithm estimates that the relative error
!                in the sum of squares is at most tol.

!      info = 2  algorithm estimates that the relative error
!                between x and the solution is at most tol.

!      info = 3  conditions for info = 1 and info = 2 both hold.

!      info = 4  fvec is orthogonal to the columns of the
!                jacobian to machine precision.

!      info = 5  number of calls to fcn has reached or exceeded 200*(n+1).

!      info = 6  tol is too small. no further reduction in
!                the sum of squares is possible.

!      info = 7  tol is too small.  No further improvement in
!                the approximate solution x is possible.

!    iwa is an integer work array of length n.

!    wa is a work array of length lwa.

!    lwa is a positive integer input variable not less than m*n+5*n+m.

!  subprograms called

!    user-supplied ...... fcn

!    minpack-supplied ... lmdif

!  argonne national laboratory. minpack project. march 1980.
!  burton s. garbow, kenneth e. hillstrom, jorge j. more

!  **********
INTEGER   :: maxfev, mode, nfev, nprint
REAL (dp) :: epsfcn, ftol, gtol, xtol, fjac(m,n)
REAL (dp), PARAMETER :: factor = 100._dp, zero = 0.0_dp

info = 0

!     check the input parameters for errors.

IF (n <= 0 .OR. m < n .OR. tol < zero) GO TO 10

!     call lmdif.

maxfev = 200*(n + 1)
ftol = tol
xtol = tol
gtol = zero
epsfcn = zero
mode = 1
nprint = 0
CALL lmdif(fcn, m, n, x, fvec, ftol, xtol, gtol, maxfev, epsfcn,   &
           mode, factor, nprint, info, nfev, fjac, iwa)
IF (info == 8) info = 4

10 RETURN

!     last card of subroutine lmdif1.

END SUBROUTINE lmdif1



SUBROUTINE lmdif(fcn, m, n, x, fvec, ftol, xtol, gtol, maxfev, epsfcn,  &
                 mode, factor, nprint, info, nfev, fjac, ipvt)
 
! N.B. Arguments LDFJAC, DIAG, QTF, WA1, WA2, WA3 & WA4 have been removed.

INTEGER, INTENT(IN)        :: m
INTEGER, INTENT(IN)        :: n
REAL (dp), INTENT(IN OUT)  :: x(:)
REAL (dp), INTENT(OUT)     :: fvec(:)
REAL (dp), INTENT(IN)      :: ftol
REAL (dp), INTENT(IN)      :: xtol
REAL (dp), INTENT(IN OUT)  :: gtol
INTEGER, INTENT(IN OUT)    :: maxfev
REAL (dp), INTENT(IN OUT)  :: epsfcn
INTEGER, INTENT(IN)        :: mode
REAL (dp), INTENT(IN)      :: factor
INTEGER, INTENT(IN)        :: nprint
INTEGER, INTENT(OUT)       :: info
INTEGER, INTENT(OUT)       :: nfev
REAL (dp), INTENT(OUT)     :: fjac(:,:)    ! fjac(ldfjac,n)
INTEGER, INTENT(OUT)       :: ipvt(:)

! EXTERNAL fcn

INTERFACE
  SUBROUTINE fcn(m, n, x, fvec, iflag)
    IMPLICIT NONE
    INTEGER, PARAMETER         :: dp = SELECTED_REAL_KIND(12, 60)
    INTEGER, INTENT(IN)        :: m, n
    REAL (dp), INTENT(IN)      :: x(:)
    REAL (dp), INTENT(IN OUT)  :: fvec(:)
    INTEGER, INTENT(IN OUT)    :: iflag
  END SUBROUTINE fcn
END INTERFACE

!  **********

!  subroutine lmdif

!  The purpose of lmdif is to minimize the sum of the squares of m nonlinear
!  functions in n variables by a modification of the Levenberg-Marquardt
!  algorithm.  The user must provide a subroutine which calculates the
!  functions.  The jacobian is then calculated by a forward-difference
!  approximation.

!  the subroutine statement is

!    subroutine lmdif(fcn, m, n, x, fvec, ftol, xtol, gtol, maxfev, epsfcn,
!                     diag, mode, factor, nprint, info, nfev, fjac,
!                     ldfjac, ipvt, qtf, wa1, wa2, wa3, wa4)

! N.B. 7 of these arguments have been removed in this version.

!  where

!    fcn is the name of the user-supplied subroutine which calculates the
!      functions.  fcn must be declared in an external statement in the user
!      calling program, and should be written as follows.

!      subroutine fcn(m, n, x, fvec, iflag)
!      integer m, n, iflag
!      REAL (dp) x(:), fvec(m)
!      ----------
!      calculate the functions at x and return this vector in fvec.
!      ----------
!      return
!      end

!      the value of iflag should not be changed by fcn unless
!      the user wants to terminate execution of lmdif.
!      in this case set iflag to a negative integer.

!    m is a positive integer input variable set to the number of functions.

!    n is a positive integer input variable set to the number of variables.
!      n must not exceed m.

!    x is an array of length n.  On input x must contain an initial estimate
!      of the solution vector.  On output x contains the final estimate of the
!      solution vector.

!    fvec is an output array of length m which contains
!      the functions evaluated at the output x.

!    ftol is a nonnegative input variable.  Termination occurs when both the
!      actual and predicted relative reductions in the sum of squares are at
!      most ftol.  Therefore, ftol measures the relative error desired
!      in the sum of squares.

!    xtol is a nonnegative input variable.  Termination occurs when the
!      relative error between two consecutive iterates is at most xtol.
!      Therefore, xtol measures the relative error desired in the approximate
!      solution.

!    gtol is a nonnegative input variable.  Termination occurs when the cosine
!      of the angle between fvec and any column of the jacobian is at most
!      gtol in absolute value.  Therefore, gtol measures the orthogonality
!      desired between the function vector and the columns of the jacobian.

!    maxfev is a positive integer input variable.  Termination occurs when the
!      number of calls to fcn is at least maxfev by the end of an iteration.

!    epsfcn is an input variable used in determining a suitable step length
!      for the forward-difference approximation.  This approximation assumes
!      that the relative errors in the functions are of the order of epsfcn.
!      If epsfcn is less than the machine precision, it is assumed that the
!      relative errors in the functions are of the order of the machine
!      precision.

!    diag is an array of length n.  If mode = 1 (see below), diag is
!      internally set.  If mode = 2, diag must contain positive entries that
!      serve as multiplicative scale factors for the variables.

!    mode is an integer input variable.  If mode = 1, the variables will be
!      scaled internally.  If mode = 2, the scaling is specified by the input
!      diag. other values of mode are equivalent to mode = 1.

!    factor is a positive input variable used in determining the initial step
!      bound.  This bound is set to the product of factor and the euclidean
!      norm of diag*x if nonzero, or else to factor itself.  In most cases
!      factor should lie in the interval (.1,100.). 100. is a generally
!      recommended value.

!    nprint is an integer input variable that enables controlled printing of
!      iterates if it is positive.  In this case, fcn is called with iflag = 0
!      at the beginning of the first iteration and every nprint iterations
!      thereafter and immediately prior to return, with x and fvec available
!      for printing.  If nprint is not positive, no special calls
!      of fcn with iflag = 0 are made.

!    info is an integer output variable.  If the user has terminated
!      execution, info is set to the (negative) value of iflag.
!      See description of fcn.  Otherwise, info is set as follows.

!      info = 0  improper input parameters.

!      info = 1  both actual and predicted relative reductions
!                in the sum of squares are at most ftol.

!      info = 2  relative error between two consecutive iterates <= xtol.

!      info = 3  conditions for info = 1 and info = 2 both hold.

!      info = 4  the cosine of the angle between fvec and any column of
!                the Jacobian is at most gtol in absolute value.

!      info = 5  number of calls to fcn has reached or exceeded maxfev.

!      info = 6  ftol is too small. no further reduction in
!                the sum of squares is possible.

!      info = 7  xtol is too small. no further improvement in
!                the approximate solution x is possible.

!      info = 8  gtol is too small. fvec is orthogonal to the
!                columns of the jacobian to machine precision.

!    nfev is an integer output variable set to the number of calls to fcn.

!    fjac is an output m by n array. the upper n by n submatrix
!      of fjac contains an upper triangular matrix r with
!      diagonal elements of nonincreasing magnitude such that

!             t     t           t
!            p *(jac *jac)*p = r *r,

!      where p is a permutation matrix and jac is the final calculated
!      Jacobian.  Column j of p is column ipvt(j) (see below) of the
!      identity matrix. the lower trapezoidal part of fjac contains
!      information generated during the computation of r.

!    ldfjac is a positive integer input variable not less than m
!      which specifies the leading dimension of the array fjac.

!    ipvt is an integer output array of length n.  ipvt defines a permutation
!      matrix p such that jac*p = q*r, where jac is the final calculated
!      jacobian, q is orthogonal (not stored), and r is upper triangular
!      with diagonal elements of nonincreasing magnitude.
!      Column j of p is column ipvt(j) of the identity matrix.

!    qtf is an output array of length n which contains
!      the first n elements of the vector (q transpose)*fvec.

!    wa1, wa2, and wa3 are work arrays of length n.

!    wa4 is a work array of length m.

!  subprograms called

!    user-supplied ...... fcn

!    minpack-supplied ... dpmpar,enorm,fdjac2,lmpar,qrfac

!    fortran-supplied ... dabs,dmax1,dmin1,dsqrt,mod

!  argonne national laboratory. minpack project. march 1980.
!  burton s. garbow, kenneth e. hillstrom, jorge j. more

!  **********
INTEGER   :: i, iflag, iter, j, l
REAL (dp) :: actred, delta, dirder, epsmch, fnorm, fnorm1, gnorm,  &
             par, pnorm, prered, ratio, sum, temp, temp1, temp2, xnorm
REAL (dp) :: diag(n), qtf(n), wa1(n), wa2(n), wa3(n), wa4(m)
REAL (dp), PARAMETER :: one = 1.0_dp, p1 = 0.1_dp, p5 = 0.5_dp,  &
                        p25 = 0.25_dp, p75 = 0.75_dp, p0001 = 0.0001_dp, &
                        zero = 0.0_dp

!     epsmch is the machine precision.

epsmch = EPSILON(zero)

info = 0
iflag = 0
nfev = 0

!     check the input parameters for errors.

IF (n <= 0 .OR. m < n .OR. ftol < zero .OR. xtol < zero .OR. gtol < zero  &
    .OR. maxfev <= 0 .OR. factor <= zero) GO TO 300
IF (mode /= 2) GO TO 20
DO  j = 1, n
  IF (diag(j) <= zero) GO TO 300
END DO

!     evaluate the function at the starting point and calculate its norm.

20 iflag = 1
CALL fcn(m, n, x, fvec, iflag)
nfev = 1
IF (iflag < 0) GO TO 300
fnorm = enorm(m, fvec)

!     initialize levenberg-marquardt parameter and iteration counter.

par = zero
iter = 1

!     beginning of the outer loop.

!        calculate the jacobian matrix.

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲乱码国产乱码精品精的特点 | 91高清视频在线| 国产成人免费av在线| 国产精一区二区三区| 国产美女娇喘av呻吟久久| 国产在线看一区| 国产精品白丝jk白祙喷水网站| 国产激情一区二区三区桃花岛亚洲| 99re成人精品视频| av亚洲精华国产精华精| 播五月开心婷婷综合| 欧美在线视频日韩| 日韩三级伦理片妻子的秘密按摩| 精品黑人一区二区三区久久| 日本一区二区三区四区在线视频 | |精品福利一区二区三区| 国产调教视频一区| 中文无字幕一区二区三区| 中文字幕在线一区| 亚洲伦理在线免费看| 激情图区综合网| 欧美系列亚洲系列| 国产日韩欧美亚洲| 日韩av中文字幕一区二区三区 | 日韩一二三区不卡| 国产精品美女久久久久久久| 一区二区免费视频| 国产电影精品久久禁18| 欧美顶级少妇做爰| 夜夜爽夜夜爽精品视频| 成人免费毛片高清视频| 欧美妇女性影城| 污片在线观看一区二区| 99精品欧美一区二区三区小说| 日韩女优av电影| 午夜久久久久久电影| 欧美午夜精品久久久| 国产精品白丝在线| aaa欧美日韩| 国产精品视频线看| 99国产一区二区三精品乱码| 中文字幕视频一区二区三区久| 精品亚洲成a人| 日韩一区二区高清| 久久69国产一区二区蜜臀| 6080亚洲精品一区二区| 日韩av不卡在线观看| 欧美精品国产精品| 国产一二三精品| 欧美国产一区二区| 欧美在线播放高清精品| 肉肉av福利一精品导航| 欧美二区在线观看| 久久99热国产| 亚洲色图在线看| 91精品欧美综合在线观看最新| 日韩福利电影在线观看| 精品欧美一区二区三区精品久久| 日本不卡高清视频| 国产精品久久久久影院老司 | 国产偷国产偷亚洲高清人白洁| 成人性生交大片免费看中文网站| 亚洲人成网站在线| 欧美一级在线视频| 色老头久久综合| 久久av中文字幕片| 亚洲午夜一二三区视频| 国产精品久久久久久妇女6080| 欧美色网一区二区| 国产激情视频一区二区在线观看| 亚洲一区二区三区四区在线| 日本一区二区视频在线观看| 欧美精品v日韩精品v韩国精品v| 丁香五精品蜜臀久久久久99网站| 亚洲成a人v欧美综合天堂下载| 国产午夜亚洲精品理论片色戒| 欧美男男青年gay1069videost| 成人av资源站| 国产成人精品亚洲777人妖| 国产成人免费网站| 激情文学综合插| 国产在线精品免费av| 美美哒免费高清在线观看视频一区二区 | 91精品国产91久久久久久最新毛片 | 欧美三区在线视频| 色久优优欧美色久优优| 东方欧美亚洲色图在线| 国产呦精品一区二区三区网站| 日本va欧美va精品发布| 亚洲电影一级黄| 美腿丝袜在线亚洲一区| 亚洲超碰97人人做人人爱| 亚洲一区二区3| 视频在线观看一区二区三区| 日韩—二三区免费观看av| 日韩成人一级大片| 精品在线亚洲视频| 粉嫩aⅴ一区二区三区四区| a亚洲天堂av| 日本韩国精品在线| 欧美丰满美乳xxx高潮www| 欧美成人vps| 亚洲欧美综合另类在线卡通| 亚洲欧美日韩国产手机在线 | 欧美精品v日韩精品v韩国精品v| 91精品国产综合久久精品麻豆 | 国产综合成人久久大片91| 成人免费高清视频| 欧美日韩成人一区| 久久精子c满五个校花| 樱花影视一区二区| 国产一区二区三区| 蜜臀久久久久久久| 欧美性猛片aaaaaaa做受| 日本欧美大码aⅴ在线播放| 亚洲电影视频在线| 播五月开心婷婷综合| 3d成人动漫网站| 日本一区二区动态图| 日韩av高清在线观看| 色综合久久久久网| 91色.com| 成人综合婷婷国产精品久久蜜臀| 蜜桃av一区二区| 欧美日韩午夜影院| 亚洲激情av在线| 99精品国产热久久91蜜凸| 国产亚洲欧美在线| 秋霞影院一区二区| 在线综合视频播放| 久久精品国产在热久久| 欧美日韩亚洲综合在线| 亚洲女人小视频在线观看| 91日韩精品一区| 一区二区三区不卡在线观看| 99久久精品国产导航| 欧美经典一区二区| 99热99精品| 亚洲观看高清完整版在线观看| 欧洲精品视频在线观看| 亚洲一区二区三区视频在线| 欧美日韩中字一区| 蜜乳av一区二区| 国产精品毛片无遮挡高清| 一本到不卡免费一区二区| 亚洲r级在线视频| 国产日韩视频一区二区三区| 国产高清精品网站| 亚洲18色成人| 国产精品久久看| 欧美日韩国产123区| 国产精品一区三区| 亚洲一区二区三区在线| 精品va天堂亚洲国产| 91亚洲永久精品| 久久99热这里只有精品| 中文字幕一区二区日韩精品绯色| 欧美性大战久久久久久久蜜臀| 蜜臀91精品一区二区三区| 亚洲三级小视频| 国产日韩精品视频一区| 91精品国产综合久久久蜜臀粉嫩| 97aⅴ精品视频一二三区| 久久99国产精品免费| 五月开心婷婷久久| 一区二区三区欧美| 丝袜a∨在线一区二区三区不卡| 国产精品福利在线播放| 久久久久88色偷偷免费| 欧美精品粉嫩高潮一区二区| 色综合视频在线观看| 成人美女在线观看| 白白色 亚洲乱淫| 国产成人aaaa| 成人听书哪个软件好| 大胆欧美人体老妇| eeuss鲁一区二区三区| eeuss鲁片一区二区三区| 色综合视频在线观看| 91麻豆免费看片| 欧美吞精做爰啪啪高潮| 日本高清成人免费播放| 在线观看亚洲成人| 欧美日韩一本到| 日韩免费一区二区三区在线播放| 欧美一区二区福利在线| 日韩欧美视频在线| 国产精品伦一区二区三级视频| 国产精品三级av在线播放| 亚洲欧美激情小说另类| 午夜成人在线视频| 精品一区二区影视| 99精品视频在线播放观看| 欧美色视频在线观看| 欧美tickling挠脚心丨vk| 综合久久一区二区三区| 日韩激情一二三区| 99视频有精品| 精品国产免费人成在线观看| 国产精品乱人伦中文|