File: debug-Map.C

package info (click to toggle)
magnus 20060324-3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 19,404 kB
  • ctags: 20,466
  • sloc: cpp: 130,118; ansic: 37,076; tcl: 10,970; perl: 1,109; makefile: 963; sh: 403; yacc: 372; csh: 57; awk: 33; asm: 10
file content (121 lines) | stat: -rw-r--r-- 1,841 bytes parent folder | download | duplicates (3)
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
117
118
119
120
121
// Copyright (C) 1994 The New York Group Theory Cooperative
// See magnus/doc/COPYRIGHT for the full notice.

// Contents:
//
// Principal Author: Stephane Collart
//
// Status:
//
// Revision History:
//

#include "Map.h"

//#include "FreeGroup.h"

//#include <iostream.h>


main ( ) {

/*

int i;

FreeGroup F;

Map f(F,F);

cout << f;

F = FreeGroup(3);

f = Map(F,F);

cout << endl << f;

VectorOf<Word> vw(3);

f.setGeneratingImages(vw);

cout << endl << endl << f;

cout << endl << endl << f.composeAfter(f);

f = composition(f,f);

cout << endl << endl << f;

vw[0] = Generator(2); vw[1] = Generator(3); vw[2] = Generator(1);

Map g(F,F,vw);

cout << endl << endl << g;

cout << endl << endl << composition(g,g);

for (i = 1; i<=3; i++)
	g(Generator(i)) = g(Generator(i)) * g(Generator(i % 3 + 1));

cout << endl << endl << g;

cout << endl << endl;

for (i = 1; i<=3; i++) cout << endl << Generator(i) << " |-> "
	<< g(Generator(i));

cout << endl << endl << (g | g);

cout << endl << g.extendsToHom();

*/


  cerr << "\n\nEnter the domain, e.g.,\n";
  cerr << "  <x,y;x^2=y^3>\n" << endl;
  
  FPGroup G;
  
  Chars errMesg = cin >> G;
  
  if ( errMesg.length() > 0 ) {
    cerr << errMesg << endl << endl;
    exit;
  }
  
  cerr << "\n\nYou entered:\n";
  cerr << G << endl << endl;

  cerr << "\n\nEnter the range\n";
  cerr << "  <a,b;[a,b]>\n" << endl;
  
  FPGroup H;
  
  errMesg = cin >> H;
  
  if ( errMesg.length() > 0 ) {
    cerr << errMesg << endl << endl;
    exit;
  }
  
  cerr << "\n\nYou entered:\n";
  cerr << H << endl << endl;


  cerr << "\n\nEnter a map, e.g.,\n";
  cerr << "  { x -> a^2, y -> b }\n" << endl;
  
  Map m(G,H);
  
  errMesg = cin >> m;
  
  if ( errMesg.length() > 0 ) {
    cerr << errMesg << endl << endl;
    exit;
  }
  
  cerr << "\n\nYou entered:\n";
  cerr << m << endl << endl;

}