Changeset f3ff22 in git
 Timestamp:
 Aug 20, 2012, 11:49:41 AM (10 years ago)
 Branches:
 (u'jengelhdatetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'ad2543eab51733612ba7d118afc77edca719600e')
 Children:
 27e0172370323ce80587df1d73a66392a08a5c03
 Parents:
 c1ea88e1b3b498027a5c23d1d0b8163e2bf2762b
 gitauthor:
 Martin Lee <martinlee84@web.de>20120820 11:49:41+02:00
 gitcommitter:
 Martin Lee <martinlee84@web.de>20120904 18:01:18+02:00
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

factory/facFactorize.cc
rc1ea88 rf3ff22 1161 1161 for (iter= contents; iter.hasItem(); iter++, iter2++) 1162 1162 iter2.getItem() /= iter.getItem(); 1163 foundMultiplier= true; 1164 } 1165 if (!foundMultiplier) 1166 { 1167 Variable xx; 1168 CFList vars1; 1169 CFFList sqrfMultiplier= sqrFree (LCmultiplier); 1170 if (sqrfMultiplier.getFirst().factor().inCoeffDomain()) 1171 sqrfMultiplier.removeFirst(); 1172 sqrfMultiplier= sortCFFListByNumOfVars (sqrfMultiplier); 1173 xx= Variable (2); 1174 for (iter= oldBiFactors; iter.hasItem(); iter++) 1175 vars1.append (power (xx, degree (LC (iter.getItem(),1), xx))); 1176 for (int i= 0; i < A.level() 2; i++) 1177 { 1178 if (oldAeval[i].isEmpty()) 1179 continue; 1180 xx= oldAeval[i].getFirst().mvar(); 1181 iter2= vars1; 1182 for (iter= oldAeval[i]; iter.hasItem(); iter++, iter2++) 1183 iter2.getItem() *= power(xx,degree (LC (iter.getItem(),1), xx)); 1184 } 1185 CanonicalForm tmp; 1186 iter2= vars1; 1187 for (iter= leadingCoeffs2[A.level()3]; iter.hasItem(); iter++, 1188 iter2++) 1189 { 1190 tmp= iter.getItem()/LCmultiplier; 1191 for (int i=1; i <= tmp.level(); i++) 1192 { 1193 if (degree (tmp, i) > 0) 1194 iter2.getItem() /= power (Variable (i), degree (tmp,i)); 1195 } 1196 } 1197 int multi; 1198 for (CFFListIterator ii= sqrfMultiplier; ii.hasItem(); ii++) 1199 { 1200 multi= 0; 1201 for (iter= vars1; iter.hasItem(); iter++) 1202 { 1203 tmp= iter.getItem(); 1204 while (fdivides (myGetVars (ii.getItem().factor()), tmp)) 1205 { 1206 multi++; 1207 tmp /= myGetVars (ii.getItem().factor()); 1208 } 1209 } 1210 if (multi == ii.getItem().exp()) 1211 { 1212 index= 1; 1213 for (iter= vars1; iter.hasItem(); iter++, index++) 1214 { 1215 while (fdivides (myGetVars(ii.getItem().factor()), 1216 iter.getItem() 1217 ) 1218 ) 1219 { 1220 int index2= 1; 1221 for (iter2= leadingCoeffs2[A.level()3]; iter2.hasItem(); 1222 iter2++, index2++) 1223 { 1224 if (index2 == index) 1225 continue; 1226 else 1227 { 1228 tmp= ii.getItem().factor(); 1229 iter2.getItem() /= tmp; 1230 CFListIterator iter3= evaluation; 1231 for (int jj= A.level(); jj > 2; jj, iter3++) 1232 tmp= tmp (iter3.getItem(), jj); 1233 if (!tmp.inCoeffDomain()) 1234 { 1235 int index3= 1; 1236 for (iter3= biFactors; iter3.hasItem(); iter3++, 1237 index3++) 1238 { 1239 if (index3 == index2) 1240 { 1241 iter3.getItem() /= tmp; 1242 iter3.getItem() /= Lc (iter3.getItem()); 1243 break; 1244 } 1245 } 1246 } 1247 A /= ii.getItem().factor(); 1248 } 1249 } 1250 iter.getItem() /= getVars (ii.getItem().factor()); 1251 } 1252 } 1253 } 1254 else 1255 { 1256 index= 1; 1257 for (iter= vars1; iter.hasItem(); iter++, index++) 1258 { 1259 if (!fdivides (myGetVars (ii.getItem().factor()), 1260 iter.getItem() 1261 ) 1262 ) 1263 { 1264 int index2= 1; 1265 for (iter2= leadingCoeffs2[A.level()3]; iter2.hasItem(); 1266 iter2++, index2++) 1267 { 1268 if (index2 == index) 1269 { 1270 tmp= power (ii.getItem().factor(), ii.getItem().exp()); 1271 iter2.getItem() /= tmp; 1272 A /= tmp; 1273 CFListIterator iter3= evaluation; 1274 for (int jj= A.level(); jj > 2; jj, iter3++) 1275 tmp= tmp (iter3.getItem(), jj); 1276 if (!tmp.inCoeffDomain()) 1277 { 1278 int index3= 1; 1279 for (iter3= biFactors; iter3.hasItem(); iter3++, 1280 index3++) 1281 { 1282 if (index3 == index2) 1283 { 1284 iter3.getItem() /= tmp; 1285 iter3.getItem() /= Lc (iter3.getItem()); 1286 break; 1287 } 1288 } 1289 } 1290 } 1291 } 1292 } 1293 } 1294 } 1295 } 1163 1296 } 1164 1297 } … … 1192 1325 factors= CFList(); 1193 1326 delete [] index; 1327 } 1328 if (!LCheuristic && !LCmultiplierIsConst && bufFactors.isEmpty()) 1329 { 1330 int index; 1331 Variable xx; 1332 CFList vars1; 1333 CFFList sqrfMultiplier= sqrFree (LCmultiplier); 1334 if (sqrfMultiplier.getFirst().factor().inCoeffDomain()) 1335 sqrfMultiplier.removeFirst(); 1336 sqrfMultiplier= sortCFFListByNumOfVars (sqrfMultiplier); 1337 xx= Variable (2); 1338 for (iter= oldBiFactors; iter.hasItem(); iter++) 1339 vars1.append (power (xx, degree (LC (iter.getItem(),1), xx))); 1340 for (int i= 0; i < A.level() 2; i++) 1341 { 1342 if (oldAeval[i].isEmpty()) 1343 continue; 1344 xx= oldAeval[i].getFirst().mvar(); 1345 iter2= vars1; 1346 for (iter= oldAeval[i]; iter.hasItem(); iter++, iter2++) 1347 iter2.getItem() *= power (xx, degree (LC (iter.getItem(),1), xx)); 1348 } 1349 CanonicalForm tmp; 1350 iter2= vars1; 1351 for (iter= leadingCoeffs2[A.level()3]; iter.hasItem(); iter++, iter2++) 1352 { 1353 tmp= iter.getItem()/LCmultiplier; 1354 for (int i=1; i <= tmp.level(); i++) 1355 { 1356 if (degree (tmp, i) > 0) 1357 iter2.getItem() /= power (Variable (i), degree (tmp,i)); 1358 } 1359 } 1360 int multi; 1361 for (CFFListIterator ii= sqrfMultiplier; ii.hasItem(); ii++) 1362 { 1363 multi= 0; 1364 for (iter= vars1; iter.hasItem(); iter++) 1365 { 1366 tmp= iter.getItem(); 1367 while (fdivides (myGetVars (ii.getItem().factor()), tmp)) 1368 { 1369 multi++; 1370 tmp /= myGetVars (ii.getItem().factor()); 1371 } 1372 } 1373 if (multi == ii.getItem().exp()) 1374 { 1375 index= 1; 1376 for (iter= vars1; iter.hasItem(); iter++, index++) 1377 { 1378 while (fdivides (myGetVars (ii.getItem().factor()), iter.getItem())) 1379 { 1380 int index2= 1; 1381 for (iter2= leadingCoeffs2[A.level()3]; iter2.hasItem(); iter2++, 1382 index2++) 1383 { 1384 if (index2 == index) 1385 continue; 1386 else 1387 { 1388 tmp= ii.getItem().factor(); 1389 iter2.getItem() /= tmp; 1390 CFListIterator iter3= evaluation; 1391 for (int jj= A.level(); jj > 2; jj, iter3++) 1392 tmp= tmp (iter3.getItem(), jj); 1393 if (!tmp.inCoeffDomain()) 1394 { 1395 int index3= 1; 1396 for (iter3= biFactors; iter3.hasItem(); iter3++, index3++) 1397 { 1398 if (index3 == index2) 1399 { 1400 iter3.getItem() /= tmp; 1401 iter3.getItem() /= Lc (iter3.getItem()); 1402 break; 1403 } 1404 } 1405 } 1406 A /= ii.getItem().factor(); 1407 } 1408 } 1409 iter.getItem() /= getVars (ii.getItem().factor()); 1410 } 1411 } 1412 } 1413 else 1414 { 1415 index= 1; 1416 for (iter= vars1; iter.hasItem(); iter++, index++) 1417 { 1418 if (!fdivides (myGetVars (ii.getItem().factor()), iter.getItem())) 1419 { 1420 int index2= 1; 1421 for (iter2= leadingCoeffs2[A.level()3]; iter2.hasItem(); iter2++, 1422 index2++) 1423 { 1424 if (index2 == index) 1425 { 1426 tmp= power (ii.getItem().factor(), ii.getItem().exp()); 1427 iter2.getItem() /= tmp; 1428 A /= tmp; 1429 CFListIterator iter3= evaluation; 1430 for (int jj= A.level(); jj > 2; jj, iter3++) 1431 tmp= tmp (iter3.getItem(), jj); 1432 if (!tmp.inCoeffDomain()) 1433 { 1434 int index3= 1; 1435 for (iter3= biFactors; iter3.hasItem(); iter3++, index3++) 1436 { 1437 if (index3 == index2) 1438 { 1439 iter3.getItem() /= tmp; 1440 iter3.getItem() /= Lc (iter3.getItem()); 1441 break; 1442 } 1443 } 1444 } 1445 } 1446 } 1447 } 1448 } 1449 } 1450 } 1451 1452 leadingCoeffs= leadingCoeffs2[A.level()3]; 1453 for (int i= A.level()3; i > 1; i) 1454 leadingCoeffs2[i]= CFList(); 1455 prepareLeadingCoeffs (leadingCoeffs2,A.level(),leadingCoeffs, biFactors, 1456 evaluation); 1457 Aeval= evaluateAtEval (A, evaluation, 2); 1458 1459 hh= Lc (Aeval.getFirst()); 1460 1461 for (CFListIterator i= Aeval; i.hasItem(); i++) 1462 i.getItem() /= hh; 1463 1464 A /= hh; 1194 1465 } 1195 1466
Note: See TracChangeset
for help on using the changeset viewer.