775 #ifdef FACTORIZE2_DEBUG 803 if (with_exps==0) n++;
826 for(i=
rVar(
r);i>0;i--)
836 if (with_exps!=1) (**v)[n]=e;
898 else if (
r->cf->extRing!=
NULL)
902 if (
r->cf->extRing->qideal!=
NULL)
931 if ( ! L.
getFirst().factor().inCoeffDomain() )
940 if ((with_exps==2)&&(n>1))
948 for ( ; J.
hasItem(); J++, j++ )
950 if (with_exps!=1) (**v)[
j] = J.
getItem().exp();
958 res->m[j] = convFactoryGFSingGF( J.
getItem().factor() );
960 else if (
r->cf->extRing!=
NULL)
966 if (
r->cf->extRing->qideal==
NULL)
994 if (
r->cf->extRing!=
NULL)
995 if (
r->cf->extRing->qideal!=
NULL)
1004 #ifdef FACTORIZE2_DEBUG 1005 printf(
"factorize_retry\n");
1011 int l=(*v)->length();
1012 (*v)->resize(l+ww->
length());
1013 for(jj=0;jj<ww->
length();jj++)
1014 (**v)[jj+
l]=(*ww)[jj];
1017 for(jj=
IDELEMS(res)-1;jj>=0;jj--)
1019 hh->m[jj]=res->m[jj];
1022 for(jj=
IDELEMS(h)-1;jj>=0;jj--)
1024 hh->m[jj+
IDELEMS(res)]=h->m[jj];
1035 WarnS(
"problem with factorize");
1043 res->m[1]=ff; ff=
NULL;
1061 if ((res->m[i]!=
NULL)
1074 while ((v!=
NULL) && ((*v)!=
NULL) && ((**v)[i]>1))
1079 res->m[0]=
p_Mult_q(res->m[0],res->m[i],
r);
1099 (**v)[
j]=(*w)[
i]; j++;
1105 if (res->m[0]==
NULL)
1115 if (with_exps!=0) stop=0;
1120 if (with_exps==0)
p_SetCoeff(res->m[0],old_lead_coeff,
r);
CanonicalForm convSingAPFactoryAP(poly p, const Variable &a, const ring r)
static BOOLEAN rField_is_Zp_a(const ring r)
static int si_min(const int a, const int b)
factory's class for variables
poly p_NSet(number n, const ring r)
returns the poly representing the number n, destroys n
static short rVar(const ring r)
#define rVar(r) (r->N)
void id_Delete(ideal *h, ring r)
deletes an ideal/module/matrix
CanonicalForm convSingTrPFactoryP(poly p, const ring r)
poly convFactoryPSingTrP(const CanonicalForm &f, const ring r)
static BOOLEAN rField_is_Q_a(const ring r)
static long p_Totaldegree(poly p, const ring r)
void WerrorS(const char *s)
static BOOLEAN rField_is_GF(const ring r)
static BOOLEAN rField_is_Z(const ring r)
void p_Norm(poly p1, const ring r)
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy ...
static number p_SetCoeff(poly p, number n, ring r)
static poly p_Copy(poly p, const ring r)
returns a copy of p
void prune(Variable &alpha)
void idShow(const ideal id, const ring lmRing, const ring tailRing, const int debugPrint)
Variable rootOf(const CanonicalForm &, char name='@')
returns a symbolic root of polynomial with name name Use it to define algebraic variables ...
BOOLEAN count_Factors(ideal I, intvec *v, int j, poly &f, poly fac, const ring r)
CFFList factorize(const CanonicalForm &f, bool issqrfree=false)
factorization over or
const CanonicalForm CFMap CFMap & N
static long p_GetExp(const poly p, const unsigned long iBitmask, const int VarOffset)
get a single variable exponent : the integer VarOffset encodes:
static BOOLEAN p_IsConstant(const poly p, const ring r)
poly convFactoryPSingP(const CanonicalForm &f, const ring r)
const char feNotImplemented[]
static const int SW_RATIONAL
set to 1 for computations over Q
static int si_max(const int a, const int b)
static poly p_Mult_nn(poly p, number n, const ring r)
static BOOLEAN rField_is_Q(const ring r)
void idSkipZeroes(ideal ide)
gives an ideal/module the minimal possible size
static BOOLEAN rField_is_Zp(const ring r)
static void p_Delete(poly *p, const ring r)
ideal idInit(int idsize, int rank)
initialise an ideal / module
const Variable & v
< [in] a sqrfree bivariate poly
static unsigned long p_SetExp(poly p, const unsigned long e, const unsigned long iBitmask, const int VarOffset)
set a single variable exponent : VarOffset encodes the position in p->exp
CanonicalForm convSingPFactoryP(poly p, const ring r)
static FORCE_INLINE number n_Copy(number n, const coeffs r)
return a copy of 'n'
static FORCE_INLINE number n_Div(number a, number b, const coeffs r)
return the quotient of 'a' and 'b', i.e., a/b; raises an error if 'b' is not invertible in r exceptio...
static BOOLEAN p_IsConstantPoly(const poly p, const ring r)
static void p_Setm(poly p, const ring r)
int singclap_factorize_retry
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
ideal singclap_factorize(poly f, intvec **v, int with_exps, const ring r)
poly convFactoryAPSingAP(const CanonicalForm &f, const ring r)
static const int SW_SYMMETRIC_FF
set to 1 for symmetric representation over F_q
poly p_Cleardenom(poly p, const ring r)
static poly p_Mult_q(poly p, poly q, const ring r)