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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? lm.f90

?? 開發的lm算法,很有用的一種優化算法. 對非線性優化有很大用處
?? F90
?? 第 1 頁 / 共 5 頁
字號:
30 iflag = 2
CALL fdjac2(fcn, m, n, x, fvec, fjac, iflag, epsfcn)
nfev = nfev + n
IF (iflag < 0) GO TO 300

!        If requested, call fcn to enable printing of iterates.

IF (nprint <= 0) GO TO 40
iflag = 0
IF (MOD(iter-1,nprint) == 0) CALL fcn(m, n, x, fvec, iflag)
IF (iflag < 0) GO TO 300

!        Compute the qr factorization of the jacobian.

40 CALL qrfac(m, n, fjac, .true., ipvt, wa1, wa2)

!        On the first iteration and if mode is 1, scale according
!        to the norms of the columns of the initial jacobian.

IF (iter /= 1) GO TO 80
IF (mode == 2) GO TO 60
DO  j = 1, n
  diag(j) = wa2(j)
  IF (wa2(j) == zero) diag(j) = one
END DO

!        On the first iteration, calculate the norm of the scaled x
!        and initialize the step bound delta.

60 wa3(1:n) = diag(1:n)*x(1:n)
xnorm = enorm(n, wa3)
delta = factor*xnorm
IF (delta == zero) delta = factor

!        Form (q transpose)*fvec and store the first n components in qtf.

80 wa4(1:m) = fvec(1:m)
DO  j = 1, n
  IF (fjac(j,j) == zero) GO TO 120
  sum = DOT_PRODUCT( fjac(j:m,j), wa4(j:m) )
  temp = -sum/fjac(j,j)
  DO  i = j, m
    wa4(i) = wa4(i) + fjac(i,j)*temp
  END DO
  120 fjac(j,j) = wa1(j)
  qtf(j) = wa4(j)
END DO

!        compute the norm of the scaled gradient.

gnorm = zero
IF (fnorm == zero) GO TO 170
DO  j = 1, n
  l = ipvt(j)
  IF (wa2(l) == zero) CYCLE
  sum = zero
  DO  i = 1, j
    sum = sum + fjac(i,j)*(qtf(i)/fnorm)
  END DO
  gnorm = MAX(gnorm, ABS(sum/wa2(l)))
END DO

!        test for convergence of the gradient norm.

170 IF (gnorm <= gtol) info = 4
IF (info /= 0) GO TO 300

!        rescale if necessary.

IF (mode == 2) GO TO 200
DO  j = 1, n
  diag(j) = MAX(diag(j), wa2(j))
END DO

!        beginning of the inner loop.

!           determine the Levenberg-Marquardt parameter.

200 CALL lmpar(n, fjac, ipvt, diag, qtf, delta, par, wa1, wa2)

!           store the direction p and x + p. calculate the norm of p.

DO  j = 1, n
  wa1(j) = -wa1(j)
  wa2(j) = x(j) + wa1(j)
  wa3(j) = diag(j)*wa1(j)
END DO
pnorm = enorm(n, wa3)

!           on the first iteration, adjust the initial step bound.

IF (iter == 1) delta = MIN(delta, pnorm)

!           evaluate the function at x + p and calculate its norm.

iflag = 1
CALL fcn(m, n, wa2, wa4, iflag)
nfev = nfev + 1
IF (iflag < 0) GO TO 300
fnorm1 = enorm(m, wa4)

!           compute the scaled actual reduction.

actred = -one
IF (p1*fnorm1 < fnorm) actred = one - (fnorm1/fnorm)**2

!           Compute the scaled predicted reduction and
!           the scaled directional derivative.

DO  j = 1, n
  wa3(j) = zero
  l = ipvt(j)
  temp = wa1(l)
  DO  i = 1, j
    wa3(i) = wa3(i) + fjac(i,j)*temp
  END DO
END DO
temp1 = enorm(n,wa3)/fnorm
temp2 = (SQRT(par)*pnorm)/fnorm
prered = temp1**2 + temp2**2/p5
dirder = -(temp1**2 + temp2**2)

!           compute the ratio of the actual to the predicted reduction.

ratio = zero
IF (prered /= zero) ratio = actred/prered

