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

📄 invrse.c

📁 http://www.math.tu-berlin.de/~bolle/SPARSPAK/index-e.html
💻 C
字号:
#include <sparspak.h>/*****************************************************************************//* 'invrse' computes the inverse permutation of the permuation vector 'perm',*//* i.e. if 1,2,...,n are mapped onto perm[1],perm[2],...,perm[n], then       *//* invp[perm[1]],invp[perm[2],...,invp[perm[n]] are mapped back to 1,2,...,n *//* In C, 'perm, invp' have SUBSCRIPTS 0,1,2,...,*n-1, while the components of*//* 'perm','invp' have CONTENTS between 1 and *n.                             *//*****************************************************************************/void invrse(int *n, int *perm, int *invp){   int   i;   for (i=0; i<*n; i++)       invp[perm[i]-1]=i+1;} /* end invrse */

⌨️ 快捷键说明

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