950{
952#ifdef FACTORIZE2_DEBUG
954#endif
955
956
957
959
961
962
964 {
967 {
969 (**v)[0]=1;
970 }
972 }
973
975 {
977 int n=0;
978 int e;
983 {
984 case 0:
986
987 case 2:
989 (**v)[0]=1;
990
991 case 1: ;
992#ifdef TEST
993 default: ;
994#endif
995 }
996 if (n==0)
997 {
999
1000 }
1001 else
1002 {
1004 {
1006 if(e!=0)
1007 {
1008 n--;
1014 }
1015 }
1016 }
1019 }
1020
1021
1029
1032 {
1034 {
1035
1036 {
1042
1043
1047 {
1050 }
1051 }
1052 }
1054 {
1055
1057 {
1066 {
1069 }
1070 }
1071 }
1073 {
1078 }
1079
1080 else if (r->cf->extRing!=
NULL)
1081 {
1085 if (r->cf->extRing->qideal!=
NULL)
1086 {
1088 r->cf->extRing);
1093 }
1094 else
1095 {
1098 }
1099 }
1100 else
1101 {
1103 }
1104 }
1105 else
1106 {
1108 }
1110 {
1112 }
1113 {
1115
1116 if ( ! L.
getFirst().factor().inCoeffDomain() )
1118
1120 if (n==0) n=1;
1124 {
1126 {
1127 n--;
1129 }
1131 }
1133 for ( ;
J.hasItem();
J++,
j++ )
1134 {
1138 {
1139
1141 }
1142#if 0
1145#endif
1146 else if (r->cf->extRing!=
NULL)
1147 {
1148#ifndef SING_NDEBUG
1151#endif
1152 if (r->cf->extRing->qideal==
NULL)
1153 {
1154#ifdef SING_NDEBUG
1156#else
1158 {
1162 }
1163#endif
1164 }
1165 else
1166 {
1167#ifdef SING_NDEBUG
1169#else
1171 {
1175 }
1176#endif
1177 }
1178 }
1179 }
1180 if (r->cf->extRing!=
NULL)
1181 if (r->cf->extRing->qideal!=
NULL)
1183#ifndef SING_NDEBUG
1185 {
1188 {
1190#ifdef FACTORIZE2_DEBUG
1191 printf(
"factorize_retry\n");
1192#endif
1204 {
1207 }
1209 {
1212 }
1218 }
1219 else
1220 {
1221 WarnS(
"problem with factorize");
1222#if 0
1225#endif
1230 }
1231 }
1232#endif
1235 {
1239 }
1240
1242 {
1246 {
1250 {
1252 {
1257 }
1259 {
1261 {
1264 }
1270 }
1271 }
1272 }
1274 {
1277 {
1282 {
1284 {
1285 (**v)[
j]=(*w)[
i];
j++;
1286 }
1287 }
1289 }
1290 }
1292 {
1294 }
1295 }
1296 }
1298 {
1300 int stop=1;
1303 {
1305 }
1308 }
1309 else
1315 {
1318 {
1320 (*v)[0]=1;
1321 }
1325 }
1328 {
1330 }
1332 {
1334 }
1336}
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