Changeset 2547a8 in git for Singular/LIB/ring.lib
- Timestamp:
- Jun 28, 2019, 12:11:49 PM (5 years ago)
- Branches:
- (u'spielwiese', '2a584933abf2a2d3082034c7586d38bb6de1a30a')
- Children:
- 299cf9dabe65794572ba7a95c0fa1430dbb7331d
- Parents:
- e7a3e4622a4ee37e827a79a11823ede5565a346f5dd8f4a565675c9ea4ab19c919bf4a2745aa3129
- git-author:
- Hans Schoenemann <hannes@mathematik.uni-kl.de>2019-06-28 10:11:49+00:00
- git-committer:
- GitHub <noreply@github.com>2019-06-28 10:11:49+00:00
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/ring.lib
r5dd8f4 r2547a8 1381 1381 } 1382 1382 1383 /* 1384 * parses 1385 * "0" and "(0)" to 0, 1386 * "32003" and "(32003)" to 32003, and 1387 * "(32003,a,b,c)" to 1388 * list(32003, list("a", "b", "c"), list(list("lp", 1:3)), ideal(0)) 1389 */ 1390 static proc parse_L1(string l1) 1391 { 1392 if (find(l1, "(", 1) == 0) // no parentheses 1393 { 1394 return(int(l1)); 1395 } 1396 list tokens = tuple_to_tokens(l1); 1397 if (size(tokens) == 1) 1398 { 1399 return(int(tokens[1])); 1400 } 1401 list L = int(tokens[1]); 1402 L[2] = list(tokens[2..size(tokens)]); 1403 L[3] = list(list("lp", 1:(size(tokens)-1))); 1404 L[4] = ideal(0); 1405 return(L); 1406 } 1407 1408 /* 1409 * parses 1410 * "x" to list("x") and 1411 * "(x,y,z)" to list("x", "y", "z") 1412 */ 1383 1413 static proc parse_L2(string l2) 1384 1414 { 1415 if (find(l2, "(", 1) == 0) // no parentheses 1416 { 1417 return(list(l2)); 1418 } 1385 1419 list V = tuple_to_tokens(l2); 1386 1420 return(V); … … 1434 1468 { 1435 1469 list L = parse_ordering(l3, n_vars); 1436 return( L);1470 return(list(L)); 1437 1471 } 1438 1472 // block orderings … … 1454 1488 ideal(0). If \"no_minpoly\" is given, then the minimal polynomial 1455 1489 in l1, if present, is set to 0. 1456 @* Shortcuts: Strings such as \"(x,y,z)\" can be given as l2. 1490 @* Shortcuts: Strings such as \"0\", \"(32003)\" or \"(0,a,b,c)\" can 1491 be given as l1. Indexed parameters as in \"(0,a(1..3))\" are 1492 not supported. Strings such as \"(x,y,z)\" can be given as l2. 1457 1493 Indexed variables as in \"(x(1..3),y,z)\" are not supported. 1458 1494 Strings representing orderings such as \"dp\" or \"(lp(3), ds(2))\" … … 1491 1527 1492 1528 /* L[1] */ 1493 if ( no_minpoly)1494 { 1495 if ( typeof(l1) == "list")1529 if (typeof(l2) == "list") 1530 { 1531 if (no_minpoly) 1496 1532 { 1497 if ( size(l1) == 4)1533 if (typeof(l1) == "list") 1498 1534 { 1499 if ( typeof(l1[4]) == "ideal")1535 if (size(l1) == 4) 1500 1536 { 1501 l1[4] = ideal(0); 1537 if (typeof(l1[4]) == "ideal") 1538 { 1539 l1[4] = ideal(0); 1540 } 1502 1541 } 1503 1542 } 1504 1543 } 1505 } 1506 L[1] = l1; 1544 L[1] = l1; 1545 } 1546 else 1547 { 1548 L[1] = parse_L1(l1); 1549 } 1507 1550 1508 1551 /* L[2] */
Note: See TracChangeset
for help on using the changeset viewer.