spielwiese
Release-4-3-2p1
Last change
on this file was
564dd8,
checked in by Hans Schoenemann <hannes@…>, 3 years ago
|
factorize in Z[x,..] w/o NTL
|
-
Property mode set to
100644
|
File size:
1.4 KB
|
Line | |
---|
1 | /* emacs edit mode for this file is -*- C++ -*- */ |
---|
2 | |
---|
3 | /** |
---|
4 | * @file fac_util.h |
---|
5 | * |
---|
6 | * operations mod p^k and some other useful functions for factorization |
---|
7 | **/ |
---|
8 | |
---|
9 | #ifndef INCL_FAC_UTIL_H |
---|
10 | #define INCL_FAC_UTIL_H |
---|
11 | |
---|
12 | // #include "config.h" |
---|
13 | |
---|
14 | #include "canonicalform.h" |
---|
15 | #include "cf_eval.h" |
---|
16 | |
---|
17 | /*BEGINPUBLIC*/ |
---|
18 | |
---|
19 | /** |
---|
20 | * class to do operations mod p^k for int's p and k |
---|
21 | **/ |
---|
22 | class modpk |
---|
23 | { |
---|
24 | private: |
---|
25 | CanonicalForm pk; |
---|
26 | CanonicalForm pkhalf; |
---|
27 | int p; |
---|
28 | int k; |
---|
29 | public: |
---|
30 | modpk(); |
---|
31 | modpk( int q, int l ); |
---|
32 | modpk( const modpk & m ); |
---|
33 | modpk& operator= ( const modpk& m ); |
---|
34 | ~modpk() {} |
---|
35 | int getp() const { return p; } |
---|
36 | int getk() const { return k; } |
---|
37 | CanonicalForm inverse( const CanonicalForm & f, bool symmetric = true ) const; |
---|
38 | CanonicalForm getpk() const { return pk; } |
---|
39 | CanonicalForm operator() ( const CanonicalForm & f, bool symmetric = true ) const; |
---|
40 | }; |
---|
41 | |
---|
42 | |
---|
43 | CanonicalForm replaceLc( const CanonicalForm & f, const CanonicalForm & c ); |
---|
44 | |
---|
45 | /*ENDPUBLIC*/ |
---|
46 | |
---|
47 | bool gcd_test_one ( const CanonicalForm & f, const CanonicalForm & g, bool swap, int & d ); |
---|
48 | |
---|
49 | void extgcd ( const CanonicalForm & a, const CanonicalForm & b, CanonicalForm & S, CanonicalForm & T, const modpk & pk ); |
---|
50 | |
---|
51 | CanonicalForm remainder( const CanonicalForm & f, const CanonicalForm & g, const modpk & pk ); |
---|
52 | |
---|
53 | CanonicalForm prod ( const CFArray & a, int f, int l ); |
---|
54 | |
---|
55 | CanonicalForm prod ( const CFArray & a ); |
---|
56 | |
---|
57 | #endif /* ! INCL_FAC_UTIL_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.