source: git/factory/fac_util.h @ 8d1432e

spielwiese
Last change on this file since 8d1432e was f1e3bf5, checked in by Martin Lee <martinlee84@…>, 10 years ago
chg: moved EZGCD_P from cf_gcd_smallp to cfEzgcd
  • Property mode set to 100644
File size: 1.2 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**/
22class modpk
23{
24private:
25    CanonicalForm pk;
26    CanonicalForm pkhalf;
27    int p;
28    int k;
29public:
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
43CanonicalForm replaceLc( const CanonicalForm & f, const CanonicalForm & c );
44
45/*ENDPUBLIC*/
46
47bool gcd_test_one ( const CanonicalForm & f, const CanonicalForm & g, bool swap, int & d );
48
49void extgcd ( const CanonicalForm & a, const CanonicalForm & b, CanonicalForm & S, CanonicalForm & T, const modpk & pk );
50
51#endif /* ! INCL_FAC_UTIL_H */
Note: See TracBrowser for help on using the repository browser.