985{
987#ifdef FACTORIZE2_DEBUG
989#endif
990
991
992
994
996
997
999 {
1002 {
1004 (**v)[0]=1;
1005 }
1007 }
1008
1010 {
1012 int n=0;
1013 int e;
1018 {
1019 case 0:
1021
1022 case 2:
1024 (**v)[0]=1;
1025
1026 case 1: ;
1027#ifdef TEST
1028 default: ;
1029#endif
1030 }
1031 if (n==0)
1032 {
1034
1035 }
1036 else
1037 {
1039 {
1041 if(e!=0)
1042 {
1043 n--;
1049 }
1050 }
1051 }
1054 }
1055
1056
1064
1067 {
1069 {
1070
1071 {
1077
1078
1082 {
1085 }
1086 }
1087 }
1089 {
1090
1092 {
1101 {
1104 }
1105 }
1106 }
1108 {
1115 }
1116
1117 else if (r->cf->extRing!=
NULL)
1118 {
1124 if (r->cf->extRing->qideal!=
NULL)
1125 {
1127 r->cf->extRing);
1132 }
1133 else
1134 {
1137 }
1138 }
1139 else
1140 {
1142 }
1143 }
1144 else
1145 {
1147 }
1149 {
1151 }
1152 {
1154
1155 if ( ! L.
getFirst().factor().inCoeffDomain() )
1157
1159 if (n==0) n=1;
1163 {
1165 {
1166 n--;
1168 }
1170 }
1172 for ( ;
J.hasItem();
J++,
j++ )
1173 {
1177 {
1178
1180 }
1181#if 0
1184#endif
1185 else if (r->cf->extRing!=
NULL)
1186 {
1187#ifndef SING_NDEBUG
1190#endif
1191 if (r->cf->extRing->qideal==
NULL)
1192 {
1193#ifdef SING_NDEBUG
1195#else
1197 {
1201 }
1202#endif
1203 }
1204 else
1205 {
1206#ifdef SING_NDEBUG
1208#else
1210 {
1214 }
1215#endif
1216 }
1217 }
1218 }
1219 if (r->cf->extRing!=
NULL)
1220 if (r->cf->extRing->qideal!=
NULL)
1222#ifndef SING_NDEBUG
1224 {
1227 {
1229#ifdef FACTORIZE2_DEBUG
1230 printf(
"factorize_retry\n");
1231#endif
1243 {
1246 }
1248 {
1251 }
1257 }
1258 else
1259 {
1260 WarnS(
"problem with factorize");
1261#if 0
1264#endif
1269 }
1270 }
1271#endif
1274 {
1278 }
1279
1281 {
1285 {
1289 {
1291 {
1296 }
1298 {
1300 {
1303 }
1309 }
1310 }
1311 }
1313 {
1316 {
1321 {
1323 {
1324 (**v)[
j]=(*w)[
i];
j++;
1325 }
1326 }
1328 }
1329 }
1331 {
1333 }
1334 }
1335 }
1337 {
1339 int stop=1;
1342 {
1344 }
1347 }
1348 else
1354 {
1357 {
1359 (*v)[0]=1;
1360 }
1364 }
1367 {
1369 }
1371 {
1373 }
1375}
static int si_max(const int a, const int b)
static int si_min(const int a, const int b)
const CanonicalForm CFMap CFMap & N
CFFList FACTORY_PUBLIC factorize(const CanonicalForm &f, bool issqrfree=false)
factorization over or
BOOLEAN count_Factors(ideal I, intvec *v, int j, poly &f, poly fac, const ring r)
ideal singclap_factorize(poly f, intvec **v, int with_exps, const ring r)
VAR int singclap_factorize_retry
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 FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
const Variable & v
< [in] a sqrfree bivariate poly
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy
void p_Content(poly ph, const ring r)
void p_Norm(poly p1, const ring r)
poly p_Cleardenom(poly p, const ring r)
poly p_NSet(number n, const ring r)
returns the poly representing the number n, destroys n
static poly p_Mult_q(poly p, poly q, const ring r)
static unsigned long p_SetExp(poly p, const unsigned long e, const unsigned long iBitmask, const int VarOffset)
set a single variable exponent @Note: VarOffset encodes the position in p->exp
static void p_Setm(poly p, const ring r)
static number p_SetCoeff(poly p, number n, ring r)
static long p_GetExp(const poly p, const unsigned long iBitmask, const int VarOffset)
get a single variable exponent @Note: the integer VarOffset encodes:
static BOOLEAN p_IsConstant(const poly p, const ring r)
static long p_Totaldegree(poly p, const ring r)
#define __p_Mult_nn(p, n, r)
static BOOLEAN rField_is_Zp_a(const ring r)
static BOOLEAN rField_is_Z(const ring r)
static BOOLEAN rField_is_GF(const ring r)
static short rVar(const ring r)
#define rVar(r) (r->N)
void id_Delete(ideal *h, ring r)
deletes an ideal/module/matrix
void idShow(const ideal id, const ring lmRing, const ring tailRing, const int debugPrint)
void idSkipZeroes(ideal ide)
gives an ideal/module the minimal possible size