forked from pichtj/groebner
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathF5.cpp
More file actions
32 lines (27 loc) · 754 Bytes
/
Copy pathF5.cpp
File metadata and controls
32 lines (27 loc) · 754 Bytes
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
#include <iostream>
#include <fstream>
#include <flint/fmpzxx.h>
#include "integral.h"
#include "F5.h"
#include "Ideal.h"
int main(int argc, char* argv[]) {
get_var_name = var_name;
typedef Polynomial<Term<flint::fmpzxx, Monomial<char, 64, degrevlex> > > P;
std::vector<P> input;
if (argc > 1) {
D("reading input from file " << argv[1]);
std::ifstream in_file(argv[1]);
input = read_input<P>(in_file);
} else {
D("reading input from stdin");
input = read_input<P>(std::cin);
}
DD("input = ", input);
F5Runner<P> runner;
auto output = runner.f5(input);
for (auto it = output.begin(); it != output.end(); ++it) {
std::cout << *it << std::endl;
}
return 0;
}
// vim:ruler:cindent:shiftwidth=2:expandtab: