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

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


The following commit has been merged in the cleanedupstream branch:
commit e0ae601b20c6f835e17f460e2c408da4c32ad14c
Author: Yue Ren <ren at mathematik.uni-kl.de>
Date:   Thu Feb 16 19:25:04 2012 +0100

    FIX: scalePolytope

diff --git a/callgfanlib/bbpolytope.cc b/callgfanlib/bbpolytope.cc
index 12b9cde..92e34fc 100644
--- a/callgfanlib/bbpolytope.cc
+++ b/callgfanlib/bbpolytope.cc
@@ -501,13 +501,12 @@ BOOLEAN scalePolytope(leftv res, leftv args)
     leftv v = u->next;
     if ((v != NULL) && (v->Typ() == polytopeID))
     {
-
-      int* n = (int*) u->Data();
+      int s = (int)(long) u->Data();
       gfan::ZCone* zp = (gfan::ZCone*) v->Data();
       gfan::ZMatrix zm = zp->extremeRays();
-      for (int i=1; i<zm.getHeight(); i++)
+      for (int i=0; i<zm.getHeight(); i++)
         for (int j=1; j<zm.getWidth(); j++)
-          zm[i][j]+=1;
+          zm[i][j]*=s;
       gfan::ZCone* zq = new gfan::ZCone();
       *zq = gfan::ZCone::givenByRays(zm,gfan::ZMatrix(0, zm.getWidth()));
       res->rtyp = polytopeID;
diff --git a/callpolymake/polymake.cc b/callpolymake/polymake.cc
index 645e647..87e901a 100755
--- a/callpolymake/polymake.cc
+++ b/callpolymake/polymake.cc
@@ -351,11 +351,11 @@ static BOOLEAN bbpolytope_Op2(int op, leftv res, leftv i1, leftv i2)
     {
       if (i2->Typ()==INT_CMD)
       {
-        int* s = (int*) i2->Data();
+        int s = (int)(long) i2->Data();
         gfan::ZMatrix zm = zp->extremeRays();
-        for (int i=1; i<zm.getHeight(); i++)
+        for (int i=0; i<zm.getHeight(); i++)
           for (int j=1; j<zm.getWidth(); j++)
-            zm[i][j]+=1;
+            zm[i][j] *= s;
         gfan::ZCone* zs = new gfan::ZCone();
         *zs = gfan::ZCone::givenByRays(zm,gfan::ZMatrix(0, zm.getWidth()));
         res->rtyp = polytopeID;

-- 
an open source computer algebra system



More information about the debian-science-commits mailing list