1 | // emacs edit mode for this file is -*- C++ -*- |
---|
2 | // $Id: fac_util.h,v 1.3 1996-07-16 12:26:05 stobbe Exp $ |
---|
3 | |
---|
4 | #ifndef INCL_FAC_UTIL_H |
---|
5 | #define INCL_FAC_UTIL_H |
---|
6 | |
---|
7 | /* |
---|
8 | $Log: not supported by cvs2svn $ |
---|
9 | Revision 1.2 1996/07/08 08:22:02 stobbe |
---|
10 | "New organization of the factorization stuff. Some functions moved from |
---|
11 | fac_diophand.cc which no longer exists. |
---|
12 | " |
---|
13 | |
---|
14 | Revision 1.1 1996/06/27 11:34:25 stobbe |
---|
15 | "New function dviremainder. |
---|
16 | " |
---|
17 | |
---|
18 | Revision 1.0 1996/05/17 10:59:40 stobbe |
---|
19 | Initial revision |
---|
20 | |
---|
21 | */ |
---|
22 | |
---|
23 | #include "canonicalform.h" |
---|
24 | #include "cf_eval.h" |
---|
25 | |
---|
26 | /*BEGINPUBLIC*/ |
---|
27 | |
---|
28 | class modpk |
---|
29 | { |
---|
30 | private: |
---|
31 | CanonicalForm pk; |
---|
32 | CanonicalForm pkhalf; |
---|
33 | int p; |
---|
34 | int k; |
---|
35 | public: |
---|
36 | modpk(); |
---|
37 | modpk( int q, int l ); |
---|
38 | modpk( const modpk & m ); |
---|
39 | modpk& operator= ( const modpk& m ); |
---|
40 | ~modpk() {} |
---|
41 | int getp() const { return p; } |
---|
42 | int getk() const { return k; } |
---|
43 | CanonicalForm inverse( const CanonicalForm & f, bool symmetric = true ) const; |
---|
44 | CanonicalForm getpk() const { return pk; } |
---|
45 | CanonicalForm operator() ( const CanonicalForm & f, bool symmetric = true ) const; |
---|
46 | }; |
---|
47 | |
---|
48 | |
---|
49 | CanonicalForm replaceLc( const CanonicalForm & f, const CanonicalForm & c ); |
---|
50 | |
---|
51 | CanonicalForm remainder( const CanonicalForm & f, const CanonicalForm & g, const modpk & pk ); |
---|
52 | |
---|
53 | void divremainder( const CanonicalForm & f, const CanonicalForm & g, CanonicalForm & quot, CanonicalForm & rem, const modpk & pk ); |
---|
54 | |
---|
55 | CanonicalForm maxCoeff( const CanonicalForm & f ); |
---|
56 | |
---|
57 | bool Hensel ( const CanonicalForm & U, CFArray & G, const CFArray & lcG, const Evaluation & A, const modpk & bound, const Variable & x ); |
---|
58 | |
---|
59 | /* some special array functions */ |
---|
60 | |
---|
61 | CanonicalForm sum ( const CFArray & a, int f, int l ); |
---|
62 | |
---|
63 | CanonicalForm prod ( const CFArray & a, int f, int l ); |
---|
64 | |
---|
65 | CanonicalForm sum ( const CFArray & a ); |
---|
66 | |
---|
67 | CanonicalForm prod ( const CFArray & a ); |
---|
68 | |
---|
69 | CanonicalForm crossprod ( const CFArray & a, const CFArray & b ); |
---|
70 | |
---|
71 | /*ENDPUBLIC*/ |
---|
72 | |
---|
73 | bool gcd_test_one ( const CanonicalForm & f, const CanonicalForm & g, bool swap ); |
---|
74 | |
---|
75 | CanonicalForm ezgcd ( const CanonicalForm & f, const CanonicalForm & g ); |
---|
76 | |
---|
77 | void extgcd ( const CanonicalForm & a, const CanonicalForm & b, CanonicalForm & S, CanonicalForm & T, const modpk & pk ); |
---|
78 | |
---|
79 | #endif /* INCL_FAC_UTIL_H */ |
---|