revrse.c
来自「http://www.math.tu-berlin.de/~bolle/SPAR」· C语言 代码 · 共 23 行
C
23 行
#include <sparspak.h>/*****************************************************************************//* 'revrse' flips the components of the vector 'v', the number of components *//* of 'v' is 'nv'. This function is cited in the SPARSPAK functions 'gennd', *//* 'gen1wd' but it is not included in the source code. *//* in C, 'v' has subscripts 0,1,2,...,*nv-1. *//*****************************************************************************/void revrse(int *nv, int *v){ int dummy, i=*nv/2; while (i) { /* exchange entries */ dummy =v[i-1]; v[i-1] =v[*nv-i]; v[*nv-i]=dummy; i--; } /* end while */} /* end revrse */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?