iamax_noabs1_x0.c
来自「基于Blas CLapck的.用过的人知道是干啥的」· C语言 代码 · 共 28 行
C
28 行
#include "atlas_misc.h"int ATL_UIAMAX(const int N, const TYPE *X, const int incX){ int i, imax=N; register TYPE pmax=0.0, nmax=0.0, x0; if (N < 2) return(0); for(i=N; i; i--, X += incX) { x0 = *X; if (x0 <= pmax && x0 >= nmax) continue; if (x0 > pmax) { nmax = -x0; pmax = x0; imax = i; } else /* if (x0 < nmax) */ { nmax = x0; pmax = -x0; imax = i; } } return(N-imax);}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?