!           update the step bound.

IF (ratio <= p25) THEN
  IF (actred >= zero) temp = p5
  IF (actred < zero) temp = p5*dirder/(dirder + p5*actred)
  IF (p1*fnorm1 >= fnorm .OR. temp < p1) temp = p1
  delta = temp*MIN(delta,pnorm/p1)
  par = par/temp
ELSE
  IF (par /= zero .AND. ratio < p75) GO TO 260
  delta = pnorm/p5
  par = p5*par
END IF

!           test for successful iteration.

260 IF (ratio < p0001) GO TO 290

!           successful iteration. update x, fvec, and their norms.

DO  j = 1, n
  x(j) = wa2(j)
  wa2(j) = diag(j)*x(j)
END DO
fvec(1:m) = wa4(1:m)
xnorm = enorm(n, wa2)
fnorm = fnorm1
iter = iter + 1

!           tests for convergence.

290 IF (ABS(actred) <= ftol .AND. prered <= ftol .AND. p5*ratio <= one) info = 1
IF (delta <= xtol*xnorm) info = 2
IF (ABS(actred) <= ftol .AND. prered <= ftol  &
    .AND. p5*ratio <= one .AND. info == 2) info = 3
IF (info /= 0) GO TO 300

!           tests for termination and stringent tolerances.

IF (nfev >= maxfev) info = 5
IF (ABS(actred) <= epsmch .AND. prered <= epsmch  &
    .AND. p5*ratio <= one) info = 6
IF (delta <= epsmch*xnorm) info = 7
IF (gnorm <= epsmch) info = 8
IF (info /= 0) GO TO 300

!           end of the inner loop. repeat if iteration unsuccessful.

IF (ratio < p0001) GO TO 200

!        end of the outer loop.

GO TO 30

!     termination, either normal or user imposed.

300 IF (iflag < 0) info = iflag
iflag = 0
IF (nprint > 0) CALL fcn(m, n, x, fvec, iflag)
RETURN

!     last card of subroutine lmdif.

END SUBROUTINE lmdif



SUBROUTINE lmder1(fcn, m, n, x, fvec, fjac, tol, info, ipvt)
 
! Code converted using TO_F90 by Alan Miller
! Date: 1999-12-09  Time: 12:45:54

! N.B. Arguments LDFJAC, 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 OUT)  :: fjac(:,:)    ! fjac(ldfjac,n)
REAL (dp), INTENT(IN)      :: tol
INTEGER, INTENT(OUT)       :: info
INTEGER, INTENT(IN OUT)    :: ipvt(:)


! EXTERNAL fcn

