[SCM] an open source computer algebra system branch, cleanedupstream, updated. 6125e540ca6d66c307958938a9d53b245507c323
Bernhard R. Link
brlink at debian.org
Tue Apr 24 15:54:24 UTC 2012
The following commit has been merged in the cleanedupstream branch:
commit bfb0a6180d22a93a4c0509a977a52c01005d457b
Author: Yue Ren <ren at mathematik.uni-kl.de>
Date: Mon Mar 26 16:22:57 2012 +0200
chg: various bugfixes
diff --git a/callgfanlib/bbfan.cc b/callgfanlib/bbfan.cc
index 4f0a409..fdd9f99 100644
--- a/callgfanlib/bbfan.cc
+++ b/callgfanlib/bbfan.cc
@@ -115,8 +115,9 @@ static gfan::IntMatrix permutationIntMatrix(const intvec* iv)
for (int r = 1; r <= rr; r++)
for (int c = 1; c <= cc; c++)
IMATELEM(*ivCopy, r, c) = IMATELEM(*iv, r, c) - 1;
- gfan::ZMatrix zm = intmat2ZMatrix(ivCopy);
- gfan::IntMatrix* im = new gfan::IntMatrix(gfan::ZToIntMatrix(zm));
+ gfan::ZMatrix* zm = intmat2ZMatrix(ivCopy);
+ gfan::IntMatrix* im = new gfan::IntMatrix(gfan::ZToIntMatrix(*zm));
+ delete zm;
return *im;
}
static BOOLEAN jjFANEMPTY_I(leftv res, leftv v)
diff --git a/callgfanlib/bbpolytope.cc b/callgfanlib/bbpolytope.cc
index b56a0b3..3a84cd8 100644
--- a/callgfanlib/bbpolytope.cc
+++ b/callgfanlib/bbpolytope.cc
@@ -138,9 +138,10 @@ static BOOLEAN ppCONERAYS1(leftv res, leftv v)
entire lines in the cone);
valid parametrizations: (intmat) */
intvec* rays = (intvec *)v->CopyD(INTVEC_CMD);
- gfan::ZMatrix zm = intmat2ZMatrix(rays);
+ gfan::ZMatrix* zm = intmat2ZMatrix(rays);
gfan::ZCone* zc = new gfan::ZCone();
- *zc = gfan::ZCone::givenByRays(zm, gfan::ZMatrix(0, zm.getWidth()));
+ *zc = gfan::ZCone::givenByRays(*zm, gfan::ZMatrix(0, zm->getWidth()));
+ delete zm;
zc->canonicalize();
res->rtyp = polytopeID;
res->data = (char *)zc;
@@ -166,9 +167,10 @@ static BOOLEAN ppCONERAYS3(leftv res, leftv u, leftv v)
return TRUE;
}
k=k*2;
- gfan::ZMatrix zm = intmat2ZMatrix(rays);
+ gfan::ZMatrix* zm = intmat2ZMatrix(rays);
gfan::ZCone* zc = new gfan::ZCone();
- *zc = gfan::ZCone::givenByRays(zm,gfan::ZMatrix(0, zm.getWidth()));
+ *zc = gfan::ZCone::givenByRays(*zm,gfan::ZMatrix(0, zm->getWidth()));
+ delete zm;
zc->canonicalize();
//k should be passed on to zc; not available yet
res->rtyp = polytopeID;
@@ -199,9 +201,10 @@ static BOOLEAN pqCONERAYS1(leftv res, leftv v)
entire lines in the cone);
valid parametrizations: (intmat) */
intvec* rays = (intvec *)v->CopyD(INTVEC_CMD);
- gfan::ZMatrix zm = intmat2ZMatrix(rays);
+ gfan::ZMatrix* zm = intmat2ZMatrix(rays);
gfan::ZCone* zc = new gfan::ZCone();
- *zc = gfan::ZCone::givenByRays(zm, gfan::ZMatrix(0, zm.getWidth()));
+ *zc = gfan::ZCone::givenByRays(*zm, gfan::ZMatrix(0, zm->getWidth()));
+ delete zm;
res->rtyp = polytopeID;
res->data = (char *)zc;
return FALSE;
@@ -226,9 +229,10 @@ static BOOLEAN pqCONERAYS3(leftv res, leftv u, leftv v)
return TRUE;
}
k=k*2;
- gfan::ZMatrix zm = intmat2ZMatrix(rays);
+ gfan::ZMatrix* zm = intmat2ZMatrix(rays);
gfan::ZCone* zc = new gfan::ZCone();
- *zc = gfan::ZCone::givenByRays(zm,gfan::ZMatrix(0, zm.getWidth()));
+ *zc = gfan::ZCone::givenByRays(*zm,gfan::ZMatrix(0, zm->getWidth()));
+ delete zm;
//k should be passed on to zc; not available yet
res->rtyp = polytopeID;
res->data = (char *)zc;
@@ -256,8 +260,9 @@ static BOOLEAN ppCONENORMALS1(leftv res, leftv v)
/* method for generating a cone object from inequalities;
valid parametrizations: (intmat) */
intvec* inequs = (intvec *)v->CopyD(INTVEC_CMD);
- gfan::ZMatrix zm = intmat2ZMatrix(inequs);
- gfan::ZCone* zc = new gfan::ZCone(zm, gfan::ZMatrix(0, zm.getWidth()));
+ gfan::ZMatrix* zm = intmat2ZMatrix(inequs);
+ gfan::ZCone* zc = new gfan::ZCone(*zm, gfan::ZMatrix(0, zm->getWidth()));
+ delete zm;
res->rtyp = polytopeID;
res->data = (char *)zc;
return FALSE;
@@ -278,9 +283,10 @@ static BOOLEAN ppCONENORMALS2(leftv res, leftv u, leftv v)
inequs->cols(), equs->cols());
return TRUE;
}
- gfan::ZMatrix zm1 = intmat2ZMatrix(inequs);
- gfan::ZMatrix zm2 = intmat2ZMatrix(equs);
- gfan::ZCone* zc = new gfan::ZCone(zm1, zm2);
+ gfan::ZMatrix* zm1 = intmat2ZMatrix(inequs);
+ gfan::ZMatrix* zm2 = intmat2ZMatrix(equs);
+ gfan::ZCone* zc = new gfan::ZCone(*zm1, *zm2);
+ delete zm1, zm2;
res->rtyp = polytopeID;
res->data = (char *)zc;
return FALSE;
@@ -309,9 +315,10 @@ static BOOLEAN ppCONENORMALS3(leftv res, leftv u, leftv v, leftv w)
WerrorS("expected int argument in [0..3]");
return TRUE;
}
- gfan::ZMatrix zm1 = intmat2ZMatrix(inequs);
- gfan::ZMatrix zm2 = intmat2ZMatrix(equs);
- gfan::ZCone* zc = new gfan::ZCone(zm1, zm2, k);
+ gfan::ZMatrix* zm1 = intmat2ZMatrix(inequs);
+ gfan::ZMatrix* zm2 = intmat2ZMatrix(equs);
+ gfan::ZCone* zc = new gfan::ZCone(*zm1, *zm2, k);
+ delete zm1, zm2;
res->rtyp = polytopeID;
res->data = (char *)zc;
return FALSE;
@@ -343,8 +350,8 @@ static BOOLEAN pqCONENORMALS1(leftv res, leftv v)
/* method for generating a cone object from inequalities;
valid parametrizations: (intmat) */
intvec* inequs = (intvec *)v->CopyD(INTVEC_CMD);
- gfan::ZMatrix zm = intmat2ZMatrix(inequs);
- gfan::ZCone* zc = new gfan::ZCone(zm, gfan::ZMatrix(0, zm.getWidth()));
+ gfan::ZMatrix* zm = intmat2ZMatrix(inequs);
+ gfan::ZCone* zc = new gfan::ZCone(*zm, gfan::ZMatrix(0, zm->getWidth()));
res->rtyp = polytopeID;
res->data = (char *)zc;
return FALSE;
@@ -365,9 +372,10 @@ static BOOLEAN pqCONENORMALS2(leftv res, leftv u, leftv v)
inequs->cols(), equs->cols());
return TRUE;
}
- gfan::ZMatrix zm1 = intmat2ZMatrix(inequs);
- gfan::ZMatrix zm2 = intmat2ZMatrix(equs);
- gfan::ZCone* zc = new gfan::ZCone(zm1, zm2);
+ gfan::ZMatrix* zm1 = intmat2ZMatrix(inequs);
+ gfan::ZMatrix* zm2 = intmat2ZMatrix(equs);
+ gfan::ZCone* zc = new gfan::ZCone(*zm1, *zm2);
+ delete zm1, zm2;
res->rtyp = polytopeID;
res->data = (char *)zc;
return FALSE;
@@ -396,9 +404,10 @@ static BOOLEAN pqCONENORMALS3(leftv res, leftv u, leftv v, leftv w)
WerrorS("expected int argument in [0..3]");
return TRUE;
}
- gfan::ZMatrix zm1 = intmat2ZMatrix(inequs);
- gfan::ZMatrix zm2 = intmat2ZMatrix(equs);
- gfan::ZCone* zc = new gfan::ZCone(zm1, zm2, k);
+ gfan::ZMatrix* zm1 = intmat2ZMatrix(inequs);
+ gfan::ZMatrix* zm2 = intmat2ZMatrix(equs);
+ gfan::ZCone* zc = new gfan::ZCone(*zm1, *zm2, k);
+ delete zm1, zm2;
res->rtyp = polytopeID;
res->data = (char *)zc;
return FALSE;
diff --git a/callpolymake/polymake_wrapper.cc b/callpolymake/polymake_wrapper.cc
index 712eb4f..6134d46 100644
--- a/callpolymake/polymake_wrapper.cc
+++ b/callpolymake/polymake_wrapper.cc
@@ -1799,14 +1799,14 @@ BOOLEAN PMpolytopeViaVertices(leftv res, leftv args)
}
-BOOLEAN loadPolymakeDocumentation(leftv res, leftv args)
-{
- init_polymake_help();
+// BOOLEAN loadPolymakeDocumentation(leftv res, leftv args)
+// {
+// init_polymake_help();
- res->rtyp = NONE;
- res->data = NULL;
- return FALSE;
-}
+// res->rtyp = NONE;
+// res->data = NULL;
+// return FALSE;
+// }
extern "C" int mod_init(void* polymakesingular)
@@ -1864,10 +1864,10 @@ extern "C" int mod_init(void* polymakesingular)
// iiAddCproc("","testingvisuals",FALSE,testingvisuals);
// iiAddCproc("","testingstrings",FALSE,testingstrings);
// iiAddCproc("","testingmatrices",FALSE,testingmatrices);
- iiAddCproc("","loadPolymakeDocumentation",FALSE,loadPolymakeDocumentation);
+ // iiAddCproc("","loadPolymakeDocumentation",FALSE,loadPolymakeDocumentation);
blackbox* b=getBlackboxStuff(polytopeID);
b->blackbox_Op2=bbpolytope_Op2;
- // init_polymake_help();
+ init_polymake_help();
}
--
an open source computer algebra system
More information about the debian-science-commits
mailing list