My Project
Loading...
Searching...
No Matches
fac_util.h
Go to the documentation of this file.
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:
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
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
51CanonicalForm remainder( const CanonicalForm & f, const CanonicalForm & g, const modpk & pk );
52
53CanonicalForm prod ( const CFArray & a, int f, int l );
54
55CanonicalForm prod ( const CFArray & a );
56
57#endif /* ! INCL_FAC_UTIL_H */
#define swap(_i, _j)
Header for factory's main class CanonicalForm.
int l
Definition: cfEzgcd.cc:100
int m
Definition: cfEzgcd.cc:128
g
Definition: cfModGcd.cc:4090
CanonicalForm b
Definition: cfModGcd.cc:4103
evaluate polynomials at points
FILE * f
Definition: checklibs.c:9
factory's main class
Definition: canonicalform.h:86
class to do operations mod p^k for int's p and k
Definition: fac_util.h:23
CanonicalForm operator()(const CanonicalForm &f, bool symmetric=true) const
Definition: fac_util.cc:79
modpk & operator=(const modpk &m)
Definition: fac_util.cc:47
CanonicalForm inverse(const CanonicalForm &f, bool symmetric=true) const
Definition: fac_util.cc:59
int getk() const
Definition: fac_util.h:36
modpk()
Definition: fac_util.cc:22
CanonicalForm getpk() const
Definition: fac_util.h:38
int getp() const
Definition: fac_util.h:35
int p
Definition: fac_util.h:27
CanonicalForm pkhalf
Definition: fac_util.h:26
~modpk()
Definition: fac_util.h:34
CanonicalForm pk
Definition: fac_util.h:25
int k
Definition: fac_util.h:28
fq_nmod_poly_t prod
Definition: facHensel.cc:100
void extgcd(const CanonicalForm &a, const CanonicalForm &b, CanonicalForm &S, CanonicalForm &T, const modpk &pk)
Definition: fac_util.cc:183
CanonicalForm remainder(const CanonicalForm &f, const CanonicalForm &g, const modpk &pk)
Definition: fac_util.cc:115
bool gcd_test_one(const CanonicalForm &f, const CanonicalForm &g, bool swap, int &d)
Coprimality Check. f and g are assumed to have the same level. If swap is true, the main variables of...
Definition: cfGcdUtil.cc:25
CanonicalForm replaceLc(const CanonicalForm &f, const CanonicalForm &c)
Definition: fac_util.cc:90
STATIC_VAR jList * T
Definition: janet.cc:30