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

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

?? lm.f90

?? 開發的lm算法,很有用的一種優化算法. 對非線性優化有很大用處
?? F90
?? 第 1 頁 / 共 5 頁
字號:
INTEGER, INTENT(IN)        :: ipvt(:)
REAL (dp), INTENT(IN)      :: diag(:)
REAL (dp), INTENT(IN)      :: qtb(:)
REAL (dp), INTENT(IN)      :: delta
REAL (dp), INTENT(OUT)     :: par
REAL (dp), INTENT(OUT)     :: x(:)
REAL (dp), INTENT(OUT)     :: sdiag(:)

!  **********

!  subroutine lmpar

!  Given an m by n matrix a, an n by n nonsingular diagonal matrix d,
!  an m-vector b, and a positive number delta, the problem is to determine a
!  value for the parameter par such that if x solves the system

!        a*x = b ,     sqrt(par)*d*x = 0 ,

!  in the least squares sense, and dxnorm is the euclidean
!  norm of d*x, then either par is zero and

!        (dxnorm-delta) <= 0.1*delta ,

!  or par is positive and

!        abs(dxnorm-delta) <= 0.1*delta .

!  This subroutine completes the solution of the problem if it is provided
!  with the necessary information from the r factorization, with column
!  qpivoting, 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 lmpar expects the full upper
!  triangle of r, the permutation matrix p, and the first n components of
!  (q transpose)*b.
!  On output lmpar also provides an upper triangular matrix s such that

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

!  s is employed within lmpar and may be of separate interest.

!  Only a few iterations are generally needed for convergence of the algorithm.
!  If, however, the limit of 10 iterations is reached, then the output par
!  will contain the best value obtained so far.

!  the subroutine statement is

!    subroutine lmpar(n,r,ldr,ipvt,diag,qtb,delta,par,x,sdiag, wa1,wa2)

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

!    delta is a positive input variable which specifies an upper
!      bound on the euclidean norm of d*x.

!    par is a nonnegative variable. on input par contains an
!      initial estimate of the levenberg-marquardt parameter.
!      on output par contains the final estimate.

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

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

!    wa1 and wa2 are work arrays of length n.

!  subprograms called

!    minpack-supplied ... dpmpar,enorm,qrsolv

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

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

!  **********
INTEGER   :: iter, j, jm1, jp1, k, l, nsing
REAL (dp) :: dxnorm, dwarf, fp, gnorm, parc, parl, paru, sum, temp
REAL (dp) :: wa1(n), wa2(n)
REAL (dp), PARAMETER :: p1 = 0.1_dp, p001 = 0.001_dp, zero = 0.0_dp

!     dwarf is the smallest positive magnitude.

dwarf = TINY(zero)

!     compute and store in x the gauss-newton direction. if the
!     jacobian is rank-deficient, obtain a least squares solution.

nsing = n
DO  j = 1, n
  wa1(j) = qtb(j)
  IF (r(j,j) == zero .AND. nsing == n) nsing = j - 1
  IF (nsing < n) wa1(j) = zero
END DO

DO  k = 1, nsing
  j = nsing - k + 1
  wa1(j) = wa1(j)/r(j,j)
  temp = wa1(j)
  jm1 = j - 1
  wa1(1:jm1) = wa1(1:jm1) - r(1:jm1,j)*temp
END DO

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

!     initialize the iteration counter.
!     evaluate the function at the origin, and test
!     for acceptance of the gauss-newton direction.

iter = 0
wa2(1:n) = diag(1:n)*x(1:n)
dxnorm = enorm(n, wa2)
fp = dxnorm - delta
IF (fp <= p1*delta) GO TO 220

!     if the jacobian is not rank deficient, the newton
!     step provides a lower bound, parl, for the zero of
!     the function.  Otherwise set this bound to zero.

parl = zero
IF (nsing < n) GO TO 120
DO  j = 1, n
  l = ipvt(j)
  wa1(j) = diag(l)*(wa2(l)/dxnorm)
