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

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

?? lmmin.c

?? Levenberg-Marquardt最小二乘擬合
?? C
?? 第 1 頁 / 共 3 頁
字號:
		wa1[i] -= r[j * ldr + i] * wa1[j];	}	temp = lm_enorm(n, wa1);	parc = fp / delta / temp / temp;        /** depending on the sign of the function, update parl or paru. **/	if (fp > 0)	    parl = MAX(parl, *par);	else if (fp < 0)	    paru = MIN(paru, *par);	/* the case fp==0 is precluded by the break condition  */                /** compute an improved estimate for par. **/        	*par = MAX(parl, *par + parc);            }} /*** lm_lmpar. ***/void lm_qrfac(int m, int n, double *a, int pivot, int *ipvt,	      double *rdiag, double *acnorm, double *wa){/* *     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 zeroes in the first k-1 positions. The form of *     this transformation and the method of pivoting first *     appeared in the corresponding linpack subroutine. * *     Parameters: * *	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). * *	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. This array *	  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. * *	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. * */    int i, j, k, kmax, minmn;    double ajnorm, sum, temp;    static double p05 = 0.05;/*** qrfac: compute initial column norms and initialize several arrays. ***/    for (j = 0; j < n; j++) {	acnorm[j] = lm_enorm(m, &a[j * m]);	rdiag[j] = acnorm[j];	wa[j] = rdiag[j];	if (pivot)	    ipvt[j] = j;    }#if BUG    printf("qrfac\n");#endif/*** qrfac: reduce a to r with householder transformations. ***/    minmn = MIN(m, n);    for (j = 0; j < minmn; j++) {	if (!pivot)	    goto pivot_ok;        /** bring the column of largest norm into the pivot position. **/	kmax = j;	for (k = j + 1; k < n; k++)	    if (rdiag[k] > rdiag[kmax])		kmax = k;	if (kmax == j)	    goto pivot_ok;	for (i = 0; i < m; i++) {	    temp = a[j * m + i];	    a[j * m + i] = a[kmax * m + i];	    a[kmax * m + i] = temp;	}	rdiag[kmax] = rdiag[j];	wa[kmax] = wa[j];	k = ipvt[j];	ipvt[j] = ipvt[kmax];	ipvt[kmax] = k;      pivot_ok:        /** compute the Householder transformation to reduce the            j-th column of a to a multiple of the j-th unit vector. **/	ajnorm = lm_enorm(m - j, &a[j * m + j]);	if (ajnorm == 0.) {	    rdiag[j] = 0;	    continue;	}	if (a[j * m + j] < 0.)	    ajnorm = -ajnorm;	for (i = j; i < m; i++)	    a[j * m + i] /= ajnorm;	a[j * m + j] += 1;        /** apply the transformation to the remaining columns            and update the norms. **/	for (k = j + 1; k < n; k++) {	    sum = 0;	    for (i = j; i < m; i++)		sum += a[j * m + i] * a[k * m + i];	    temp = sum / a[j + m * j];	    for (i = j; i < m; i++)		a[k * m + i] -= temp * a[j * m + i];	    if (pivot && rdiag[k] != 0.) {		temp = a[m * k + j] / rdiag[k];		temp = MAX(0., 1 - temp * temp);		rdiag[k] *= sqrt(temp);		temp = rdiag[k] / wa[k];		if (p05 * SQR(temp) <= LM_MACHEP) {		    rdiag[k] = lm_enorm(m - j - 1, &a[m * k + j + 1]);		    wa[k] = rdiag[k];		}	    }	}	rdiag[j] = -ajnorm;    }}void lm_qrsolv(int n, double *r, int ldr, int *ipvt, double *diag,	       double *qtb, double *x, double *sdiag, double *wa){/* *     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  and  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. * *     Parameters * *	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. * */    int i, kk, j, k, nsing;    double qtbpj, sum, temp;    double _sin, _cos, _tan, _cot; /* local variables, not functions */    static double p25 = 0.25;    static double p5 = 0.5;/*** qrsolv: copy r and (q transpose)*b to preserve input and initialize s.     in particular, save the diagonal elements of r in x. ***/    for (j = 0; j < n; j++) {	for (i = j; i < n; i++)	    r[j * ldr + i] = r[i * ldr + j];	x[j] = r[j * ldr + j];	wa[j] = qtb[j];    }#if BUG    printf("qrsolv\n");#endif/*** qrsolv: eliminate the diagonal matrix d using a givens rotation. ***/    for (j = 0; j < n; j++) {/*** qrsolv: prepare the row of d to be eliminated, locating the     diagonal element using p from the qr factorization. ***/	if (diag[ipvt[j]] == 0.)	    goto L90;	for (k = j; k < n; k++)	    sdiag[k] = 0.;	sdiag[j] = diag[ipvt[j]];/*** qrsolv: the transformations to eliminate the row of d modify only      a single element of (q transpose)*b beyond the first n, which is     initially 0.. ***/	qtbpj = 0.;	for (k = j; k < n; k++) {            /** determine a givens rotation which eliminates the                appropriate element in the current row of d. **/	    if (sdiag[k] == 0.)		continue;	    kk = k + ldr * k;	    if (fabs(r[kk]) < fabs(sdiag[k])) {		_cot = r[kk] / sdiag[k];		_sin = p5 / sqrt(p25 + p25 * SQR(_cot));		_cos = _sin * _cot;	    } else {		_tan = sdiag[k] / r[kk];		_cos = p5 / sqrt(p25 + p25 * SQR(_tan));		_sin = _cos * _tan;	    }            /** compute the modified diagonal element of r and                the modified element of ((q transpose)*b,0). **/	    r[kk] = _cos * r[kk] + _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. **/	    for (i = k + 1; i < n; i++) {		temp = _cos * r[k * ldr + i] + _sin * sdiag[i];		sdiag[i] = -_sin * r[k * ldr + i] + _cos * sdiag[i];		r[k * ldr + i] = temp;	    }	}      L90:        /** store the diagonal element of s and restore            the corresponding diagonal element of r. **/	sdiag[j] = r[j * ldr + j];	r[j * ldr + j] = x[j];    }/*** qrsolv: solve the triangular system for z. if the system is     singular, then obtain a least squares solution. ***/    nsing = n;    for (j = 0; j < n; j++) {	if (sdiag[j] == 0. && nsing == n)	    nsing = j;	if (nsing < n)	    wa[j] = 0;    }    for (j = nsing - 1; j >= 0; j--) {	sum = 0;	for (i = j + 1; i < nsing; i++)	    sum += r[j * ldr + i] * wa[i];	wa[j] = (wa[j] - sum) / sdiag[j];    }/*** qrsolv: permute the components of z back to components of x. ***/    for (j = 0; j < n; j++)	x[ipvt[j]] = wa[j];} /*** lm_qrsolv. ***/double lm_enorm(int n, double *x){/*     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, LM_SQRT_DWARF and LM_SQRT_GIANT. The main *     restrictions on these constants are that LM_SQRT_DWARF**2 not *     underflow and LM_SQRT_GIANT**2 not overflow. * *     Parameters * *	n is a positive integer input variable. * *	x is an input array of length n. */    int i;    double agiant, s1, s2, s3, xabs, x1max, x3max, temp;    s1 = 0;    s2 = 0;    s3 = 0;    x1max = 0;    x3max = 0;    agiant = LM_SQRT_GIANT / ((double) n);    /** sum squares. **/    for (i = 0; i < n; i++) {	xabs = fabs(x[i]);	if (xabs > LM_SQRT_DWARF && xabs < agiant) {            /*  sum for intermediate components. */	    s2 += xabs * xabs;	    continue;	}	if (xabs > LM_SQRT_DWARF) {            /*  sum for large components. */	    if (xabs > x1max) {		temp = x1max / xabs;		s1 = 1 + s1 * SQR(temp);		x1max = xabs;	    } else {		temp = xabs / x1max;		s1 += SQR(temp);	    }	    continue;	}        /*  sum for small components. */	if (xabs > x3max) {	    temp = x3max / xabs;	    s3 = 1 + s3 * SQR(temp);	    x3max = xabs;	} else {	    if (xabs != 0.) {		temp = xabs / x3max;		s3 += SQR(temp);	    }	}    }    /** calculation of norm. **/    if (s1 != 0)	return x1max * sqrt(s1 + (s2 / x1max) / x1max);    if (s2 != 0) {	if (s2 >= x3max)	    return sqrt(s2 * (1 + (x3max / s2) * (x3max * s3)));	else	    return sqrt(x3max * ((s2 / x3max) + (x3max * s3)));    }    return x3max * sqrt(s3);} /*** lm_enorm. ***/

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美丝袜丝交足nylons图片| 精品视频免费看| 一片黄亚洲嫩模| 日韩小视频在线观看专区| 国产一区二区影院| 亚洲女性喷水在线观看一区| 欧美日韩国产色站一区二区三区| 麻豆91小视频| 亚洲欧美激情视频在线观看一区二区三区| www.欧美精品一二区| 亚洲一区在线观看免费| 久久久www免费人成精品| 91同城在线观看| 久久国产福利国产秒拍| 久久久99久久| 欧美视频在线观看一区| 成人综合在线网站| 日日噜噜夜夜狠狠视频欧美人| 国产欧美视频一区二区三区| www.亚洲色图| 国产自产v一区二区三区c| 亚洲综合成人在线| 在线电影欧美成精品| jizz一区二区| 狠狠色综合播放一区二区| 夜夜操天天操亚洲| 国产精品乱码久久久久久| 欧美日韩视频不卡| 99久久国产综合色|国产精品| 麻豆国产精品777777在线| 欧美日韩亚洲综合| 日本美女一区二区三区视频| 亚洲国产另类av| 一区二区三区蜜桃网| 一区二区三区四区视频精品免费 | 日韩亚洲欧美中文三级| 欧美日韩国产在线观看| 欧美中文字幕一区二区三区| 色8久久精品久久久久久蜜| 色婷婷av一区二区三区软件 | 免费成人在线观看| 免费在线欧美视频| 国内精品久久久久影院薰衣草 | 亚洲免费观看视频| 亚洲综合激情网| 亚洲成人第一页| 日日夜夜一区二区| 久久精品国产成人一区二区三区| 久久成人免费日本黄色| 国产美女精品在线| 成人黄色软件下载| 色综合久久中文综合久久97| 欧美亚洲综合在线| 欧美一级午夜免费电影| 亚洲精品在线电影| 国产精品麻豆网站| 亚洲午夜av在线| 久久99在线观看| 成人高清在线视频| 91福利在线播放| 91精品欧美综合在线观看最新 | 国产精品三级在线观看| 亚洲视频一二区| 亚洲va欧美va人人爽午夜| 免费观看日韩电影| 成人性生交大片免费看在线播放| 91丨九色丨蝌蚪富婆spa| 欧美日韩一区二区三区四区| 欧美成人一级视频| 一区精品在线播放| 视频在线在亚洲| 国产精品亚洲综合一区在线观看| 91麻豆国产精品久久| 777午夜精品免费视频| 久久久777精品电影网影网| 亚洲精品精品亚洲| 强制捆绑调教一区二区| 高清不卡在线观看| 69精品人人人人| 国产精品乱码一区二三区小蝌蚪| 亚洲va国产va欧美va观看| 国产精品88888| 欧美色手机在线观看| 久久久久9999亚洲精品| 亚洲成人手机在线| 粉嫩一区二区三区性色av| 欧美性猛片xxxx免费看久爱| 国产亚洲一区字幕| 亚洲mv大片欧洲mv大片精品| 国产xxx精品视频大全| 欧美男生操女生| 一区在线播放视频| 国产一区二区三区香蕉 | 欧美三级欧美一级| 国产拍欧美日韩视频二区| 日韩国产欧美在线播放| 99视频精品在线| 欧美videossexotv100| 一区二区三区丝袜| 懂色av中文字幕一区二区三区| 欧美精品乱人伦久久久久久| 中文字幕亚洲精品在线观看| 国产一区中文字幕| 666欧美在线视频| 一区二区理论电影在线观看| 国产精品白丝jk黑袜喷水| 欧美一区二区三区四区五区| ...中文天堂在线一区| 国产精品一区二区在线看| 欧美久久一二三四区| 中文字幕一区免费在线观看| 国产久卡久卡久卡久卡视频精品| 欧美一区二区在线看| 亚洲国产综合在线| 91国产丝袜在线播放| 亚洲欧洲精品成人久久奇米网| 国产一区 二区| 欧美成人aa大片| 秋霞成人午夜伦在线观看| 欧美天堂一区二区三区| 亚洲免费伊人电影| 91亚洲国产成人精品一区二三| 欧美国产日本视频| 成人免费毛片片v| 国产精品欧美一区二区三区| 国产老肥熟一区二区三区| 久久新电视剧免费观看| 久久av老司机精品网站导航| 日韩一级大片在线观看| 蜜臀精品久久久久久蜜臀 | 亚洲男同1069视频| 91亚洲精品乱码久久久久久蜜桃| 国产精品人成在线观看免费| 国产精品一二三| 亚洲国产成人午夜在线一区| 风流少妇一区二区| 国产亚洲精品中文字幕| 国产mv日韩mv欧美| 欧美激情一二三区| 91亚洲国产成人精品一区二区三| 亚洲欧美日韩一区二区 | 欧美乱妇23p| 日韩成人免费看| 精品福利二区三区| 国产传媒久久文化传媒| 国产精品久久福利| 91黄视频在线| 青青草国产成人99久久| 久久一留热品黄| 成人午夜大片免费观看| 亚洲色图欧洲色图| 在线观看av一区二区| 青青草97国产精品免费观看 | 亚洲尤物在线视频观看| 欧美日韩国产不卡| 另类小说图片综合网| 国产视频一区二区在线观看| 波多野结衣中文字幕一区| 亚洲免费观看高清完整版在线观看 | 欧美电影在哪看比较好| 国内精品国产成人国产三级粉色| 国产精品情趣视频| 欧美日韩一区二区三区视频| 日本成人中文字幕在线视频| 久久综合九色欧美综合狠狠| 99亚偷拍自图区亚洲| 午夜成人免费视频| 国产日韩精品一区二区三区| 91极品视觉盛宴| 极品瑜伽女神91| 亚洲精品免费在线| 91精品国产欧美一区二区成人| 国产精品1区二区.| 亚洲午夜在线电影| 久久久久综合网| 色综合久久久久久久久| 老司机午夜精品99久久| 中文字幕在线播放不卡一区| 91精品国产麻豆国产自产在线| 国产成人亚洲综合a∨婷婷图片| 亚洲一级二级三级在线免费观看| 精品国产91亚洲一区二区三区婷婷| 91麻豆成人久久精品二区三区| 奇米影视7777精品一区二区| 中文字幕亚洲在| 欧美电影免费观看高清完整版在线观看| 成人国产精品免费观看视频| 欧美aa在线视频| 亚洲欧美日韩国产成人精品影院| 日韩视频一区二区在线观看| 91蝌蚪porny| 国产精品羞羞答答xxdd| 日韩成人免费看| 亚洲黄色av一区| 国产日韩欧美激情| 日韩一区二区电影网| 欧美色图片你懂的| 成人av在线播放网址| 国产一区91精品张津瑜| 日本不卡一二三|