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

Bernhard R. Link brlink at debian.org
Tue Apr 24 15:54:18 UTC 2012


The following commit has been merged in the cleanedupstream branch:
commit d626f779026a93d22c46e3d0ece3114ce413279d
Author: Yue Ren <ren at mathematik.uni-kl.de>
Date:   Tue Mar 6 19:05:17 2012 +0100

    fix: maximalValue and minimalValue

diff --git a/Singular/LIB/divisors.lib b/Singular/LIB/divisors.lib
index e320fc3..caad1f9 100755
--- a/Singular/LIB/divisors.lib
+++ b/Singular/LIB/divisors.lib
@@ -351,15 +351,12 @@ if (!(containsInSupport(dC,vv))) {ERROR("the linear form given should be in the
 for (i=1; i<=size(L);i++){
         vL[i]=list(); 
         vL[i][2]=L[i][2];
-	vL[i][1]=Polymake::minimalValue(L[i][1],vv);
+	      vL[i][1]=Polymake::minimalValue(L[i][1],vv);
 }
 vD.summands = vL;
 return(vD);}
 
 
-
-
-
 proc pdivisorplus(pdivisor A, pdivisor B){
 pdivisor C;
 int i,p;
diff --git a/callpolymake/polymake.cc b/callpolymake/polymake.cc
index 73ac7f0..55a061b 100755
--- a/callpolymake/polymake.cc
+++ b/callpolymake/polymake.cc
@@ -362,6 +362,17 @@ polymake::perl::Object ZPolytope2PmPolytope (gfan::ZCone* zc)
   return pp;
 }
 
+polymake::perl::Object oldZPolytope2PmPolytope (gfan::ZCone* zc)
+{
+  gfan::ZMatrix zm = zc->extremeRays();
+
+  polymake::Matrix<polymake::Integer> pm = GfZMatrix2PmMatrixInteger(&zm);
+  polymake::perl::Object pp("Polytope<Rational>");
+  pp.take("VERTICES") << pm;
+
+  return pp;
+}
+
 polymake::Matrix<polymake::Integer> raysOf(gfan::ZFan* zf)
 {
   int d = zf->getAmbientDimension();
@@ -1589,7 +1600,6 @@ BOOLEAN PMmaximalValue(leftv res, leftv args)
         try
         {
           polymake::perl::Object p = ZPolytope2PmPolytope(zp); 
-          polymake::Matrix<polymake::Rational> ver = p.give("VERTICES");
           polymake::Vector<polymake::Integer> lo = Intvec2PmVectorInteger(iv);
           polymake::perl::Object o("LinearProgram<Rational>");
           o.take("LINEAR_OBJECTIVE") << lo;
@@ -1620,7 +1630,6 @@ BOOLEAN PMmaximalValue(leftv res, leftv args)
   return TRUE;
 }
 
-
 BOOLEAN PMminimalValue(leftv res, leftv args)
 {
   leftv u = args;
@@ -1637,7 +1646,6 @@ BOOLEAN PMminimalValue(leftv res, leftv args)
         try
         {
           polymake::perl::Object p = ZPolytope2PmPolytope(zp); 
-          polymake::Matrix<polymake::Rational> ver = p.give("VERTICES");
           polymake::Vector<polymake::Integer> lo = Intvec2PmVectorInteger(iv);
           polymake::perl::Object o("LinearProgram<Rational>");
           o.take("LINEAR_OBJECTIVE") << lo;
@@ -1818,7 +1826,9 @@ BOOLEAN testingcones(leftv res, leftv args)  // for testing purposes
   if ((u != NULL) && (u->Typ() == coneID))
     {
       gfan::ZCone* zc = (gfan::ZCone*) u->Data();
+      Print("converting gfan cone to polymake cone...\n");
       polymake::perl::Object pc = ZCone2PmCone(zc);
+      Print("converting polymake cone to gfan cone...\n");
       gfan::ZCone* zd = new gfan::ZCone(PmCone2ZCone(&pc));
       // res->rtyp = coneID;
       // res->data = (char *) zd;
@@ -1931,7 +1941,7 @@ BOOLEAN PMconeViaRays(leftv res, leftv args)
     {
       intvec* lines = (intvec*) v->Data(); // these will be lines in the cone
       polymake::Matrix<polymake::Integer> pmlines = Intvec2PmMatrixInteger(lines);
-      pc.take("INPUT_LINEALITY_SPACE") << pmlines;
+      pc.take("INPUT_LINEALITY") << pmlines;
 
       leftv w = v->next;
       if ((w != NULL) && (w->Typ() == INT_CMD))

-- 
an open source computer algebra system



More information about the debian-science-commits mailing list