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

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

?? lm.f90

?? 開發的lm算法,很有用的一種優化算法. 對非線性優化有很大用處
?? F90
?? 第 1 頁 / 共 5 頁
字號:
!  **********

!  subroutine qrsolv

!  Given an m by n matrix a, an n by n diagonal matrix d, and an m-vector b,
!  the problem is to determine an x which solves the system

!        a*x = b ,     d*x = 0 ,

!  in the least squares sense.

!  This subroutine completes the solution of the problem if it is provided
!  with the necessary information from the qr factorization, with column
!  pivoting, of a.  That is, if a*p = q*r, where p is a permutation matrix,
!  q has orthogonal columns, and r is an upper triangular matrix with diagonal
!  elements of nonincreasing magnitude, then qrsolv expects the full upper
!  triangle of r, the permutation matrix p, and the first n components of
!  (q transpose)*b.  The system a*x = b, d*x = 0, is then equivalent to

!               t       t
!        r*z = q *b ,  p *d*p*z = 0 ,

!  where x = p*z. if this system does not have full rank,
!  then a least squares solution is obtained.  On output qrsolv
!  also provides an upper triangular matrix s such that

!         t   t               t
!        p *(a *a + d*d)*p = s *s .

!  s is computed within qrsolv and may be of separate interest.

!  the subroutine statement is

!    subroutine qrsolv(n, r, ldr, ipvt, diag, qtb, x, sdiag, wa)

! N.B. Arguments LDR and WA have been removed in this version.

!  where

!    n is a positive integer input variable set to the order of r.

!    r is an n by n array.  On input the full upper triangle must contain
!      the full upper triangle of the matrix r.
!      On output the full upper triangle is unaltered, and the strict lower
!      triangle contains the strict upper triangle (transposed) of the
!      upper triangular matrix s.

!    ldr is a positive integer input variable not less than n
!      which specifies the leading dimension of the array r.

!    ipvt is an integer input array of length n which defines the
!      permutation matrix p such that a*p = q*r.  Column j of p
!      is column ipvt(j) of the identity matrix.

!    diag is an input array of length n which must contain the
!      diagonal elements of the matrix d.

!    qtb is an input array of length n which must contain the first
!      n elements of the vector (q transpose)*b.

!    x is an output array of length n which contains the least
!      squares solution of the system a*x = b, d*x = 0.

!    sdiag is an output array of length n which contains the
!      diagonal elements of the upper triangular matrix s.

!    wa is a work array of length n.

!  subprograms called

!    fortran-supplied ... ABS,SQRT

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

!  **********
INTEGER   :: i, j, k, kp1, l, nsing
REAL (dp) :: COS, cotan, qtbpj, SIN, sum, TAN, temp, wa(n)
REAL (dp), PARAMETER :: p5 = 0.5_dp, p25 = 0.25_dp, zero = 0.0_dp

!     Copy r and (q transpose)*b to preserve input and initialize s.
!     In particular, save the diagonal elements of r in x.

DO  j = 1, n
  r(j:n,j) = r(j,j:n)
  x(j) = r(j,j)
  wa(j) = qtb(j)
END DO

!     Eliminate the diagonal matrix d using a givens rotation.

DO  j = 1, n
  
!        Prepare the row of d to be eliminated, locating the
!        diagonal element using p from the qr factorization.
  
  l = ipvt(j)
  IF (diag(l) == zero) CYCLE
  sdiag(j:n) = zero
  sdiag(j) = diag(l)
  
!     The transformations to eliminate the row of d modify only a single
!     element of (q transpose)*b beyond the first n, which is initially zero.
  
  qtbpj = zero
  DO  k = j, n
    
!        Determine a givens rotation which eliminates the
!        appropriate element in the current row of d.
    
    IF (sdiag(k) == zero) CYCLE
    IF (ABS(r(k,k)) < ABS(sdiag(k))) THEN
      cotan = r(k,k)/sdiag(k)
      SIN = p5/SQRT(p25 + p25*cotan**2)
      COS = SIN*cotan
    ELSE
      TAN = sdiag(k)/r(k,k)
      COS = p5/SQRT(p25 + p25*TAN**2)
      SIN = COS*TAN
    END IF
    
!        Compute the modified diagonal element of r and
!        the modified element of ((q transpose)*b,0).
    
    r(k,k) = COS*r(k,k) + SIN*sdiag(k)
    temp = COS*wa(k) + SIN*qtbpj
    qtbpj = -SIN*wa(k) + COS*qtbpj
    wa(k) = temp
    
