?? print_format.c
字號(hào):
/* *//* FUNCTION NAME : print_matrix() *//* *//* SYNOPSIS : void print_matrix(lr,ur,lc,uc,mat) *//* *//* DESCRIPTION : This function prints a given float matrix, *//* on to the standard output *//* *//* FUNCTIONS CALLED : None *//* *//* CALLING FUNCITONS : main(), *//* optimization(). *//* *//* AUTHOR : Swarnalatha Swaminathan *//* *//* DATE : 1/17/92 *//* *//* *//* REV DATE BY DESCRIPTION *//* --- ---- -- ----------- *//* *//* *//********************************************************************************/void print_matrix(lr, ur, lc, uc, mat) int lr, ur, lc, uc; MATRIX mat;{ int i, j; for (i = lr; i <= ur; i++) { fprintf(output, "\n"); for (j = lc; j <= uc; j++) fprintf(output, "%5.2f\t", mat[i][j]); } fprintf(output, "\n\n");}/********************************************************************************//* *//* FUNCTION NAME : print_population() *//* *//* SYNOPSIS : void print_population(lr,ur,lc,uc,mat) *//* *//* DESCRIPTION : This function prints the initial and final *//* population on to the standard output. *//* *//* FUNCTIONS CALLED : None *//* *//* CALLING FUNCITONS : optimization() *//* *//* AUTHOR : Swarnalatha Swaminathan *//* *//* DATE : 1/17/92 *//* *//* *//* REV DATE BY DESCRIPTION *//* --- ---- -- ----------- *//* A 9/15/92 Tom Logan *//* *//* *//********************************************************************************/void print_population(out, r, c, mat) FILE *out; int r, c; MATRIX mat;{ int i, j; for (i = 1; i <= r; i++) { fprintf(out, "%20.8f", mat[i][0]); for (j = 1; j <= c - 1; j++) { if (((j - 1) % 3 == 0) && (j != 1)) fprintf(out, "\n "); fprintf(out, "%20.8f", mat[i][j]); } fprintf(out, "\n"); }}/********************************************************************************//* *//* FUNCTION NAME : print_vector() *//* *//* SYNOPSIS : void print_vector(arr,l,u) *//* *//* DESCRIPTION : This function prints a given float vector, *//* on to the standard output *//* *//* FUNCTIONS CALLED : None *//* *//* CALLING FUNCITONS : main() *//* *//* AUTHOR : Swarnalatha Swaminathan *//* *//* DATE : 1/17/92 *//* *//* *//* REV DATE BY DESCRIPTION *//* --- ---- -- ----------- *//* *//* *//********************************************************************************/void print_vector(arr, l, u) VECTOR arr; int l, u;{ int i; for (i = l; i <= u; i++) fprintf(output, "%18.8f\t", arr[i]);/* for (i = l; i <= u; i++) printf("%18.8f\t", arr[i]);*/}/********************************************************************************//* *//* FUNCTION NAME : print_ivector() *//* *//* SYNOPSIS : void print_ivector(arr,l,u) *//* *//* DESCRIPTION : This function prints a given integer vector, *//* on to the standard output *//* *//* FUNCTIONS CALLED : None *//* *//* CALLING FUNCITONS : p_equalities() *//* *//* AUTHOR : Swarnalatha Swaminathan *//* *//* DATE : 1/17/92 *//* *//* *//* REV DATE BY DESCRIPTION *//* --- ---- -- ----------- *//* *//* *//********************************************************************************/void print_ivector(arr, l, u) int l, u; IVECTOR arr;{ int i; for (i = l; i <= u; i++) fprintf(output, "%18.8d\t", arr[i]); fprintf(output, "\n\n");}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -