File: translate.c

package info (click to toggle)
magnus 20060324-5.1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 19,436 kB
  • ctags: 20,462
  • sloc: cpp: 130,217; ansic: 37,090; tcl: 10,970; perl: 1,109; makefile: 966; sh: 403; yacc: 372; csh: 57; awk: 33; asm: 10
file content (26 lines) | stat: -rw-r--r-- 773 bytes parent folder | download | duplicates (5)
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
/* File translate.c  */
#include "tc.h"

Void
tc_translate(tc_pvar)
struct  tc_str_vars     *tc_pvar;
{
#include "tc_void.h"
Int	*pt;
Int	i;
Int	k;
/* translate the subgroup generators and group defining relators 
*  from strings in terms of generators and inverses to strings 
*  in terms of their associated column numbers in the coset table.
*/
	for (pt = SUBGROUP_GEN; pt < SUBGROUP_GEN + SGEN_LEN; pt++)
		*pt = GEN_TO_COL[*pt];
	for (i = 1; i <= NDREL; i++) {
                k = RELATORS[RELATOR_INDEX[i]];
                if (RELATOR_LENGTH[i] == 2 && RELATOR_EXPONENT[i] == 2 && GEN_TO_COL[k] == GEN_TO_COL[-k])
                        RELATOR_EXPONENT[i] = -2;
        }
	for (pt = RELATORS; pt < RELATORS + 2 * REL_LEN; pt++)
		*pt = GEN_TO_COL[*pt];
	return;
}