正在加载图片...
942 Appendix B #define LMIN(a,b)(lminarg1=(a),lminarg2=(b),(lminarg1)<(Iminarg2)? (lminarg1):(lminarg2)) static int imaxarg1,imaxarg2; #define IMAX(a,b)(imaxarg1=(a),imaxarg2=(b),(imaxarg1)>(imaxarg2)?\ (imaxarg1):(imaxarg2)) static int iminarg1,iminarg2; #define IMIN(a,b)(iminarg1=(a),iminarg2=(b),(iminarg1)<(iminarg2)?\ (iminarg1):(iminarg2)) #define SIGN(a,b)((b)>=0.0 fabs(a):-fabs(a)) http://www.nr. readable files Permission is #if defined(__STDC__)II defined(ANSI)II defined(NRANSI)/ANSI/ void nrerror(char error_text[]); granted fori float *vector(long nl,long nh); int *ivector(long nl,long nh); unsigned char *cvector(long nl,long nh); .com or call 1-800-872- (including this one) internet unsigned long *lvector(long nl,long nh); double *dvector(long nl,long nh); float **matrix(long nrl,long nrh,long ncl,long nch); double **dmatrix(long nrl,long nrh,long ncl,long nch); int **imatrix(long nrl,long nrh,long ncl,long nch); float **submatrix(float *a, long oldrl,long oldrh,long oldcl,long oldch, long newrl,long newcl); 7423 (North America to any server computer, float **convert_matrix(float *a,long nrl,long nrh,long ncl,long nch); t users to make one paper float ***f3tensor(long nrl,long nrh,long ncl,long nch,long ndl,long ndh); 1988-1992 by Cambridge University Press.Programs from NUMERICAL RECIPES IN THE 是 ART void free_vector(float *v,long nl,long nh); void free_ivector(int *v,long nl,long nh); void free_cvector(unsigned char *v,long nl,long nh); void free_lvector(unsigned long *v,long nl,long nh); void free_dvector(double tv,long nl,long nh); void free_matrix(float **m,long nrl,long nrh,long ncl,long nch); email void free_dmatrix(double **m,long nrl,long nrh,long ncl,long nch); void free_imatrix(int **m,long nrl,long nrh,long ncl,long nch); void free_submatrix(float **b,long nrl,long nrh,long ncl,long nch); void free_convert_matrix(float **b,long nrl,long nrh,long ncl,long nch); void free_f3tensor(float ***t,long nrl,long nrh,long ncl,long nch, long ndl,long ndh); OF SCIENTIFIC COMPUTING (ISBN 0-521 #else /ANSI /traditional-K&R * void nrerror(); float *vector(); personaluse.Further reproduction,or 1988-1992 by Numerical Recipes Rest of traditional declarations are here on the diskette. -431085 #endif /ANSI #endif /*_NR_UTILS_H*/ @cambridge.org(outside North America). a加w9 Software. ying of And here is nrutil.c: machine #include <stdio.h> #include <stddef.h> #include <stdlib.h> #define NR_END 1 #define FREE_ARG char* void nrerror(char error_text[]) /Numerical Recipes standard error handler *942 Appendix B 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). #define LMIN(a,b) (lminarg1=(a),lminarg2=(b),(lminarg1) < (lminarg2) ?\ (lminarg1) : (lminarg2)) static int imaxarg1,imaxarg2; #define IMAX(a,b) (imaxarg1=(a),imaxarg2=(b),(imaxarg1) > (imaxarg2) ?\ (imaxarg1) : (imaxarg2)) static int iminarg1,iminarg2; #define IMIN(a,b) (iminarg1=(a),iminarg2=(b),(iminarg1) < (iminarg2) ?\ (iminarg1) : (iminarg2)) #define SIGN(a,b) ((b) >= 0.0 ? fabs(a) : -fabs(a)) #if defined(__STDC__) || defined(ANSI) || defined(NRANSI) /* ANSI */ void nrerror(char error_text[]); float *vector(long nl, long nh); int *ivector(long nl, long nh); unsigned char *cvector(long nl, long nh); unsigned long *lvector(long nl, long nh); double *dvector(long nl, long nh); float **matrix(long nrl, long nrh, long ncl, long nch); double **dmatrix(long nrl, long nrh, long ncl, long nch); int **imatrix(long nrl, long nrh, long ncl, long nch); float **submatrix(float **a, long oldrl, long oldrh, long oldcl, long oldch, long newrl, long newcl); float **convert_matrix(float *a, long nrl, long nrh, long ncl, long nch); float ***f3tensor(long nrl, long nrh, long ncl, long nch, long ndl, long ndh); void free_vector(float *v, long nl, long nh); void free_ivector(int *v, long nl, long nh); void free_cvector(unsigned char *v, long nl, long nh); void free_lvector(unsigned long *v, long nl, long nh); void free_dvector(double *v, long nl, long nh); void free_matrix(float **m, long nrl, long nrh, long ncl, long nch); void free_dmatrix(double **m, long nrl, long nrh, long ncl, long nch); void free_imatrix(int **m, long nrl, long nrh, long ncl, long nch); void free_submatrix(float **b, long nrl, long nrh, long ncl, long nch); void free_convert_matrix(float **b, long nrl, long nrh, long ncl, long nch); void free_f3tensor(float ***t, long nrl, long nrh, long ncl, long nch, long ndl, long ndh); #else /* ANSI */ /* traditional - K&R */ void nrerror(); float *vector(); Rest of traditional declarations are here on the diskette. #endif /* ANSI */ #endif /* _NR_UTILS_H_ */ And here is nrutil.c: #include <stdio.h> #include <stddef.h> #include <stdlib.h> #define NR_END 1 #define FREE_ARG char* void nrerror(char error_text[]) /* Numerical Recipes standard error handler */ {
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有