-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.c
80 lines (70 loc) · 1.82 KB
/
main.c
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
/*
* basis.c
*
* 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
*
* */
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "data.h"
#include "scalar.h"
#include "pol.h"
#include "grobner.h"
#include "helper.h"
#include "compute.h"
#include "delta.h"
#include "reduce.h"
#include "char_p_0.h"
#include "basis.h"
int main(void )
{
int i, retry;
printf("/* Comments begin... \n");
#ifdef KIJKEN
printf("Debug is set! To unset do not define KIJKEN.\n");
#endif
/* Setup the scalars. */
setup_scalars();
/* Seed the randomness. */
set_seed(0);
/* Get myf. */
retry = 1;
while (retry == 1) {
myf = get_f();
retry = setup(0);
}
/* Compute the frobenius matrix. */
compute_frobenius_matrix();
/* Free G and myf. */
free_tail(myf.leading);
for (i = 0; i + 1 <= G.len; i++) {
free_tail(G.BC[i]->bc1.leading);
free_tail(G.BC[i]->bc2.leading);
free_tail(G.BC[i]->bc3.leading);
free_tail(G.BC[i]->bc4.leading);
free_tail(G.BC[i]->bc5.leading);
free_tail(G.ff[i]->leading);
}
deallocate_GVMnewMMold();
free_reserves();
close_scalars();
return(0);
}