-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpolyio.h
executable file
·35 lines (29 loc) · 978 Bytes
/
polyio.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
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <algorithm>
#include "polyring.h"
#include "modring.h"
#include "complex.h"
#include "polymodring.h"
#include "numberfield.h"
#include "alg.h"
#include "typedefs.h"
#pragma once
class polyterm {
public:
Q coeff;
std::vector<unsigned int> powers;
polyterm();
polyterm(std::string in);
bool operator<(const polyterm &other) const;
void print(std::ostream *out);
void print_added(std::ostream *out);
};
std::vector<polyterm> scan_polyterm_list(std::string input);
void print_polyterm_list(std::ostream *out, std::vector<polyterm> list);
std::vector<polyterm> standardize(std::vector<polyterm> terms);
std::vector<polyterm> get_polyterm_list(poly<numberfield> input);
poly<Q> get_rational_poly(std::vector<polyterm> terms);
poly<numberfield> get_numberfield_poly(std::vector<polyterm> terms, std::vector<poly<numberfield>> min_polys, int level = -1);