正在加载图片...
Utility Routines (nrutil.c) 943 fprintf(stderr,"Numerical Recipes run-time error...\n"); fprintf(stderr,"%s\n",error_text); fprintf(stderr,"...now exiting to system...\n"); exit(1); float *vector(long nl,long nh) /allocate a float vector with subscript range v[nl..nh] float *v; v=(float *)malloc((size_t)((nh-nl+1+NR_END)*sizeof(float))); http://www.nr. Permission is read able files if (!v)nrerror("allocation failure in vector()"); return v-nl+NR_END; .com or call int *ivector(long nl,long nh) /allocate an int vector with subscript range v[nl..nh]*/ 11-800-872 (including this one) granted for i 19881992 int *v; v=(int *)malloc((size_t)((nh-nl+1+NR_END)*sizeof(int))); if (!v)nrerror("allocation failure in ivector()"); return v-nl+NR_END; -7423(North America to any server computer, tusers to make one paper by Cambridge University Press. from NUMERICAL RECIPES IN C: THE unsigned char *cvector(long nl,long nh) allocate an unsigned char vector vith subscript range v[nl..nh]/ unsigned char *v; 是 v=(unsigned char *)malloc((size_t)((nh-nl+1+NR_END)*sizeof(unsigned char))); strictly proh Programs if (!v)nrerror("allocation failure in cvector()"); return v-nl+NR_END; to dir unsigned long *lvector(long nl,long nh) /allocate an unsigned long vector with subscript range v[nl..nh]*/ rectcustser ART OF SCIENTIFIC COMPUTING(ISBN unsigned long *v; v=(unsigned long *)malloc((size_t)((nh-nl+1+NR_END)*sizeof(long))); if (!v)nrerror("allocation failure in lvector()"); v@cambri Numerical Recipes books or 1988-1992 by Numerical Recipes 10-621 return v-nl+NR_END; 43106 double *dvector(long nl,long nh) /allocate a double vector with subscript range v[nl..nh]* double *v; v=(double *)malloc((size_t)((nh-nl+1+NR_END)*sizeof(double))); if (!v)nrerror("allocation failure in dvector()"); (outside North America) Software. return v-nl+NR_END; machine float **matrix(long nrl,long nrh,long ncl,long nch) /allocate a float matrix with subscript range m[nrl..nrh][ncl..nch]* long i,nrow=nrh-nrl+1,ncol=nch-ncl+1; f10at米*m; /allocate pointers to rows * m=(float **malloc((size_t)((nrow+NR_END)*sizeof(float*)));Utility Routines (nrutil.c) 943 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). fprintf(stderr,"Numerical Recipes run-time error...\n"); fprintf(stderr,"%s\n",error_text); fprintf(stderr,"...now exiting to system...\n"); exit(1); } float *vector(long nl, long nh) /* allocate a float vector with subscript range v[nl..nh] */ { float *v; v=(float *)malloc((size_t) ((nh-nl+1+NR_END)*sizeof(float))); if (!v) nrerror("allocation failure in vector()"); return v-nl+NR_END; } int *ivector(long nl, long nh) /* allocate an int vector with subscript range v[nl..nh] */ { int *v; v=(int *)malloc((size_t) ((nh-nl+1+NR_END)*sizeof(int))); if (!v) nrerror("allocation failure in ivector()"); return v-nl+NR_END; } unsigned char *cvector(long nl, long nh) /* allocate an unsigned char vector with subscript range v[nl..nh] */ { unsigned char *v; v=(unsigned char *)malloc((size_t) ((nh-nl+1+NR_END)*sizeof(unsigned char))); if (!v) nrerror("allocation failure in cvector()"); return v-nl+NR_END; } unsigned long *lvector(long nl, long nh) /* allocate an unsigned long vector with subscript range v[nl..nh] */ { unsigned long *v; v=(unsigned long *)malloc((size_t) ((nh-nl+1+NR_END)*sizeof(long))); if (!v) nrerror("allocation failure in lvector()"); return v-nl+NR_END; } double *dvector(long nl, long nh) /* allocate a double vector with subscript range v[nl..nh] */ { double *v; v=(double *)malloc((size_t) ((nh-nl+1+NR_END)*sizeof(double))); if (!v) nrerror("allocation failure in dvector()"); return v-nl+NR_END; } float **matrix(long nrl, long nrh, long ncl, long nch) /* allocate a float matrix with subscript range m[nrl..nrh][ncl..nch] */ { long i, nrow=nrh-nrl+1,ncol=nch-ncl+1; float **m; /* allocate pointers to rows */ m=(float **) malloc((size_t)((nrow+NR_END)*sizeof(float*)));
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有