!        Accumulate the tranformation in the row of s.
    
    kp1 = k + 1
    DO  i = kp1, n
      temp = COS*r(i,k) + SIN*sdiag(i)
      sdiag(i) = -SIN*r(i,k) + COS*sdiag(i)
      r(i,k) = temp
    END DO
  END DO
  
!     Store the diagonal element of s and restore
!     the corresponding diagonal element of r.
  
  sdiag(j) = r(j,j)
  r(j,j) = x(j)
END DO

!     Solve the triangular system for z.  If the system is singular,
!     then obtain a least squares solution.

nsing = n
DO  j = 1, n
  IF (sdiag(j) == zero .AND. nsing == n) nsing = j - 1
  IF (nsing < n) wa(j) = zero
END DO

DO  k = 1, nsing
  j = nsing - k + 1
  sum = DOT_PRODUCT( r(j+1:nsing,j), wa(j+1:nsing) )
  wa(j) = (wa(j) - sum)/sdiag(j)
END DO

!     Permute the components of z back to components of x.

DO  j = 1, n
  l = ipvt(j)
  x(l) = wa(j)
END DO
RETURN

!     last card of subroutine qrsolv.

END SUBROUTINE qrsolv



FUNCTION enorm(n,x) RESULT(fn_val)
 
! Code converted using TO_F90 by Alan Miller
! Date: 1999-12-09  Time: 12:45:34

INTEGER, INTENT(IN)    :: n
REAL (dp), INTENT(IN)  :: x(:)
REAL (dp)              :: fn_val

!  **********

!  function enorm

!  given an n-vector x, this function calculates the euclidean norm of x.

!  the euclidean norm is computed by accumulating the sum of squares in
!  three different sums.  The sums of squares for the small and large
!  components are scaled so that no overflows occur.  Non-destructive
!  underflows are permitted.  Underflows and overflows do not occur in the
!  computation of the unscaled sum of squares for the intermediate
!  components.  The definitions of small, intermediate and large components
!  depend on two constants, rdwarf and rgiant.  The main restrictions on
!  these constants are that rdwarf**2 not underflow and rgiant**2 not
!  overflow.  The constants given here are suitable for every known computer.

!  the function statement is

!    REAL (dp) function enorm(n,x)

!  where

!    n is a positive integer input variable.

!    x is an input array of length n.

!  subprograms called

!    fortran-supplied ... ABS,SQRT

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

!  **********
INTEGER   :: i
REAL (dp) :: agiant, floatn, s1, s2, s3, xabs, x1max, x3max
REAL (dp), PARAMETER :: one = 1.0_dp, zero = 0.0_dp, rdwarf = 3.834E-20_dp,  &
                        rgiant = 1.304E+19_dp

s1 = zero
s2 = zero
s3 = zero
x1max = zero
x3max = zero
floatn = n
agiant = rgiant/floatn
DO  i = 1, n
  xabs = ABS(x(i))
  IF (xabs > rdwarf .AND. xabs < agiant) GO TO 70
  IF (xabs <= rdwarf) GO TO 30
  
!              sum for large components.
  
  IF (xabs <= x1max) GO TO 10
  s1 = one + s1*(x1max/xabs)**2
  x1max = xabs
  GO TO 20

  10 s1 = s1 + (xabs/x1max)**2

  20 GO TO 60
  
!              sum for small components.
  
  30 IF (xabs <= x3max) GO TO 40
  s3 = one + s3*(x3max/xabs)**2
  x3max = xabs
  GO TO 60

  40 IF (xabs /= zero) s3 = s3 + (xabs/x3max)**2

  60 CYCLE
  
!           sum for intermediate components.
  
  70 s2 = s2 + xabs**2
END DO

!     calculation of norm.

IF (s1 == zero) GO TO 100
fn_val = x1max*SQRT(s1 + (s2/x1max)/x1max)
GO TO 120

100 IF (s2 == zero) GO TO 110
IF (s2 >= x3max) fn_val = SQRT(s2*(one + (x3max/s2)*(x3max*s3)))
IF (s2 < x3max) fn_val = SQRT(x3max*((s2/x3max) + (x3max*s3)))
GO TO 120

110 fn_val = x3max*SQRT(s3)

120 RETURN

!     last card of function enorm.

END FUNCTION enorm



SUBROUTINE fdjac2(fcn, m, n, x, fvec, fjac, iflag, epsfcn)
 
