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