END DO
DO  j = 1, n
  sum = DOT_PRODUCT( r(1:j-1,j), wa1(1:j-1) )
  wa1(j) = (wa1(j) - sum)/r(j,j)
END DO
temp = enorm(n,wa1)
parl = ((fp/delta)/temp)/temp

!     calculate an upper bound, paru, for the zero of the function.

120 DO  j = 1, n
  sum = DOT_PRODUCT( r(1:j,j), qtb(1:j) )
  l = ipvt(j)
  wa1(j) = sum/diag(l)
END DO
gnorm = enorm(n,wa1)
paru = gnorm/delta
IF (paru == zero) paru = dwarf/MIN(delta,p1)

!     if the input par lies outside of the interval (parl,paru),
!     set par to the closer endpoint.

par = MAX(par,parl)
par = MIN(par,paru)
IF (par == zero) par = gnorm/dxnorm

!     beginning of an iteration.

150 iter = iter + 1

!        evaluate the function at the current value of par.

IF (par == zero) par = MAX(dwarf, p001*paru)
temp = SQRT(par)
wa1(1:n) = temp*diag(1:n)
CALL qrsolv(n, r, ipvt, wa1, qtb, x, sdiag)
wa2(1:n) = diag(1:n)*x(1:n)
dxnorm = enorm(n, wa2)
temp = fp
fp = dxnorm - delta

!        if the function is small enough, accept the current value
!        of par. also test for the exceptional cases where parl
!        is zero or the number of iterations has reached 10.

IF (ABS(fp) <= p1*delta .OR. parl == zero .AND. fp <= temp  &
    .AND. temp < zero .OR. iter == 10) GO TO 220

!        compute the newton correction.

DO  j = 1, n
  l = ipvt(j)
  wa1(j) = diag(l)*(wa2(l)/dxnorm)
END DO
DO  j = 1, n
  wa1(j) = wa1(j)/sdiag(j)
  temp = wa1(j)
  jp1 = j + 1
  wa1(jp1:n) = wa1(jp1:n) - r(jp1:n,j)*temp
END DO
temp = enorm(n,wa1)
parc = ((fp/delta)/temp)/temp

!        depending on the sign of the function, update parl or paru.

IF (fp > zero) parl = MAX(parl,par)
IF (fp < zero) paru = MIN(paru,par)

!        compute an improved estimate for par.

par = MAX(parl, par+parc)

!        end of an iteration.

GO TO 150

!     termination.

220 IF (iter == 0) par = zero
RETURN

!     last card of subroutine lmpar.

END SUBROUTINE lmpar



SUBROUTINE qrfac(m, n, a, pivot, ipvt, rdiag, acnorm)
 
! Code converted using TO_F90 by Alan Miller
! Date: 1999-12-09  Time: 12:46:17

! N.B. Arguments LDA, LIPVT & WA have been removed.

INTEGER, INTENT(IN)        :: m
INTEGER, INTENT(IN)        :: n
REAL (dp), INTENT(IN OUT)  :: a(:,:)
LOGICAL, INTENT(IN)        :: pivot
INTEGER, INTENT(OUT)       :: ipvt(:)
REAL (dp), INTENT(OUT)     :: rdiag(:)
REAL (dp), INTENT(OUT)     :: acnorm(:)

!  **********

!  subroutine qrfac

!  This subroutine uses Householder transformations with column pivoting
!  (optional) to compute a qr factorization of the m by n matrix a.
!  That is, qrfac determines an orthogonal matrix q, a permutation matrix p,
!  and an upper trapezoidal matrix r with diagonal elements of nonincreasing
!  magnitude, such that a*p = q*r.  The householder transformation for
!  column k, k = 1,2,...,min(m,n), is of the form

!                        t
!        i - (1/u(k))*u*u

