[arch-commits] Commit in cddlib/trunk (PKGBUILD cdd_both_reps.c cdd_both_reps.patch)
Date: Thursday, July 12, 2018 @ 06:29:35 Author: arojas Revision: 357490 Update to 0.94j Modified: cddlib/trunk/PKGBUILD Deleted: cddlib/trunk/cdd_both_reps.c cddlib/trunk/cdd_both_reps.patch -+ PKGBUILD| 20 --- cdd_both_reps.c | 254 -- cdd_both_reps.patch | 43 3 files changed, 4 insertions(+), 313 deletions(-) Modified: PKGBUILD === --- PKGBUILD2018-07-12 06:29:10 UTC (rev 357489) +++ PKGBUILD2018-07-12 06:29:35 UTC (rev 357490) @@ -3,33 +3,21 @@ # Contributor: Rémy Oudompheng pkgname=cddlib -pkgver=094i +pkgver=0.94j pkgrel=1 +epoch=1 pkgdesc="C library implementing Doudble Description Method for convex polyhedra" arch=(x86_64) url="https://www.inf.ethz.ch/personal/fukudak/cdd_home/; license=(GPL) depends=(gmp) -source=("ftp://ftp.math.ethz.ch/users/fukudak/cdd/cddlib-$pkgver.tar.gz; cdd_both_reps.c cdd_both_reps.patch) -sha256sums=('b8133ab74b83d225781cff1bd6f5d5940219651c708020da337d87b4707ced03' +source=("https://github.com/cddlib/cddlib/releases/download/$pkgver/$pkgname-$pkgver.tar.gz; cdd_both_reps.c cdd_both_reps.patch) +sha256sums=('27d7fcac2710755a01ef5381010140fc57c95f959c3c5705c58539d8c4d17bfb' 'f7cba3957d5d8198d07de5b64f40936da9914bc0a8040eca7ef01d66cd2d2377' 'ec750d791829f3124787e2d4a376ff8316e179600505fee5513ca0e3320535d2') -prepare() { - cd $pkgname-$pkgver - patch -p1 -i "$srcdir"/cdd_both_reps.patch - ln -s "$srcdir"/cdd_both_reps.c src - ln -s "$srcdir"/cdd_both_reps.c src-gmp - -# Remove debug - sed -e 's|localdebug=dd_TRUE|localdebug=dd_FALSE|g' \ --i lib-src/cddlp.c -i lib-src-gmp/cddlp.c -i lib-src-gmp/cddlp_f.c -} - build() { cd $pkgname-$pkgver - - autoreconf -ifs ./configure --prefix=/usr make } Deleted: cdd_both_reps.c === --- cdd_both_reps.c 2018-07-12 06:29:10 UTC (rev 357489) +++ cdd_both_reps.c 2018-07-12 06:29:35 UTC (rev 357490) @@ -1,254 +0,0 @@ -/* cdd_both_reps.c: compute reduced H and V representation of polytope - by Volker Braun - - The input is taken from stdin and can be either a - H or V representation, not necessarily reduced. - - based on testcdd1.c, redcheck.c, and of course the cdd library - written by Komei Fukuda, fuk...@ifor.math.ethz.ch - Standard ftp site: ftp.ifor.math.ethz.ch, Directory: pub/fukuda/cdd -*/ - -/* This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#include "setoper.h" -#include "cdd.h" -#include -#include -#include -#include -#include - - - - - -void compute_adjacency(dd_MatrixPtr Rep, dd_ErrorType* err_ptr) -{ - dd_SetFamilyPtr AdjacencyGraph; - if (*err_ptr != dd_NoError) return; - - switch (Rep->representation) { - case dd_Inequality: -printf("Facet graph\n"); -break; - case dd_Generator: -printf("Vertex graph\n"); -break; - case dd_Unspecified: -printf("unknown representation type!\n"); - default: -printf("This should be unreachable!\n"); -exit(2); - } - - /* Output adjacency of vertices/rays/lines */ - if (Rep->rowsize > 0) { /* workaround for bug with empty polyhedron */ -/* compute adjacent vertices/rays/lines */ -AdjacencyGraph = dd_Matrix2Adjacency(Rep, err_ptr); -if (*err_ptr == dd_NoError) { - dd_WriteSetFamily(stdout,AdjacencyGraph); - dd_FreeSetFamily(AdjacencyGraph); -} - } else { -printf("begin\n"); -printf(" 00\n"); -printf("end\n"); - } - - printf("\n"); -} - - -void minimal_Vrep_Hrep(dd_MatrixPtr M, - dd_MatrixPtr* Vrep_ptr, dd_MatrixPtr* Hrep_ptr, - dd_ErrorType* err_ptr) -{ - dd_PolyhedraPtr poly; - dd_rowindex newpos; - dd_rowset impl_linset,redset; - dd_MatrixPtr Vrep, Hrep; - - if (*err_ptr != dd_NoError) return; - - /* compute the second representation */ - poly = dd_DDMatrix2Poly(M, err_ptr); - if (*err_ptr != dd_NoError) return; - - if (*err_ptr == dd_NoError) { -/* compute canonical H-representation */ -Hrep = dd_CopyInequalities(poly); -if (Hrep->rowsize > 0) { /* workaround for bug with empty matrix */ - dd_MatrixCanonicalize(, _linset, , , err_ptr); -
[arch-commits] Commit in cddlib/trunk (PKGBUILD cdd_both_reps.c cdd_both_reps.patch)
Date: Saturday, January 3, 2015 @ 12:47:59 Author: arojas Revision: 125208 Add binaries needed by Sage Added: cddlib/trunk/cdd_both_reps.c cddlib/trunk/cdd_both_reps.patch Modified: cddlib/trunk/PKGBUILD -+ PKGBUILD| 20 ++- cdd_both_reps.c | 254 ++ cdd_both_reps.patch | 43 3 files changed, 311 insertions(+), 6 deletions(-) Modified: PKGBUILD === --- PKGBUILD2015-01-03 10:06:13 UTC (rev 125207) +++ PKGBUILD2015-01-03 11:47:59 UTC (rev 125208) @@ -3,17 +3,28 @@ pkgname=cddlib pkgver=094g -pkgrel=1 +pkgrel=2 pkgdesc=C library implementing Doudble Description Method for convex polyhedra arch=('i686' 'x86_64') url=http://www.ifor.math.ethz.ch/~fukuda/cdd_home/cdd.html; license=('GPL') depends=('gmp') -source=(ftp://ftp.ifor.math.ethz.ch/pub/fukuda/cdd/$pkgname-$pkgver.tar.gz) -md5sums=('b5b1a6cc5a82beac814418907602bfeb') +source=(ftp://ftp.ifor.math.ethz.ch/pub/fukuda/cdd/$pkgname-$pkgver.tar.gz; 'cdd_both_reps.c' 'cdd_both_reps.patch') +md5sums=('b5b1a6cc5a82beac814418907602bfeb' + 'c80ebe354f615144de14c826cadc3bf6' + '84c7d505ffd46524ffc8ab2de1c5713d') +prepare() { + cd $pkgname-$pkgver + patch -p1 -i $srcdir/cdd_both_reps.patch + ln -s $srcdir/cdd_both_reps.c src + ln -s $srcdir/cdd_both_reps.c src-gmp +} + build() { cd $pkgname-$pkgver + + autoreconf -ifs ./configure --prefix=/usr make } @@ -21,7 +32,4 @@ package() { cd $pkgname-$pkgver make DESTDIR=$pkgdir install - - # Remove example programs - rm -rf $pkgdir/usr/bin } Added: cdd_both_reps.c === --- cdd_both_reps.c (rev 0) +++ cdd_both_reps.c 2015-01-03 11:47:59 UTC (rev 125208) @@ -0,0 +1,254 @@ +/* cdd_both_reps.c: compute reduced H and V representation of polytope + by Volker Braun vbr...@stp.dias.ie + + The input is taken from stdin and can be either a + H or V representation, not necessarily reduced. + + based on testcdd1.c, redcheck.c, and of course the cdd library + written by Komei Fukuda, fuk...@ifor.math.ethz.ch + Standard ftp site: ftp.ifor.math.ethz.ch, Directory: pub/fukuda/cdd +*/ + +/* This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include setoper.h +#include cdd.h +#include stdio.h +#include stdlib.h +#include time.h +#include math.h +#include string.h + + + + + +void compute_adjacency(dd_MatrixPtr Rep, dd_ErrorType* err_ptr) +{ + dd_SetFamilyPtr AdjacencyGraph; + if (*err_ptr != dd_NoError) return; + + switch (Rep-representation) { + case dd_Inequality: +printf(Facet graph\n); +break; + case dd_Generator: +printf(Vertex graph\n); +break; + case dd_Unspecified: +printf(unknown representation type!\n); + default: +printf(This should be unreachable!\n); +exit(2); + } + + /* Output adjacency of vertices/rays/lines */ + if (Rep-rowsize 0) { /* workaround for bug with empty polyhedron */ +/* compute adjacent vertices/rays/lines */ +AdjacencyGraph = dd_Matrix2Adjacency(Rep, err_ptr); +if (*err_ptr == dd_NoError) { + dd_WriteSetFamily(stdout,AdjacencyGraph); + dd_FreeSetFamily(AdjacencyGraph); +} + } else { +printf(begin\n); +printf( 00\n); +printf(end\n); + } + + printf(\n); +} + + +void minimal_Vrep_Hrep(dd_MatrixPtr M, + dd_MatrixPtr* Vrep_ptr, dd_MatrixPtr* Hrep_ptr, + dd_ErrorType* err_ptr) +{ + dd_PolyhedraPtr poly; + dd_rowindex newpos; + dd_rowset impl_linset,redset; + dd_MatrixPtr Vrep, Hrep; + + if (*err_ptr != dd_NoError) return; + + /* compute the second representation */ + poly = dd_DDMatrix2Poly(M, err_ptr); + if (*err_ptr != dd_NoError) return; + + if (*err_ptr == dd_NoError) { +/* compute canonical H-representation */ +Hrep = dd_CopyInequalities(poly); +if (Hrep-rowsize 0) { /* workaround for bug with empty matrix */ + dd_MatrixCanonicalize(Hrep, impl_linset, redset, newpos, err_ptr); + if (*err_ptr == dd_NoError) { + set_free(redset); + set_free(impl_linset); + free(newpos); + } +} +if (*err_ptr == dd_NoError) (*Hrep_ptr) =