Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
241782 views
1
/*********************************************************************
2
3
(c) Copyright 2006-2010 Salman Baig and Chris Hall
4
5
This file is part of ELLFF
6
7
ELLFF is free software: you can redistribute it and/or modify
8
it under the terms of the GNU General Public License as published by
9
the Free Software Foundation, either version 3 of the License, or
10
(at your option) any later version.
11
12
ELLFF is distributed in the hope that it will be useful,
13
but WITHOUT ANY WARRANTY; without even the implied warranty of
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
GNU General Public License for more details.
16
17
You should have received a copy of the GNU General Public License
18
along with this program. If not, see <http://www.gnu.org/licenses/>.
19
20
*********************************************************************/
21
22
#ifndef LZZ_PERATX_H
23
#define LZZ_PERATX_H
24
25
#include <NTL/lzz_p.h>
26
#include <NTL/lzz_pE.h>
27
#include <NTL/lzz_pX.h>
28
#include <NTL/lzz_pEX.h>
29
#include <NTL/ZZX.h>
30
31
NTL_CLIENT
32
33
class zz_pEratX {
34
private:
35
void flip(zz_pEX& g, const zz_pEX& f);
36
37
public:
38
zz_pEratX(const zz_pEX& num, const zz_pEX& den);
39
zz_pEratX(const zz_pEX& num);
40
zz_pEratX();
41
42
void init();
43
void init(const zz_pEX& num);
44
void init(const zz_pEX& num, const zz_pEX& den);
45
46
void inv_t();
47
48
zz_pEX num, den;
49
};
50
51
extern int IsConstant(const zz_pEratX& f);
52
extern int deg(const zz_pEratX& f);
53
54
extern long operator==(const zz_pEratX& a, const zz_pEratX& b);
55
56
extern zz_pEratX operator+(const zz_pEratX& a, const zz_pEratX& b);
57
extern zz_pEratX operator-(const zz_pEratX& a, const zz_pEratX& b);
58
extern zz_pEratX operator*(const long l, const zz_pEratX& x);
59
extern zz_pEratX operator*(const zz_pEratX& a, const zz_pEratX& b);
60
extern zz_pEratX operator/(const zz_pEratX& a, const zz_pEX& b);
61
extern zz_pEratX operator^(const zz_pEratX& x, const int e);
62
63
extern zz_pEratX eval(const zz_pEratX& f, const zz_pEratX& g);
64
extern zz_pEratX eval(const zz_pEX& f, const zz_pEratX& g);
65
66
#endif // LZZ_PERATX_H
67
68