Loading...
Searching...
No Matches
fac_util.h
Go to the documentation of this file.
/* emacs edit mode for this file is -*- C++ -*- */
/**
* @file fac_util.h
*
* operations mod p^k and some other useful functions for factorization
**/
#ifndef INCL_FAC_UTIL_H
#define INCL_FAC_UTIL_H
// #include "config.h"
#include "canonicalform.h"
#include "cf_eval.h"
/*BEGINPUBLIC*/
/**
* class to do operations mod p^k for int's p and k
**/
class modpk
{
private:
CanonicalForm pk;
CanonicalForm pkhalf;
int p;
int k;
public:
modpk();
modpk( int q, int l );
modpk( const modpk & m );
modpk& operator= ( const modpk& m );
~modpk() {}
int getp() const { return p; }
int getk() const { return k; }
CanonicalForm inverse( const CanonicalForm & f, bool symmetric = true ) const;
CanonicalForm getpk() const { return pk; }
CanonicalForm operator() ( const CanonicalForm & f, bool symmetric = true ) const;
};
CanonicalForm replaceLc( const CanonicalForm & f, const CanonicalForm & c );
/*ENDPUBLIC*/
bool gcd_test_one ( const CanonicalForm & f, const CanonicalForm & g, bool swap, int & d );
void extgcd ( const CanonicalForm & a, const CanonicalForm & b, CanonicalForm & S, CanonicalForm & T, const modpk & pk );
CanonicalForm remainder( const CanonicalForm & f, const CanonicalForm & g, const modpk & pk );
CanonicalForm prod ( const CFArray & a, int f, int l );
CanonicalForm prod ( const CFArray & a );
#endif /* ! INCL_FAC_UTIL_H */
swap
#define swap(_i, _j)
canonicalform.h
Header for factory's main class CanonicalForm.
CFArray
Array< CanonicalForm > CFArray
Definition canonicalform.h:397
l
int l
Definition cfEzgcd.cc:100
m
int m
Definition cfEzgcd.cc:128
g
g
Definition cfModGcd.cc:4098
b
CanonicalForm b
Definition cfModGcd.cc:4111
cf_eval.h
evaluate polynomials at points
f
FILE * f
Definition checklibs.c:9
CanonicalForm
factory's main class
Definition canonicalform.h:86
modpk
class to do operations mod p^k for int's p and k
Definition fac_util.h:23
modpk::operator()
CanonicalForm operator()(const CanonicalForm &f, bool symmetric=true) const
Definition fac_util.cc:79
modpk::operator=
modpk & operator=(const modpk &m)
Definition fac_util.cc:47
modpk::inverse
CanonicalForm inverse(const CanonicalForm &f, bool symmetric=true) const
Definition fac_util.cc:59
modpk::getk
int getk() const
Definition fac_util.h:36
modpk::modpk
modpk()
Definition fac_util.cc:22
modpk::getpk
CanonicalForm getpk() const
Definition fac_util.h:38
modpk::getp
int getp() const
Definition fac_util.h:35
modpk::p
int p
Definition fac_util.h:27
modpk::pkhalf
CanonicalForm pkhalf
Definition fac_util.h:26
modpk::~modpk
~modpk()
Definition fac_util.h:34
modpk::pk
CanonicalForm pk
Definition fac_util.h:25
modpk::k
int k
Definition fac_util.h:28
prod
fq_nmod_poly_t prod
Definition facHensel.cc:100
extgcd
void extgcd(const CanonicalForm &a, const CanonicalForm &b, CanonicalForm &S, CanonicalForm &T, const modpk &pk)
Definition fac_util.cc:183
remainder
CanonicalForm remainder(const CanonicalForm &f, const CanonicalForm &g, const modpk &pk)
Definition fac_util.cc:115
gcd_test_one
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
replaceLc
CanonicalForm replaceLc(const CanonicalForm &f, const CanonicalForm &c)
Definition fac_util.cc:90
T
STATIC_VAR jList * T
Definition janet.cc:30