-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdata.h
73 lines (63 loc) · 1.8 KB
/
data.h
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
/*
* data.h
*
* Copyright 2006 Johan de Jong
*
* This file is part of Frobenius
*
* Frobenius 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.
*
* Frobenius 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 Frobenius; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
* */
/* #define KIJKEN */
#define KLEINER 1
#define GELIJK -1
#define GROTER 0
/* There are two orderings. LEX and REVLEX. Chose one by
* commenting out one of the following two lines. */
#define LEX_ORDER
/* #define REVLEX_ORDER */
/* There are three strategies for reducing the polynomials
* encountered during the computation. OLD, NEW and MIXED.
* Setting MIXED_GROBNER is a good choice on average, but
* for certain choices of degrees etc the combinations
* LEX_ORDER + NEW_GROBNER
* or
* REVLEX_ORDER + OLD_GROBNER
* can be much faster. */
#define NEW_GROBNER
#define d1 8
#define d2 7
#define d3 15
#define d4 19
#define d 64
#define p 3
#define r 60 /* Exponent. */
#define q 5 /* Largest power of Delta. */
#define maxlength 20
/* This type will be used for our scalars. */
#include <gmp.h>
typedef mpz_t mscalar;
struct term {
mscalar c;
unsigned int n1;
unsigned int n2;
unsigned int n3;
unsigned int n4;
struct term *next;
};
struct polynomial {
unsigned int degree;
struct term *leading;
};