!  where u has zeros in the first k-1 positions.  The form of this
!  transformation and the method of pivoting first appeared in the
!  corresponding linpack subroutine.

!  the subroutine statement is

!    subroutine qrfac(m, n, a, lda, pivot, ipvt, lipvt, rdiag, acnorm, wa)

! N.B. 3 of these arguments have been omitted in this version.

!  where

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

!    n is a positive integer input variable set to the number of columns of a.

!    a is an m by n array.  On input a contains the matrix for
!      which the qr factorization is to be computed.  On output
!      the strict upper trapezoidal part of a contains the strict
!      upper trapezoidal part of r, and the lower trapezoidal
!      part of a contains a factored form of q (the non-trivial
!      elements of the u vectors described above).

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

!    pivot is a logical input variable.  If pivot is set true,
!      then column pivoting is enforced.  If pivot is set false,
!      then no column pivoting is done.

!    ipvt is an integer output array of length lipvt.  ipvt
!      defines the permutation matrix p such that a*p = q*r.
!      Column j of p is column ipvt(j) of the identity matrix.
!      If pivot is false, ipvt is not referenced.

!    lipvt is a positive integer input variable.  If pivot is false,
!      then lipvt may be as small as 1.  If pivot is true, then
!      lipvt must be at least n.

!    rdiag is an output array of length n which contains the
!      diagonal elements of r.

!    acnorm is an output array of length n which contains the norms of the
!      corresponding columns of the input matrix a.
!      If this information is not needed, then acnorm can coincide with rdiag.

!    wa is a work array of length n.  If pivot is false, then wa
!      can coincide with rdiag.

!  subprograms called

!    minpack-supplied ... dpmpar,enorm

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

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

!  **********
INTEGER   :: i, j, jp1, k, kmax, minmn
REAL (dp) :: ajnorm, epsmch, sum, temp, wa(n)
REAL (dp), PARAMETER :: one = 1.0_dp, p05 = 0.05_dp, zero = 0.0_dp

!     epsmch is the machine precision.

epsmch = EPSILON(zero)

!     compute the initial column norms and initialize several arrays.

DO  j = 1, n
  acnorm(j) = enorm(m,a(1:,j))
  rdiag(j) = acnorm(j)
  wa(j) = rdiag(j)
  IF (pivot) ipvt(j) = j
END DO

!     Reduce a to r with Householder transformations.

minmn = MIN(m,n)
DO  j = 1, minmn
  IF (.NOT.pivot) GO TO 40
  
!        Bring the column of largest norm into the pivot position.
  
  kmax = j
  DO  k = j, n
    IF (rdiag(k) > rdiag(kmax)) kmax = k
  END DO
  IF (kmax == j) GO TO 40
  DO  i = 1, m
    temp = a(i,j)
    a(i,j) = a(i,kmax)
    a(i,kmax) = temp
  END DO
  rdiag(kmax) = rdiag(j)
  wa(kmax) = wa(j)
  k = ipvt(j)
  ipvt(j) = ipvt(kmax)
  ipvt(kmax) = k
  
!     Compute the Householder transformation to reduce the
!     j-th column of a to a multiple of the j-th unit vector.
  
  40 ajnorm = enorm(m-j+1, a(j:,j))
  IF (ajnorm == zero) CYCLE
  IF (a(j,j) < zero) ajnorm = -ajnorm
  a(j:m,j) = a(j:m,j)/ajnorm
  a(j,j) = a(j,j) + one
  
!     Apply the transformation to the remaining columns and update the norms.
  
  jp1 = j + 1
  DO  k = jp1, n
    sum = DOT_PRODUCT( a(j:m,j), a(j:m,k) )
    temp = sum/a(j,j)
    a(j:m,k) = a(j:m,k) - temp*a(j:m,j)
    IF (.NOT.pivot .OR. rdiag(k) == zero) CYCLE
    temp = a(j,k)/rdiag(k)
    rdiag(k) = rdiag(k)*SQRT(MAX(zero, one-temp**2))
    IF (p05*(rdiag(k)/wa(k))**2 > epsmch) CYCLE
    rdiag(k) = enorm(m-j, a(jp1:,k))
    wa(k) = rdiag(k)
  END DO
  rdiag(j) = -ajnorm