! Code converted using TO_F90 by Alan Miller
! Date: 1999-12-09  Time: 12:45:44

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

INTEGER, INTENT(IN)        :: m
INTEGER, INTENT(IN)        :: n
REAL (dp), INTENT(IN OUT)  :: x(n)
REAL (dp), INTENT(IN)      :: fvec(m)
REAL (dp), INTENT(OUT)     :: fjac(:,:)    ! fjac(ldfjac,n)
INTEGER, INTENT(IN OUT)    :: iflag
REAL (dp), INTENT(IN)      :: epsfcn

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 fdjac2

!  this subroutine computes a forward-difference approximation
!  to the m by n jacobian matrix associated with a specified
!  problem of m functions in n variables.

!  the subroutine statement is

!    subroutine fdjac2(fcn,m,n,x,fvec,fjac,ldfjac,iflag,epsfcn,wa)

!  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 fdjac2.
!      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 input array of length n.

!    fvec is an input array of length m which must contain the
!      functions evaluated at x.

!    fjac is an output m by n array which contains the
!      approximation to the jacobian matrix evaluated at x.

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

!    iflag is an integer variable which can be used to terminate
!      the execution of fdjac2.  see description of fcn.

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

!    wa is a work array of length m.

!  subprograms called

!    user-supplied ...... fcn

!    minpack-supplied ... dpmpar

!    fortran-supplied ... ABS,MAX,SQRT

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

!  **********
INTEGER   :: j
REAL (dp) :: eps, epsmch, h, temp, wa(m)
REAL (dp), PARAMETER :: zero = 0.0_dp

!     epsmch is the machine precision.

epsmch = EPSILON(zero)

eps = SQRT(MAX(epsfcn, epsmch))
DO  j = 1, n
  temp = x(j)
  h = eps*ABS(temp)
  IF (h == zero) h = eps
  x(j) = temp + h
  CALL fcn(m, n, x, wa, iflag)
  IF (iflag < 0) EXIT
  x(j) = temp
  fjac(1:m,j) = (wa(1:m) - fvec(1:m))/h
END DO

RETURN

!     last card of subroutine fdjac2.

END SUBROUTINE fdjac2


