21#include <NTL/ZZXFactoring.h>
22#include <NTL/ZZ_pXFactoring.h>
23#include <NTL/lzz_pXFactoring.h>
24#include <NTL/GF2XFactoring.h>
25#include <NTL/ZZ_pEXFactoring.h>
26#include <NTL/lzz_pEXFactoring.h>
27#include <NTL/GF2EXFactoring.h>
29#include <NTL/mat_ZZ.h>
30#include <NTL/version.h>
36#define Alloc(L) omAlloc(L)
37#define Free(A,L) omFreeSize(A,L)
39#define Alloc(L) malloc(L)
40#define Free(A,L) free(A)
78 for (;
i.hasTerms();
i++)
119 for (;
i.hasTerms();
i++)
135 cout<<
"convertFacCF2NTLzz_pX: coefficient not immediate! : "<<
f<<
"\n";
138 printf(
"convertFacCF2NTLzz_pX: coefficient not immediate!, char=%d\n",
199 for (;
i.hasTerms();
i++)
208 if (!
i.coeff().isImm())
i.coeff()=
i.coeff().mapinto();
209 if (!
i.coeff().isImm())
212 cout<<
"convertFacCF2NTLGF2X: coefficient not immediate! : " <<
f <<
"\n";
215 printf(
"convertFacCF2NTLGF2X: coefficient not immediate!");
268 for (
int j=0;
j<=deg(poly);
j++)
270 if (coeff(poly,
j)!=0)
337 for (
int j=0;
j<=deg(poly);
j++)
509#if NTL_MAJOR_VERSION <= 6
510 static_cast<long *
>( a.rep );
511#elif NTL_MAJOR_VERSION <=9
512 static_cast<long *
>( a.rep.rep );
514 (
long*)( a.rep.rep );
541 for (
int j= 1;
j <=
cc;
j++)
548 for (
int j= 0;
j <
cc;
j++)
673 if (
f.isImm())
temp=
f.intval();
706 for (;
i.hasTerms();
i++)
1019 for(;
i.hasTerms();
i++)
1049 for(;
i.hasTerms();
i++)
1076 for(;
i.hasTerms();
i++)
1099 for (
int j=0;
j<deg(
f)+1;
j++)
1122 for (
int j=0;
j<deg(
f)+1;
j++)
1141 res->SetDims(
m.rows(),
m.columns());
1144 for(
i=
m.rows();
i>0;
i--)
1146 for(
j=
m.columns();
j>0;
j--)
1157 for(
i=
res->rows();
i>0;
i--)
1159 for(
j=
res->columns();
j>0;
j--)
1170 res->SetDims(
m.rows(),
m.columns());
1173 for(
i=
m.rows();
i>0;
i--)
1175 for(
j=
m.columns();
j>0;
j--)
1177 if(!(
m(
i,
j)).isImm())
printf(
"convertFacCFMatrix2NTLmat_zz_p: not imm.\n");
1178 (*res)(
i,
j)=(
m(
i,
j)).intval();
1187 for(
i=
res->rows();
i>0;
i--)
1189 for(
j=
res->columns();
j>0;
j--)
1199 res->SetDims(
m.rows(),
m.columns());
1202 for(
i=
m.rows();
i>0;
i--)
1204 for(
j=
m.columns();
j>0;
j--)
1216 for(
i=
res->rows();
i>0;
i--)
1218 for(
j=
res->columns();
j>0;
j--)
CFMatrix * convertNTLmat_zz_p2FacCFMatrix(const mat_zz_p &m)
CanonicalForm convertNTLZZpE2CF(const ZZ_pE &coefficient, const Variable &x)
NAME: convertNTLZZpX2CF.
STATIC_VAR unsigned char * cf_stringtemp
CanonicalForm convertZZ2CF(const ZZ &a)
NAME: convertZZ2CF.
CFFList convertNTLvec_pair_GF2X_long2FacCFFList(const vec_pair_GF2X_long &e, GF2, const Variable &x)
NAME: convertNTLvec_pair_GF2X_long2FacCFFList.
CanonicalForm convertNTLGF2E2CF(const GF2E &coefficient, const Variable &x)
NAME: convertNTLGF2E2CF.
ZZX convertFacCF2NTLZZX(const CanonicalForm &f)
zz_pEX convertFacCF2NTLzz_pEX(const CanonicalForm &f, const zz_pX &mipo)
CFMatrix * convertNTLmat_zz_pE2FacCFMatrix(const mat_zz_pE &m, const Variable &alpha)
CFFList convertNTLvec_pair_zzpEX_long2FacCFFList(const vec_pair_zz_pEX_long &e, const zz_pE &cont, const Variable &x, const Variable &alpha)
CFFList convertNTLvec_pair_GF2EX_long2FacCFFList(const vec_pair_GF2EX_long &e, const GF2E &cont, const Variable &x, const Variable &alpha)
NAME: convertNTLvec_pair_GF2EX_long2FacCFFList.
CanonicalForm convertNTLzz_pEX2CF(const zz_pEX &f, const Variable &x, const Variable &alpha)
ZZ_pEX convertFacCF2NTLZZ_pEX(const CanonicalForm &f, const ZZ_pX &mipo)
CanonicalForm in Z_p(a)[X] to NTL ZZ_pEX.
CanonicalForm convertNTLzzpX2CF(const zz_pX &poly, const Variable &x)
CFFList convertNTLvec_pair_zzpX_long2FacCFFList(const vec_pair_zz_pX_long &e, const zz_p cont, const Variable &x)
mat_zz_pE * convertFacCFMatrix2NTLmat_zz_pE(const CFMatrix &m)
GF2EX convertFacCF2NTLGF2EX(const CanonicalForm &f, const GF2X &mipo)
CanonicalForm in Z_2(a)[X] to NTL GF2EX.
CanonicalForm convertNTLZZpX2CF(const ZZ_pX &poly, const Variable &x)
NAME: convertNTLZZpX2CF.
CanonicalForm convertNTLZZX2CF(const ZZX &polynom, const Variable &x)
CFFList convertNTLvec_pair_ZZpEX_long2FacCFFList(const vec_pair_ZZ_pEX_long &e, const ZZ_pE &cont, const Variable &x, const Variable &alpha)
NAME: convertNTLvec_pair_ZZpEX_long2FacCFFList.
CanonicalForm convertNTLZZ_pEX2CF(const ZZ_pEX &f, const Variable &x, const Variable &alpha)
void out_cf(const char *s1, const CanonicalForm &f, const char *s2)
cf_algorithm.cc - simple mathematical algorithms.
CanonicalForm convertNTLzzpE2CF(const zz_pE &coefficient, const Variable &x)
zz_pX convertFacCF2NTLzzpX(const CanonicalForm &f)
ZZ_pX convertFacCF2NTLZZpX(const CanonicalForm &f)
NAME: convertFacCF2NTLZZpX.
mat_ZZ * convertFacCFMatrix2NTLmat_ZZ(const CFMatrix &m)
CFFList convertNTLvec_pair_ZZpX_long2FacCFFList(const vec_pair_ZZ_pX_long &e, const ZZ_p &cont, const Variable &x)
NAME: convertNTLvec_pair_ZZpX_long2FacCFFList.
mat_zz_p * convertFacCFMatrix2NTLmat_zz_p(const CFMatrix &m)
CFMatrix * convertNTLmat_ZZ2FacCFMatrix(const mat_ZZ &m)
GF2X convertFacCF2NTLGF2X(const CanonicalForm &f)
NAME: convertFacCF2NTLGF2X.
STATIC_VAR unsigned long cf_stringtemp_l
ZZ convertFacCF2NTLZZ(const CanonicalForm &f)
NAME: convertFacCF2NTLZZX.
CanonicalForm convertNTLGF2X2CF(const GF2X &poly, const Variable &x)
NAME: convertNTLGF2X2CF.
CFFList convertNTLvec_pair_ZZX_long2FacCFFList(const vec_pair_ZZX_long &e, const ZZ &cont, const Variable &x)
NAME: convertNTLvec_pair_ZZX_long2FacCFFList.
Conversion to and from NTL.
declarations of higher level algorithms.
Iterators for CanonicalForm's.
class to iterate through CanonicalForm's
factory's class for variables
CFList conv(const CFFList &L)
convert a CFFList to a CFList by dropping the multiplicity
squarefree part and factorization over Q, Q(a)
static BOOLEAN IsOne(number a, const coeffs)
static BOOLEAN IsZero(number a, const coeffs)
Factory's internal integers.