END DO
RETURN

!     last card of subroutine qrfac.

END SUBROUTINE qrfac



SUBROUTINE qrsolv(n, r, ipvt, diag, qtb, x, sdiag)
 
! N.B. Arguments LDR & WA have been removed.

INTEGER, INTENT(IN)        :: n
REAL (dp), INTENT(IN OUT)  :: r(:,:)
INTEGER, INTENT(IN)        :: ipvt(:)
REAL (dp), INTENT(IN)      :: diag(:)
REAL (dp), INTENT(IN)      :: qtb(:)
REAL (dp), INTENT(OUT)     :: x(:)
REAL (dp), INTENT(OUT)     :: sdiag(:)

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲一卡二卡三卡四卡无卡久久| 91丨porny丨最新| 国产乱码精品1区2区3区| 在线亚洲人成电影网站色www| 欧美成人女星排名| 亚洲成a人片综合在线| av在线这里只有精品| xf在线a精品一区二区视频网站| 玉米视频成人免费看| 成人av在线播放网址| 337p日本欧洲亚洲大胆精品| 亚洲成人免费看| 色激情天天射综合网| 成人免费在线视频观看| 国产乱码精品一区二区三区五月婷| 欧美高清激情brazzers| 一区二区三区久久| aaa国产一区| 视频一区二区不卡| 国产成人午夜99999| 欧美一级高清片| 视频一区二区国产| 欧美高清hd18日本| 无码av免费一区二区三区试看| 97久久精品人人做人人爽| 久久婷婷国产综合精品青草| 久久国产麻豆精品| 欧美成人a∨高清免费观看| 天天av天天翘天天综合网| 欧美亚洲综合色| 亚洲国产精品久久艾草纯爱| 91国产丝袜在线播放| 亚洲一区二区视频在线| 欧美性猛片aaaaaaa做受| 亚洲黄一区二区三区| 欧美婷婷六月丁香综合色| 亚洲国产精品影院| 91精品国产综合久久精品图片| 日本不卡一区二区| 欧美成人精品1314www| 国产精品综合一区二区三区| 国产日韩一级二级三级| 成人18视频在线播放| 一区二区三区国产| 制服丝袜亚洲精品中文字幕| 精品一区二区三区在线播放| 久久久久久久电影| 91麻豆国产在线观看| 亚洲国产综合人成综合网站| 欧美一区二区私人影院日本| 老司机精品视频在线| 久久久精品一品道一区| 色综合一个色综合亚洲| 午夜电影一区二区| 久久色视频免费观看| 91老司机福利 在线| 天天av天天翘天天综合网色鬼国产 | 国产精品动漫网站| 色哟哟一区二区| 蜜桃视频在线观看一区| 国产精品美女视频| 欧美亚洲综合在线| 国产精品一区免费在线观看| 日韩一区欧美一区| 日韩一区二区电影| 99国产欧美久久久精品| 捆绑调教美女网站视频一区| 成人免费一区二区三区视频| 337p亚洲精品色噜噜噜| 成人在线一区二区三区| 无码av中文一区二区三区桃花岛| 国产欧美日韩在线看| 欧美日韩三级视频| 99麻豆久久久国产精品免费| 男人的天堂久久精品| 亚洲欧美激情视频在线观看一区二区三区| 91精品国产综合久久久久久| 波多野结衣精品在线| 奇米888四色在线精品| 亚洲视频一二三| 久久久久久久久免费| 欧美一区二区三区四区视频| 91啪亚洲精品| 国产二区国产一区在线观看| 午夜精品久久久久影视| |精品福利一区二区三区| 日韩你懂的在线观看| 在线观看亚洲a| 成人91在线观看| 国产精品乡下勾搭老头1| 蜜臀久久99精品久久久画质超高清| 中文字幕一区二区视频| 国产欧美日本一区视频| 日韩一二三区视频| 91.com在线观看| 在线视频欧美区| 色综合色狠狠综合色| 粉嫩高潮美女一区二区三区| 久久精品国产久精国产| 日韩国产一二三区| 天天综合天天综合色| 亚洲第一精品在线| 夜夜嗨av一区二区三区| 一区二区三区欧美日韩| 亚洲免费看黄网站| 亚洲欧美综合在线精品| 亚洲欧美日韩国产综合| 亚洲天堂免费在线观看视频| 国产精品久久久久久久久快鸭| 欧美激情综合五月色丁香小说| 久久久99精品久久| 国产精品美女视频| 亚洲欧洲色图综合| 亚洲欧美另类久久久精品2019 | 欧美不卡一二三| 欧美精品乱人伦久久久久久| 欧美日韩免费视频| 欧美日韩视频一区二区| 欧美日本乱大交xxxxx| 7777精品伊人久久久大香线蕉的| 在线精品视频一区二区三四| 91黄色激情网站| 欧美久久久久久蜜桃| 欧美伦理视频网站| 精品日韩一区二区三区免费视频| 精品日韩欧美在线| 国产精品婷婷午夜在线观看| 国产精品色呦呦| 一区二区免费视频| 日韩精品91亚洲二区在线观看 | 久久在线免费观看| 中文字幕不卡三区| 亚洲欧洲精品一区二区精品久久久 | 午夜电影一区二区三区| 麻豆成人免费电影| 国产成人丝袜美腿| 色综合久久久久综合体桃花网| 欧美亚洲日本一区| 欧美成人激情免费网| 国产欧美一区二区精品性色| 亚洲激情六月丁香| 老司机精品视频一区二区三区| 国产99久久久国产精品免费看| 色婷婷综合久久久中文一区二区 | 欧美人与禽zozo性伦| 日韩精品专区在线影院重磅| 国产日韩欧美麻豆| 亚洲午夜一二三区视频| 国内精品第一页| 在线观看91精品国产入口| 日韩一区二区三区电影 | 视频一区中文字幕国产| 国产成人久久精品77777最新版本 国产成人鲁色资源国产91色综 | 精品一区二区三区在线视频| 91老司机福利 在线| 欧美精品一区二区三区久久久| 国产精品久久久久久福利一牛影视 | 国产日韩在线不卡| 亚洲国产精品久久人人爱| 国产河南妇女毛片精品久久久| 欧美性色欧美a在线播放| 久久综合久久久久88| 午夜视频在线观看一区二区| 成人听书哪个软件好| 日韩三级.com| 亚洲电影在线播放| 99re这里只有精品首页| 久久麻豆一区二区| 日本va欧美va精品| 欧美性大战久久久久久久蜜臀| 中文字幕第一区| 国产在线精品一区二区| 欧美理论在线播放| 亚洲欧美另类小说| 国产黄色91视频| 精品粉嫩aⅴ一区二区三区四区| 亚洲免费观看高清在线观看| 国产精品中文字幕日韩精品| 欧美一区二区三区在线看| 一区二区成人在线观看| 国产69精品久久777的优势| 日韩欧美在线一区二区三区| 亚洲h精品动漫在线观看| 一本一道久久a久久精品综合蜜臀| 久久九九全国免费| 国产一区二区三区免费播放| 日韩欧美成人一区| 免费欧美高清视频| 日韩欧美一级二级三级| 麻豆精品视频在线| 日韩一区二区免费电影| 免费三级欧美电影| 日韩欧美123| 免费高清在线一区| 欧美一级在线视频| 秋霞av亚洲一区二区三| 欧美一区二区精品在线| 蜜桃一区二区三区在线| 日韩一级免费观看| 国内精品写真在线观看|