END MODULE Levenberg_Marquardt

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99久久久免费精品国产一区二区| 欧美人体做爰大胆视频| 精品国产一区二区三区久久影院| 午夜不卡av在线| 91麻豆精品国产91久久久资源速度 | av动漫一区二区| 亚洲男人的天堂网| 亚洲制服欧美中文字幕中文字幕| 日本三级韩国三级欧美三级| 国产一区二区免费视频| 久久久亚洲午夜电影| 国产成人亚洲综合a∨猫咪| 亚洲欧洲国产日韩| 欧美亚洲一区三区| 精品一区二区精品| 中文字幕一区二区三中文字幕| 欧美亚洲国产一卡| 麻豆91在线播放| 国产精品免费久久| 欧美日韩1区2区| 在线免费不卡电影| 久久av资源站| 中文字幕一区二区三区在线观看 | 亚洲欧美影音先锋| 欧美日韩一区二区不卡| 久久www免费人成看片高清| 国产精品久久久久久久久免费樱桃| 91在线观看高清| 另类的小说在线视频另类成人小视频在线 | 精品久久99ma| 色婷婷国产精品久久包臀 | 久久九九国产精品| 在线日韩一区二区| 国产一区二区三区免费观看| 国产精品国产自产拍高清av| 欧美日韩aaaaaa| youjizz国产精品| 青娱乐精品视频| 亚洲欧美日韩国产综合在线| 精品人伦一区二区色婷婷| 99re这里都是精品| 国产一区二区主播在线| 亚洲第一激情av| 国产精品入口麻豆原神| 91精品国产福利在线观看 | 欧美网站一区二区| 国产成人精品免费在线| 视频在线在亚洲| 亚洲欧美日韩综合aⅴ视频| 精品国产乱码久久久久久免费| 日本韩国一区二区三区视频| 国产成人午夜精品5599| 裸体一区二区三区| 亚洲国产综合人成综合网站| 自拍偷拍欧美精品| 欧美激情自拍偷拍| 精品粉嫩aⅴ一区二区三区四区| 欧美日韩在线播| 色哟哟一区二区在线观看| 国产91丝袜在线观看| 国模套图日韩精品一区二区| 日韩电影在线免费观看| 亚洲一区欧美一区| 一区二区三区四区不卡在线 | 日韩欧美在线影院| 欧美日韩视频在线一区二区| aa级大片欧美| 成人激情午夜影院| 国产一区二区三区在线观看免费视频 | 欧美电影免费观看高清完整版| 亚洲成人免费电影| 国产精品传媒在线| 欧美国产精品一区二区三区| 久久夜色精品国产噜噜av| 日韩亚洲欧美在线| 欧美激情一区二区三区全黄 | 岛国一区二区在线观看| 精品一区二区三区影院在线午夜| 日韩成人一级大片| 偷偷要91色婷婷| 爽好多水快深点欧美视频| 天天av天天翘天天综合网| 亚洲国产日韩一区二区| 亚洲国产三级在线| 视频在线观看一区二区三区| 日本aⅴ精品一区二区三区| 日本91福利区| 久久99精品久久久久| 国产一区在线精品| 国产成人精品www牛牛影视| 成人免费观看av| 99麻豆久久久国产精品免费| 91黄色在线观看| 7777精品伊人久久久大香线蕉完整版| 欧美老女人在线| 欧美成人女星排名| 久久九九全国免费| 亚洲欧美视频在线观看| 丝袜美腿亚洲色图| 久久99精品一区二区三区三区| 国产麻豆精品久久一二三| 成人av动漫在线| 欧美羞羞免费网站| 日韩精品一区二区三区视频播放 | 自拍视频在线观看一区二区| 亚洲mv在线观看| 九色综合狠狠综合久久| 不卡欧美aaaaa| 在线观看日韩国产| 91精品国产综合久久精品| 久久久高清一区二区三区| 亚洲欧美日韩中文播放 | 国产亚洲欧美中文| 亚洲日本在线观看| 婷婷夜色潮精品综合在线| 9191成人精品久久| 欧美韩国日本综合| 午夜久久久久久电影| 国产一区美女在线| 欧美日韩一级片网站| 久久精品亚洲一区二区三区浴池 | 日韩电影免费在线| 成人精品视频网站| 91麻豆精品国产自产在线| 国产精品妹子av| 麻豆精品视频在线观看免费| 丁香天五香天堂综合| 色av综合在线| 91丨九色丨尤物| 欧美另类videos死尸| 久久网站热最新地址| 亚洲欧美国产77777| 天天色天天爱天天射综合| 日本中文字幕一区二区视频| 国产成人免费在线| 99re免费视频精品全部| 欧美日韩国产一级片| 日韩免费在线观看| 欧美激情一区二区三区全黄| 亚洲一区二区免费视频| 国产精品综合一区二区三区| 欧美疯狂做受xxxx富婆| 国产精品青草综合久久久久99| 亚洲午夜久久久久| 一区二区三区欧美视频| 国产一区二区精品久久| 欧美日韩国产免费一区二区| 亚洲欧洲中文日韩久久av乱码| 亚洲妇女屁股眼交7| 91原创在线视频| 精品日产卡一卡二卡麻豆| 一区二区三区资源| 韩国中文字幕2020精品| 欧美午夜宅男影院| 亚洲一级二级在线| 日本韩国精品一区二区在线观看| 亚洲人成小说网站色在线 | 国产欧美精品区一区二区三区| 中文字幕一区av| 奇米色一区二区| 在线观看免费成人| 亚洲日本在线看| 国产精品77777竹菊影视小说| 4438x亚洲最大成人网| 亚洲同性gay激情无套| 国精品**一区二区三区在线蜜桃| 在线不卡的av| 日韩一区欧美小说| 成人黄色小视频| 国产亚洲婷婷免费| 国产专区综合网| 日韩一区二区三区三四区视频在线观看| 亚洲欧美一区二区三区国产精品| 91亚洲永久精品| 国产精品高清亚洲| 国产馆精品极品| 亚洲精品在线电影| 三级久久三级久久| 欧美日韩一级黄| 亚洲一级二级三级| 色吧成人激情小说| 日韩精品一二三四| 欧美三级中文字| 亚洲不卡av一区二区三区| 丁香亚洲综合激情啪啪综合| 亚洲婷婷综合久久一本伊一区| 懂色av中文一区二区三区 | 久久久精品日韩欧美| 有码一区二区三区| 欧美日韩的一区二区| 日韩美女视频19| 亚洲va欧美va人人爽午夜| 免费观看一级欧美片| 懂色av一区二区三区蜜臀| 欧美国产一区二区在线观看 | 国产亚洲va综合人人澡精品| 美女诱惑一区二区| 欧美精品一区二区在线播放| 五月天精品一区二区三区| 久久新电视剧免费观看|