正在加载图片...
946 Appendix B t [nrl][ncl]+NR_END t[nrl][ncl]-ndl; for(j=ncl+1;j<=nch;j++)t[nrl][j]=t [nrl][j-1]+ndep; for(i=nrl+1;i<=nrh;i++){ t[i]=t[i-1]+ncol; t[i][ncl]=t[i-1][ncl]+ncol*ndep; for(j=ncl+1;j<=nch;j++)t[i][j]=t[i][j-1]+ndep; /return pointer to array of pointers to rows * return t: http://www.nr read able files void free_vector(float *v,long nl,long nh) /free a float vector allocated with vector()*/ granted fori free((FREE_ARG)(v+nl-NR_END)); .com or call 1-800-872- (including this one) internet void free_ivector(int *v,long nl,long nh) /free an int vector allocated with ivector()*/ free((FREE_ARG)(v+nl-NR_END)); 7423 (North America 电r:1s t tusers to make one paper 1988-1992 by Cambridge University Press.Programs from NUMERICAL RECIPES IN C: THE void free_cvector(unsigned char v,long nl,long nh) free an unsigned char vector allocated with cvector()*/ free((FREE_ARG)(v+nl-NR_END)); only),or void free_lvector(unsigned long *v,long nl,long nh) /free an unsigned long vector allocated with lvector()/ free((FREE_ARG)(v+nl-NR_END)); 2 void free_dvector(double *v,long nl,long nh) /free a double vector allocated with dvector()*/ f free((FREE_ARG)(v+nl-NR_END)); rsend email to directcustserv@cambridge.org ART OF SCIENTIFIC COMPUTING (ISBN 0-521-43108-5) void free_matrix(float **m,long nrl,long nrh,long ncl,long nch) /free a float matrix allocated by matrix()*/ To order Numerical Recipes books or personaluse.Further reproduction,or 1988-1992 by Numerical Recipes free((FREE_ARG)(m[nrl]+ncl-NR_END)); free((FREE_ARG) (m+nr1-NR_END)) void free_dmatrix(double **m,long nrl,long nrh,long ncl,long nch) /free a double matrix allocated by dmatrix()*/ (outside North America) Software. free((FREE_ARG)(m[nrl]+ncl-NR_END)); free((FREE_ARG)(m+nrl-NR_END)); machine void free_imatrix(int **m,long nrl,long nrh,long ncl,long nch) /free an int matrix allocated by imatrix()/ free((FREE_ARG)(m[nrl]+ncl-NR_END)); free((FREE_ARG)(m+nrl-NR_END));946 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). t[nrl][ncl] += NR_END; t[nrl][ncl] -= ndl; for(j=ncl+1;j<=nch;j++) t[nrl][j]=t[nrl][j-1]+ndep; for(i=nrl+1;i<=nrh;i++) { t[i]=t[i-1]+ncol; t[i][ncl]=t[i-1][ncl]+ncol*ndep; for(j=ncl+1;j<=nch;j++) t[i][j]=t[i][j-1]+ndep; } /* return pointer to array of pointers to rows */ return t; } void free_vector(float *v, long nl, long nh) /* free a float vector allocated with vector() */ { free((FREE_ARG) (v+nl-NR_END)); } void free_ivector(int *v, long nl, long nh) /* free an int vector allocated with ivector() */ { free((FREE_ARG) (v+nl-NR_END)); } void free_cvector(unsigned char *v, long nl, long nh) /* free an unsigned char vector allocated with cvector() */ { free((FREE_ARG) (v+nl-NR_END)); } void free_lvector(unsigned long *v, long nl, long nh) /* free an unsigned long vector allocated with lvector() */ { free((FREE_ARG) (v+nl-NR_END)); } void free_dvector(double *v, long nl, long nh) /* free a double vector allocated with dvector() */ { free((FREE_ARG) (v+nl-NR_END)); } void free_matrix(float **m, long nrl, long nrh, long ncl, long nch) /* free a float matrix allocated by matrix() */ { free((FREE_ARG) (m[nrl]+ncl-NR_END)); free((FREE_ARG) (m+nrl-NR_END)); } void free_dmatrix(double **m, long nrl, long nrh, long ncl, long nch) /* free a double matrix allocated by dmatrix() */ { free((FREE_ARG) (m[nrl]+ncl-NR_END)); free((FREE_ARG) (m+nrl-NR_END)); } void free_imatrix(int **m, long nrl, long nrh, long ncl, long nch) /* free an int matrix allocated by imatrix() */ { free((FREE_ARG) (m[nrl]+ncl-NR_END)); free((FREE_ARG) (m+nrl-NR_END)); }
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有