Changeset 2547a8 in git for Singular/LIB/ring.lib


Ignore:
Timestamp:
Jun 28, 2019, 12:11:49 PM (5 years ago)
Author:
Hans Schoenemann <hannes@…>
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
Message:
Merge pull request #932 from sebasguts/sg/dummy_lib

Added Dummy.lib
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/ring.lib

    r5dd8f4 r2547a8  
    13811381}
    13821382
     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 */
     1390static 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 */
    13831413static proc parse_L2(string l2)
    13841414{
     1415  if (find(l2, "(", 1) == 0)   // no parentheses
     1416  {
     1417      return(list(l2));
     1418  }
    13851419  list V = tuple_to_tokens(l2);
    13861420  return(V);
     
    14341468  {
    14351469    list L =  parse_ordering(l3, n_vars);
    1436     return(L);
     1470    return(list(L));
    14371471  }
    14381472  // block orderings
     
    14541488         ideal(0). If \"no_minpoly\" is given, then the minimal polynomial
    14551489         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.
    14571493         Indexed variables as in \"(x(1..3),y,z)\" are not supported.
    14581494         Strings representing orderings such as \"dp\" or \"(lp(3), ds(2))\"
     
    14911527
    14921528  /* L[1] */
    1493   if (no_minpoly)
    1494   {
    1495     if (typeof(l1) == "list")
     1529  if (typeof(l2) == "list")
     1530  {
     1531    if (no_minpoly)
    14961532    {
    1497       if (size(l1) == 4)
     1533      if (typeof(l1) == "list")
    14981534      {
    1499         if (typeof(l1[4]) == "ideal")
     1535        if (size(l1) == 4)
    15001536        {
    1501           l1[4] = ideal(0);
     1537          if (typeof(l1[4]) == "ideal")
     1538          {
     1539            l1[4] = ideal(0);
     1540          }
    15021541        }
    15031542      }
    15041543    }
    1505   }
    1506   L[1] = l1;
     1544    L[1] = l1;
     1545  }
     1546  else
     1547  {
     1548    L[1] = parse_L1(l1);
     1549  }
    15071550
    15081551  /* L[2] */
Note: See TracChangeset for help on using the changeset viewer.