1 #ifndef NTL_GF2XFactoring__H
2 #define NTL_GF2XFactoring__H
3
4 #include <NTL/GF2X.h>
5 #include <NTL/pair_GF2X_long.h>
6
7 NTL_OPEN_NNS
8
9 long IterIrredTest(const GF2X& f);
10
11 void SquareFreeDecomp(vec_pair_GF2X_long& u, const GF2X& ff);
SquareFreeDecomp(const GF2X & f)12 inline vec_pair_GF2X_long SquareFreeDecomp(const GF2X& f)
13 { vec_pair_GF2X_long x; SquareFreeDecomp(x, f); return x; }
14
15
16 void DDF(vec_pair_GF2X_long& factors, const GF2X& ff, long verbose=0);
17 inline vec_pair_GF2X_long DDF(const GF2X& f,
18 long verbose=0)
19 { vec_pair_GF2X_long x; DDF(x, f, verbose); return x; }
20
21
22 void EDF(vec_GF2X& factors, const GF2X& ff, long d, long verbose=0);
23 inline vec_GF2X EDF(const GF2X& f,
24 long d, long verbose=0)
25 { vec_GF2X x; EDF(x, f, d, verbose); return x; }
26
27
28 void SFCanZass(vec_GF2X& factors, const GF2X& ff, long verbose=0);
29 inline vec_GF2X SFCanZass(const GF2X& f, long verbose=0)
30 { vec_GF2X x; SFCanZass(x, f, verbose); return x; }
31
32
33 void CanZass(vec_pair_GF2X_long& factors, const GF2X& f, long verbose=0);
34 inline vec_pair_GF2X_long CanZass(const GF2X& f, long verbose=0)
35 { vec_pair_GF2X_long x; CanZass(x, f, verbose); return x; }
36
37
38 void mul(GF2X& f, const vec_pair_GF2X_long& v);
mul(const vec_pair_GF2X_long & v)39 inline GF2X mul(const vec_pair_GF2X_long& v)
40 { GF2X x; mul(x, v); return x; }
41
42
43 void BuildIrred(GF2X& f, long n);
BuildIrred_GF2X(long n)44 inline GF2X BuildIrred_GF2X(long n)
45 { GF2X x; BuildIrred(x, n); NTL_OPT_RETURN(GF2X, x); }
46
47
48 void BuildRandomIrred(GF2X& f, const GF2X& g);
BuildRandomIrred(const GF2X & g)49 inline GF2X BuildRandomIrred(const GF2X& g)
50 { GF2X x; BuildRandomIrred(x, g); NTL_OPT_RETURN(GF2X, x); }
51
52
53 void BuildSparseIrred(GF2X& f, long n);
BuildSparseIrred_GF2X(long n)54 inline GF2X BuildSparseIrred_GF2X(long n)
55 { GF2X x; BuildSparseIrred(x, n); NTL_OPT_RETURN(GF2X, x); }
56
57 NTL_CLOSE_NNS
58
59
60 #endif
61