⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 matrix2d.c

📁 NIST Handwriting OCR Testbed
💻 C
字号:
/*# proc: max_2d_addr - locates the maximum integer in a 2d matrix of specified# proc:               dimensions.*/#include <values.h>#include <defs.h>/***************************************************************************//* max_2d_addr - locates the maximum within a 2d matrix of integers,       *//* returning the maximum value and its location within the matrix.         *//***************************************************************************/max_2d_addr(mat_2d, w, h, max_v, mx, my)int *mat_2d, w, h;int *max_v, *mx, *my;{   int x, y;   int *mptr;   mptr = mat_2d;   *max_v = -MAXINT;   *mx = NOT_FOUND;   *my = NOT_FOUND;   for(y = 0; y < h; y++){      for(x = 0; x < w; x++){         if(*mptr > *max_v){            *mx = x;            *my = y;            *max_v = *mptr;         }         mptr++;      }   }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -