-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdimtable_modp.cc
60 lines (56 loc) · 1.44 KB
/
dimtable_modp.cc
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
#include "qidloop.h"
#include "homspace.h"
#define LOOPER
//#define CHECK_CONJUGATE
int main ()
{
long d, maxpnorm(1000);
cerr << "Enter field: " << flush; cin >> d;
if (!check_field(d))
{
cerr<<"field must be one of: "<<valid_fields<<endl;
exit(1);
}
vector<long> charlist;
charlist.push_back(0);
cerr << "Enter list of characteristics, ending in 0: " << flush;
long ch=1;
while(ch)
{
cin >> ch;
if (ch) charlist.push_back(ch);
}
Quad::field(d,maxpnorm);
int plusflag=1, cuspidalflag=1;
cerr << "Plus space? "; cin>>plusflag;
cerr << "cuspidal subspace? "; cin>>cuspidalflag;
#ifdef LOOPER
long firstn, lastn;
int both_conj;
cerr<<"Both conjugates? (0/1) "; cin >> both_conj;
cerr<<"Enter first and last norm for level: ";
cin >> firstn >> lastn;
cerr<<endl;
cout<<"Level";
for ( const auto& c : charlist)
cout<<" "<<c;
cout<<endl;
Qidealooper loop(firstn, lastn, both_conj, 1); // sorted within norm
while( loop.not_finished() )
{
Qideal N = loop.next();
#else
Qideal N;
while(cerr<<"Enter level (ideal label or generator): ", cin>>N, !N.is_zero())
{
#endif
cout << ideal_label(N);
for ( const auto& c : charlist)
{
homspace h(N, plusflag, 0, c); //level, plusflag, verbose, characteristic
long dim = (cuspidalflag? h.h1cuspdim(): h.h1dim());
cout << " " << dim;
}
cout<<endl;
}
}