/usr/include/rheolef/genrcm.h is in librheolef-dev 5.93-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | #ifndef _GENRCM_H
#define _GENRCM_H
/// This file is part of Rheolef.
///
/// Copyright (C) 2000-2009 Pierre Saramito <Pierre.Saramito@imag.fr>
///
/// Rheolef is free software; you can redistribute it and/or modify
/// it under the terms of the GNU General Public License as published by
/// the Free Software Foundation; either version 2 of the License, or
/// (at your option) any later version.
///
/// Rheolef is distributed in the hope that it will be useful,
/// but WITHOUT ANY WARRANTY; without even the implied warranty of
/// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
/// GNU General Public License for more details.
///
/// You should have received a copy of the GNU General Public License
/// along with Rheolef; if not, write to the Free Software
/// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
///
/// =========================================================================
/* genrcm.f -- translated by f2c (version 19931217).*/
/*****************************************************************/
/*****************************************************************/
/********* GENRCM ..... GENERAL REVERSE CUTHILL MCKEE ********/
/*****************************************************************/
/* PURPOSE - GENRCM FINDS THE REVERSE CUTHILL-MCKEE*/
/* ORDERING FOR A GENERAL GRAPH. FOR EACH CONNECTED*/
/* COMPONENT IN THE GRAPH, GENRCM OBTAINS THE ORDERING*/
/* BY CALLING THE SUBROUTINE RCM.*/
/* INPUT PARAMETERS -*/
/* NEQNS - NUMBER OF EQUATIONS*/
/* (XADJ, ADJNCY) - ARRAY PAIR CONTAINING THE ADJACENCY*/
/* STRUCTURE OF THE GRAPH OF THE MATRIX.*/
/* OUTPUT PARAMETER -*/
/* PERM - VECTOR THAT CONTAINS THE RCM ORDERING.*/
/* WORKING PARAMETERS -*/
/* MASK - IS USED TO MARK VARIABLES THAT HAVE BEEN*/
/* NUMBERED DURING THE ORDERING PROCESS. IT IS*/
/* INITIALIZED TO 1, AND SET TO ZERO AS EACH NODE*/
/* IS NUMBERED.*/
/* XLS - THE INDEX VECTOR FOR A LEVEL STRUCTURE. THE*/
/* LEVEL STRUCTURE IS STORED IN THE CURRENTLY*/
/* UNUSED SPACES IN THE PERMUTATION VECTOR PERM.*/
/* PROGRAM SUBROUTINES -*/
/* FNROOT, RCM.*/
/*****************************************************************/
#include "rheolef/fnroot.h"
#include "rheolef/rcm.h"
namespace rheolef {
template <class Size, class Iterator>
void
genrcm(
Size neqns,
Iterator xadj,
Iterator adjncy,
Iterator perm,
Iterator mask,
Iterator xls)
{
typedef typename std::iterator_traits<Iterator>::value_type Integer;
/* System generated locals */
Integer i__1;
/* Local variables */
static Integer nlvl, root, i, ccsize;
static Integer num;
/* Parameter adjustments */
--xls;
--mask;
--perm;
--adjncy;
--xadj;
i__1 = neqns;
for (i = 1; i <= i__1; ++i) {
mask[i] = 1;
}
num = 1;
i__1 = neqns;
for (i = 1; i <= i__1; ++i) {
/* FOR EACH MASKED CONNECTED COMPONENT ...*/
if (mask[i] == 0) {
goto L200;
}
root = i;
/* FIRST FIND A PSEUDO-PERIPHERAL NODE ROOT.*/
/* NOTE THAT THE LEVEL STRUCTURE FOUND BY*/
/* FNROOT IS STORED STARTING AT PERM(NUM).*/
/* THEN RCM IS CALLED TO ORDER THE COMPONENT*/
/* USING ROOT AS THE STARTING NODE.*/
fnroot(&root, &xadj[1], &adjncy[1], &mask[1], &nlvl, &xls[1], &perm[num]);
rcm(&root, &xadj[1], &adjncy[1], &mask[1], &perm[num], &ccsize, &xls[1]);
num += ccsize;
if (num > neqns) {
return;
}
L200:
;
}
}
}// namespace rheolef
#endif // _GENRCM_H
|