Changeset 5a640f in git
- Timestamp:
- Aug 22, 2017, 2:45:37 PM (7 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- a62db6acb39329a175a16c23ac737917e158e04d
- Parents:
- 8c0eaaaf75a8408a9638e8ca5445961fe9974e7c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/fpadim.lib
r8c0eaa r5a640f 1422 1422 } 1423 1423 } 1424 ideal V = lpStandardWords(G, l - 1); // vertices 1425 int n = size(V); 1424 list LG = lpId2ivLi(G); 1425 list SW = ivStandardWords(LG, l - 1); // vertices 1426 int n = size(SW); 1426 1427 intmat UG[n][n]; // Ufnarovskij graph 1427 1428 for (int i = 1; i <= n; i++) { 1428 1429 for (int j = 1; j <= n; j++) { 1429 // V[i] = v, V[j] = w[Studzinski page 76]1430 intvec v = lp2iv(V[i]);1431 intvec w = lp2iv(V[j]);1430 // [Studzinski page 76] 1431 intvec v = SW[i]; 1432 intvec w = SW[j]; 1432 1433 intvec v_overlap; 1433 1434 intvec w_overlap; … … 1439 1440 intvec vw = v; 1440 1441 vw[l] = w[l-1]; 1441 if (v_overlap == w_overlap && ! divides(G, vw)) {1442 if (v_overlap == w_overlap && !ivdivides(LG, vw)) { 1442 1443 UG[i,j] = 1; 1443 1444 } … … 1447 1448 } 1448 1449 1449 proc lpStandardWords(idealG, int length) {1450 proc ivStandardWords(list G, int length) { 1450 1451 if (length == 0) { 1451 return ( 1);1452 return (0); // iv = 0 means monom = 1 1452 1453 } 1453 1454 int lV = attrib(basering, "lV"); // variable count 1454 // recursion could cause problems 1455 ideal prevWords = lpStandardWords(G, length - 1); 1456 ideal words; 1455 list prevWords = ivStandardWords(G, length - 1); 1456 list words; 1457 1457 for (int i = 1; i <= lV; i++) { 1458 1458 for (int j = 1; j <= size(prevWords); j++) { 1459 int placeShift = (length - 1) * lV; // letterplace 1460 // multiply every previous word with every variable 1461 poly word = prevWords[j] * var(i + placeShift); 1459 intvec word = prevWords[j]; 1460 word[length] = i; 1462 1461 // assumes that G is simplified! 1463 if (!divides(G, lp2iv(word))) { 1464 words = words, word; 1465 } 1466 } 1467 } 1468 words = simplify(words, 2); // remove zeroes 1462 if (!ivdivides(G, word)) { 1463 words = insert(words, word); 1464 } 1465 } 1466 } 1469 1467 return (words); 1470 1468 } 1471 1469 1472 proc divides(idealG, intvec iv) {1470 static proc ivdivides(list G, intvec iv) { 1473 1471 for (int k = 1; k <= size(G); k++) { 1474 if (isIF( lp2iv(G[k]), iv)) {1472 if (isIF(G[k], iv)) { 1475 1473 return (1); 1476 1474 } else {
Note: See TracChangeset
for help on using the changeset viewer.