[SCM] an open source computer algebra system branch, cleanedupstream, updated. 6125e540ca6d66c307958938a9d53b245507c323

Bernhard R. Link brlink at debian.org
Tue Apr 24 15:53:57 UTC 2012


The following commit has been merged in the cleanedupstream branch:
commit 8bc23244355f18ae8789c624c179d9bb420e3de2
Author: Hans Schoenemann <hannes at mathematik.uni-kl.de>
Date:   Fri Mar 2 12:15:13 2012 +0100

    fix: rCompose/NegOffset for ordering am

diff --git a/Singular/ipshell.cc b/Singular/ipshell.cc
index 6a18d65..e9e91d6 100644
--- a/Singular/ipshell.cc
+++ b/Singular/ipshell.cc
@@ -2199,6 +2199,19 @@ ring rCompose(const lists  L)
              R->wvhdl[j][i]=(*iv)[i];
            }
            break;
+         case ringorder_am:
+           R->wvhdl[j] =( int *)omAlloc((iv->length()+1)*sizeof(int));
+           for (i=0; i<iv_len;i++)
+           {
+             R->wvhdl[j][i]=(*iv)[i];
+           }
+           R->wvhdl[j][i]=iv->length() - iv_len;
+           //printf("ivlen:%d,iv->len:%d,mod:%d\n",iv_len,iv->length(),R->wvhdl[j][i]);
+           for (; i<iv->length(); i++)
+           {
+              R->wvhdl[j][i+1]=(*iv)[i];
+           }
+           break;
          case ringorder_M:
            R->wvhdl[j] =( int *)omAlloc((iv->length())*sizeof(int));
            for (i=0; i<iv->length();i++) R->wvhdl[j][i]=(*iv)[i];
diff --git a/kernel/ring.cc b/kernel/ring.cc
index fdac221..d4a0bd2 100644
--- a/kernel/ring.cc
+++ b/kernel/ring.cc
@@ -3484,7 +3484,9 @@ static void rSetNegWeight(ring r)
     l=0;
     for(i=0;i<r->OrdSize;i++)
     {
-      if(r->typ[i].ord_typ==ro_wp_neg) l++;
+      if((r->typ[i].ord_typ==ro_wp_neg)
+      ||(r->typ[i].ord_typ==ro_am))
+        l++;
     }
     if (l>0)
     {
@@ -3498,6 +3500,11 @@ static void rSetNegWeight(ring r)
           r->NegWeightL_Offset[l]=r->typ[i].data.wp.place;
           l++;
         }
+        else if(r->typ[i].ord_typ==ro_am)
+        {
+          r->NegWeightL_Offset[l]=r->typ[i].data.am.place;
+          l++;
+        }
       }
       return;
     }

-- 
an open source computer algebra system



More information about the debian-science-commits mailing list