Changeset e7a3e4 in git


Ignore:
Timestamp:
Jun 28, 2019, 12:10:53 PM (5 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
Children:
2547a87dad64e60844bcd9668e04b8fb86efdc64
Parents:
a9a5c25b8fcdd11965eb13df8c4dbc1fb5a2d1a63bf60ea4375573ca70d19a1802f43a5e8bb12050
git-author:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2019-06-28 10:10:53+00:00
git-committer:
GitHub <noreply@github.com>2019-06-28 10:10:53+00:00
Message:
Merge pull request #930 from steenpass/create_ring

add support for parameters givien as strings in create_ring()
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/ring.lib

    ra9a5c25 re7a3e4  
    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] */
  • Singular/iparith.cc

    r3bf60ea re7a3e4  
    10121012  if (v->next==NULL)
    10131013  {
    1014     a=(poly)u->Data(); // works also for VECTOR_CMD
    10151014    if (u->next==NULL)
    10161015    {
     1016      a=(poly)u->Data(); // works also for VECTOR_CMD
    10171017      b=(poly)v->Data(); // works also for VECTOR_CMD
    10181018      if ((a!=NULL) && (b!=NULL)
     
    10271027    }
    10281028    // u->next exists: copy v
     1029    a=(poly)u->CopyD(POLY_CMD); // works also for VECTOR_CMD
    10291030    b=pCopy((poly)v->Data());
    10301031    if ((a!=NULL) && (b!=NULL)
  • kernel/GBEngine/kutil.cc

    r3bf60ea re7a3e4  
    91549154        /*puts the elements of S also to T*/
    91559155        strat->initEcart(&h);
    9156         enterT(h,strat);
     9156        /*if (toT) - already checked*/ enterT(h,strat);
    91579157        strat->S_2_R[i] = strat->tl;
    91589158#ifdef HAVE_SHIFTBBA
    9159         if (currRing->isLPring)
     9159        if (/*(toT) && */(currRing->isLPring))
    91609160          enterTShift(h, strat);
    91619161#endif
Note: See TracChangeset for help on using the changeset viewer.