source: git/factory/fac_util.h @ 6deedd

spielwiese
Last change on this file since 6deedd was e4fe2b, checked in by Oleksandr Motsak <motsak@…>, 13 years ago
FIX: Fixed huge BUG in cf_gmp.h CHG: starting to cleanup factory
  • Property mode set to 100644
File size: 1.8 KB
Line 
1/* emacs edit mode for this file is -*- C++ -*- */
2/* $Id$ */
3
4#ifndef INCL_FAC_UTIL_H
5#define INCL_FAC_UTIL_H
6
7// #include "config.h"
8
9#include "canonicalform.h"
10#include "cf_eval.h"
11
12/*BEGINPUBLIC*/
13
14class modpk
15{
16private:
17    CanonicalForm pk;
18    CanonicalForm pkhalf;
19    int p;
20    int k;
21public:
22    modpk();
23    modpk( int q, int l );
24    modpk( const modpk & m );
25    modpk& operator= ( const modpk& m );
26    ~modpk() {}
27    int getp() const { return p; }
28    int getk() const { return k; }
29    CanonicalForm inverse( const CanonicalForm & f, bool symmetric = true ) const;
30    CanonicalForm getpk() const { return pk; }
31    CanonicalForm operator() ( const CanonicalForm & f, bool symmetric = true ) const;
32};
33
34
35CanonicalForm replaceLc( const CanonicalForm & f, const CanonicalForm & c );
36
37CanonicalForm remainder( const CanonicalForm & f, const CanonicalForm & g, const modpk & pk );
38
39void divremainder( const CanonicalForm & f, const CanonicalForm & g, CanonicalForm & quot, CanonicalForm & rem, const modpk & pk );
40
41bool Hensel ( const CanonicalForm & U, CFArray & G, const CFArray & lcG, const Evaluation & A, const modpk & bound, const Variable & x );
42
43/* some special array functions */
44
45CanonicalForm sum ( const CFArray & a, int f, int l );
46
47CanonicalForm prod ( const CFArray & a, int f, int l );
48
49CanonicalForm sum ( const CFArray & a );
50
51CanonicalForm prod ( const CFArray & a );
52
53CanonicalForm crossprod ( const CFArray & a, const CFArray & b );
54
55/*ENDPUBLIC*/
56
57bool gcd_test_one ( const CanonicalForm & f, const CanonicalForm & g, bool swap );
58
59CanonicalForm ezgcd ( const CanonicalForm & f, const CanonicalForm & g );
60
61void extgcd ( const CanonicalForm & a, const CanonicalForm & b, CanonicalForm & S, CanonicalForm & T, const modpk & pk );
62
63#endif /* ! INCL_FAC_UTIL_H */
Note: See TracBrowser for help on using the repository browser.