INTERFACE
  SUBROUTINE fcn(m, n, x, fvec, fjac, 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(:)
    REAL (dp), INTENT(OUT)     :: fjac(:,:)
    INTEGER, INTENT(IN OUT)    :: iflag
  END SUBROUTINE fcn
END INTERFACE

!  **********

!  subroutine lmder1

!  The purpose of lmder1 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 lmder.  The user must provide a
!  subroutine which calculates the functions and the jacobian.

!  the subroutine statement is

!    subroutine lmder1(fcn, m, n, x, fvec, fjac, tol, info, ipvt)

!  where

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

!      subroutine fcn(m, n, x, fvec, fjac, iflag)
!      integer   :: m, n, ldfjac, iflag
!      REAL (dp) :: x(:), fvec(:), fjac(:,:)
!      ----------
!      if iflag = 1 calculate the functions at x and
!      return this vector in fvec. do not alter fjac.
!      if iflag = 2 calculate the jacobian at x and
!      return this matrix in fjac. do not alter fvec.
!      ----------
!      return
!      end

!      the value of iflag should not be changed by fcn unless
!      the user wants to terminate execution of lmder1.
!      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.

!    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.

!    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 with iflag = 1 has reached 100*(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.

!    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.

!    wa is a work array of length lwa.

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

!  subprograms called

!    user-supplied ...... fcn

!    minpack-supplied ... lmder

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

!  **********
INTEGER   :: maxfev, mode, nfev, njev, nprint
REAL (dp) :: ftol, gtol, xtol
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 lmder.

maxfev = 100*(n + 1)
ftol = tol
xtol = tol
gtol = zero
mode = 1
nprint = 0
CALL lmder(fcn, m, n, x, fvec, fjac, ftol, xtol, gtol, maxfev,  &
           mode, factor, nprint, info, nfev, njev, ipvt)
IF (info == 8) info = 4

10 RETURN

!     last card of subroutine lmder1.

END SUBROUTINE lmder1



SUBROUTINE lmder(fcn, m, n, x, fvec, fjac, ftol, xtol, gtol, maxfev, &
                 mode, factor, nprint, info, nfev, njev, ipvt)
 
! Code converted using TO_F90 by Alan Miller
! Date: 1999-12-09  Time: 12:45:50

! 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(m)
REAL (dp), INTENT(OUT)     :: fjac(:,:)    ! fjac(ldfjac,n)
REAL (dp), INTENT(IN)      :: ftol
REAL (dp), INTENT(IN)      :: xtol
REAL (dp), INTENT(IN OUT)  :: gtol
INTEGER, INTENT(IN OUT)    :: maxfev
INTEGER, INTENT(IN)        :: mode
REAL (dp), INTENT(IN)      :: factor
INTEGER, INTENT(IN)        :: nprint
INTEGER, INTENT(OUT)       :: info
INTEGER, INTENT(OUT)       :: nfev
INTEGER, INTENT(OUT)       :: njev
INTEGER, INTENT(OUT)       :: ipvt(:)

INTERFACE
  SUBROUTINE fcn(m, n, x, fvec, fjac, 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(:)
    REAL (dp), INTENT(OUT)     :: fjac(:,:)
    INTEGER, INTENT(IN OUT)    :: iflag
  END SUBROUTINE fcn
END INTERFACE


!  **********

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美一级专区免费大片| 国产亚洲精品久| 久久久久久久久久美女| 亚洲精品成人a在线观看| 加勒比av一区二区| 欧美三级乱人伦电影| 成人免费一区二区三区在线观看| 视频一区欧美日韩| 色噜噜夜夜夜综合网| 国产女主播视频一区二区| 日韩av电影一区| 一本久久精品一区二区| 国产婷婷色一区二区三区| 毛片不卡一区二区| 欧美日韩视频不卡| 亚洲免费观看高清完整版在线观看 | 在线免费观看日本一区| 欧美激情一区在线| 精品中文字幕一区二区| 欧美人妖巨大在线| 日韩欧美国产综合| 日韩国产欧美三级| 欧美精品少妇一区二区三区| 亚洲欧洲制服丝袜| 色哟哟欧美精品| 最新国产成人在线观看| 成人免费av资源| 国产精品久久久久婷婷二区次| 国产精品系列在线观看| 精品国产99国产精品| 久久aⅴ国产欧美74aaa| 精品日本一线二线三线不卡| 久久国产精品第一页| 欧美岛国在线观看| 国产成人久久精品77777最新版本 国产成人鲁色资源国产91色综 | 日韩欧美中文一区| 蜜臀av一级做a爰片久久| 日韩网站在线看片你懂的| 青青草精品视频| 欧美tickle裸体挠脚心vk| 国产一区二区在线看| 久久精品免费在线观看| 成人午夜在线播放| 亚洲欧美另类在线| 欧美日韩小视频| 麻豆精品久久久| 国产午夜三级一区二区三| 99精品欧美一区| 亚洲综合视频网| 3d动漫精品啪啪| 激情图片小说一区| 中文字幕欧美激情| 欧美性欧美巨大黑白大战| 日韩成人dvd| 国产精品―色哟哟| 欧美日韩一卡二卡三卡 | 国产69精品一区二区亚洲孕妇| 国产精品高潮呻吟久久| 日本韩国欧美国产| 九九国产精品视频| 自拍视频在线观看一区二区| 欧美日韩和欧美的一区二区| 国产一区二区三区四区五区入口| 国产精品网站在线播放| 欧美日韩国产影片| 丁香激情综合国产| 天天综合网 天天综合色| 国产视频一区在线播放| 在线影院国内精品| 国内精品自线一区二区三区视频| 国产精品久线观看视频| 欧美一区二区精美| 91啪亚洲精品| 国产精品一二三四五| 亚洲专区一二三| 国产亚洲一区二区在线观看| 欧美亚洲国产一区在线观看网站| 紧缚奴在线一区二区三区| 一区二区三区高清| 国产亚洲午夜高清国产拍精品| 欧美这里有精品| 成人h精品动漫一区二区三区| 婷婷一区二区三区| 亚洲免费观看在线视频| 亚洲国产高清不卡| 日韩三级电影网址| 欧美午夜在线观看| 99精品在线免费| 韩国中文字幕2020精品| 亚洲成a人v欧美综合天堂 | 97se亚洲国产综合自在线不卡| 日韩成人dvd| 亚洲国产aⅴ天堂久久| 中文字幕亚洲不卡| 国产亲近乱来精品视频| 日韩午夜av电影| 91麻豆精品国产91久久久久久 | 男男视频亚洲欧美| 亚洲一区二区三区四区在线免费观看| 国产亚洲综合色| 久久综合九色综合久久久精品综合| 欧美在线|欧美| 91香蕉视频黄| 99久久99久久精品免费观看| 成人性生交大片免费看中文| 国产福利精品一区二区| 国产一区视频导航| 精品在线亚洲视频| 久久成人羞羞网站| 美女一区二区视频| 精品一区二区在线视频| 另类中文字幕网| 在线视频你懂得一区二区三区| 成人午夜视频网站| 国产99久久精品| 97久久精品人人做人人爽50路| 成人午夜电影小说| 91麻豆国产香蕉久久精品| 91蝌蚪porny| 欧美天堂一区二区三区| 欧美日韩一区二区三区高清| 欧美日韩精品一二三区| 日韩西西人体444www| 精品国产伦一区二区三区免费| www亚洲一区| 国产精品久久久一本精品 | 亚洲欧洲国产专区| 亚洲精品国产无天堂网2021| 亚洲一区二区三区四区五区中文| 亚洲一卡二卡三卡四卡无卡久久| 日韩av中文字幕一区二区三区| 日本伊人色综合网| 国产一区二区三区不卡在线观看 | 精品久久一二三区| 26uuu色噜噜精品一区| 国产三级精品视频| 亚洲毛片av在线| 日本不卡一二三区黄网| 国产成人小视频| 91啪九色porn原创视频在线观看| 欧美色老头old∨ideo| 欧美mv日韩mv| 亚洲免费观看在线观看| 裸体健美xxxx欧美裸体表演| 国产一区二区三区免费观看| 99久久精品一区| 日韩三级av在线播放| 国产精品第一页第二页第三页| 亚洲mv在线观看| 高清国产一区二区| 欧美福利视频一区| 国产欧美日韩一区二区三区在线观看| 亚洲精品国久久99热| 久久99国产精品成人| 在线欧美日韩国产| 久久综合给合久久狠狠狠97色69| 中文字幕在线一区免费| 麻豆精品视频在线| 在线亚洲一区二区| 久久久久久99精品| 亚洲h在线观看| av中文字幕在线不卡| 日韩精品影音先锋| 亚洲精品视频在线观看网站| 美女国产一区二区| 91高清视频免费看| 国产精品拍天天在线| 美女视频网站久久| 欧美午夜精品久久久久久孕妇 | 日韩av电影天堂| 色综合久久六月婷婷中文字幕| 26uuu精品一区二区在线观看| 一级中文字幕一区二区| 国产精华液一区二区三区| 制服丝袜一区二区三区| 亚洲欧美一区二区不卡| 国产a精品视频| wwwwww.欧美系列| 美女视频黄久久| 欧美一区二区在线视频| 亚洲精品写真福利| 91在线无精精品入口| 国产欧美一区二区精品仙草咪| 经典三级在线一区| 精品免费99久久| 94-欧美-setu| 亚洲欧美偷拍三级| 99久久婷婷国产| 中文字幕色av一区二区三区| 国产传媒久久文化传媒| 2019国产精品| 国产成人免费在线视频| 久久亚洲精品小早川怜子| 久久99这里只有精品| 99久久99久久精品免费观看| 秋霞影院一区二区| 日韩美一区二区三区| 久久久青草青青国产亚洲免观| 免费观看日韩电影| 精品日韩一区二区三区免费视频|