正在加载图片...
70 Chapter 2.Solution of Linear Algebraic Equations for (jj=1;jj<=m;jj++){ yma[jj][]: z=a[jj][i]; a[jj门[j]=y*c+z*s: a[jj][i]=z*c-y*s; rv1[1]=0.0; rv1[k]=f; [k]=x; http://www.nr. Permission is read able files free_vector(rv1,1,n); .com or call (including this one) granted for 19881992 #include <math.h> #include "nrutil.h" 11-800-872 float pythag(float a,float b) Computes (a)1/2 without destructive underflow or overflow. from NUMERICAL RECIPES IN C: float absa,absb; absa=fabs(a); by Cambridge University Press. absb=fabs(b); to any server computer, -7423(North America uae us THE if (absa absb)return absa*sqrt(1.0+SQR(absb/absa)); else return (absb ==0.0 0.0 absb*sqrt(1.0+SQR(absa/absb))); 是 ART strictly proh Programs (Double precision versions of svdcmp,svbksb,and pythag,named dsvdcmp, dsvbksb,and dpythag,are used by the routine ratlsq in $5.13.You can easily make the conversions,or else get the converted routines from the Numerical Recipes diskette.) to dir ectcustser 1881892 OF SCIENTIFIC COMPUTING(ISBN CITED REFERENCES AND FURTHER READING: Golub,G.H.,and Van Loan,C.F.1989,Matrix Computations,2nd ed.(Baltimore:Johns Hopkins University Press).88.3 and Chapter 12. 10-621 Lawson,C.L.,and Hanson,R.1974,So/ving Least Squares Problems (Englewood Cliffs,NJ: Prentice-Hall),Chapter 18. Numerical Recipes -43108 Forsythe,G.E.,Malcolm,M.A.,and Moler,C.B.1977,Computer Methods for Mathematical Computations (Englewood Cliffs,NJ:Prentice-Hall).Chapter 9.[1] Wilkinson,J.H.,and Reinsch,C.1971,Linear Algebra,vol.Il of Handbook for Automatic Com- (outside putation (New York:Springer-Verlag),Chapter I.10 by G.H.Golub and C.Reinsch.[2] Software. Dongarra,J.J.,et al.1979,LINPACK User's Guide(Philadelphia:S.I.A.M.),Chapter 11.[3] North Smith,B.T.,et al.1976,Matrix Eigensystem Routines-EISPACK Guide,2nd ed.,vol.6 of Lecture Notes in Computer Science (New York:Springer-Verlag). Stoer,J.,and Bulirsch,R.1980,Introduction to Numerica/Analysis(New York:Springer-Verlag). visit website machine 86.7.[4] Golub,G.H.,and Van Loan,C.F.1989,Matrix Computations,2nd ed.(Baltimore:Johns Hopkins University Press),85.2.6.[5]70 Chapter 2. Solution of Linear Algebraic Equations Permission is granted for internet users to make one paper copy for their own personal use. Further reproduction, or any copyin Copyright (C) 1988-1992 by Cambridge University Press. Programs Copyright (C) 1988-1992 by Numerical Recipes Software. Sample page from NUMERICAL RECIPES IN C: THE ART OF SCIENTIFIC COMPUTING (ISBN 0-521-43108-5) g of machine￾readable files (including this one) to any server computer, is strictly prohibited. To order Numerical Recipes books or CDROMs, visit website http://www.nr.com or call 1-800-872-7423 (North America only), or send email to directcustserv@cambridge.org (outside North America). for (jj=1;jj<=m;jj++) { y=a[jj][j]; z=a[jj][i]; a[jj][j]=y*c+z*s; a[jj][i]=z*c-y*s; } } rv1[l]=0.0; rv1[k]=f; w[k]=x; } } free_vector(rv1,1,n); } #include <math.h> #include "nrutil.h" float pythag(float a, float b) Computes (a2 + b2)1/2 without destructive underflow or overflow. { float absa,absb; absa=fabs(a); absb=fabs(b); if (absa > absb) return absa*sqrt(1.0+SQR(absb/absa)); else return (absb == 0.0 ? 0.0 : absb*sqrt(1.0+SQR(absa/absb))); } (Double precision versions of svdcmp, svbksb, and pythag, named dsvdcmp, dsvbksb, and dpythag, are used by the routine ratlsq in §5.13. You can easily make the conversions, or else get the converted routines from the Numerical Recipes diskette.) CITED REFERENCES AND FURTHER READING: Golub, G.H., and Van Loan, C.F. 1989, Matrix Computations, 2nd ed. (Baltimore: Johns Hopkins University Press), §8.3 and Chapter 12. Lawson, C.L., and Hanson, R. 1974, Solving Least Squares Problems (Englewood Cliffs, NJ: Prentice-Hall), Chapter 18. Forsythe, G.E., Malcolm, M.A., and Moler, C.B. 1977, Computer Methods for Mathematical Computations (Englewood Cliffs, NJ: Prentice-Hall), Chapter 9. [1] Wilkinson, J.H., and Reinsch, C. 1971, Linear Algebra, vol. II of Handbook for Automatic Com￾putation (New York: Springer-Verlag), Chapter I.10 by G.H. Golub and C. Reinsch. [2] Dongarra, J.J., et al. 1979, LINPACK User’s Guide (Philadelphia: S.I.A.M.), Chapter 11. [3] Smith, B.T., et al. 1976, Matrix Eigensystem Routines — EISPACK Guide, 2nd ed., vol. 6 of Lecture Notes in Computer Science (New York: Springer-Verlag). Stoer, J., and Bulirsch, R. 1980, Introduction to Numerical Analysis (New York: Springer-Verlag), §6.7. [4] Golub, G.H., and Van Loan, C.F. 1989, Matrix Computations, 2nd ed. (Baltimore: Johns Hopkins University Press), §5.2.6. [5]
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有