debian/0000755000000000000000000000000012201676551007173 5ustar debian/lrslib.docs0000644000000000000000000000000712201676420011324 0ustar readme debian/compat0000644000000000000000000000000212201676420010364 0ustar 7 debian/lrslib.1.xml0000644000000000000000000004251612201676420011346 0ustar LRSLIB 1 July 2009 lrslib 0.42b lrslib Convert between represetations of convex polyhedra. lrs input.ine lrs input.ine | lrsbuffer lrsfourier file.ine [fileout] redund input.ine DESCRIPTION A polyhedron can be described by a list of inequalities (H-representation) or as by a list of its vertices and extreme rays (V-representation). lrs is a C program that converts a H-representation of a polyhedron to its V-representation, and vice versa.  These problems are known respectively at the vertex enumeration and convex hull problems. Fukuda's FAQ page   contains a more detailed introduction to the problem, along with many useful tips for the new user. lrsbuffer can remove some duplicate output. redund finds redundant inequalities in the input. File Formats File formats were developed jointly with Komei Fukuda and are compatible with cdd. The input for lrs is a H- or V- representation of a polytope. name {representation line} {options} {linearities} begin m n rational {input matrix} end {options} name is a user supplied name for the polytope.  Comments may appear before the begin or after the end, and to avoid interpretation as an option, should begin with a special character such as "*" or "#". name is a user supplied name for the polytope.  representation line is either "H-representation" or "V-representation". If is omitted, H-representation is assumed.  The input coefficients are read in free format, and are not checked for type. Coefficients are separated by white space. m is the number of rows and n the number of columns of the input matrix. H-representation The integer  m is the number of inequalities,  and the integer n is the dimension of the input +1. A list of inequalities contains the coefficients of inequalities of the form a0 + a1x1+ ... + an-1 xn-1 >=  0. This inequality is input as the line a0 a1... an-1 The coefficients can be entered as integers or rationals in the format x/y. V-representation The integer  m is the number of vertices and rays,  and the integer n is the dimension of the input +1. Each vertex is given in the form 1   v0   v 1...   vn-1   Each ray is given in the form 0   r0   r 1...   rn-1 where r0   r 1...   rn-1is a point on the ray. There must be at least one vertex in each file. For bounded polyhedra there will be no rays entered. The coefficients can be entered as integers or rationals in the format x/y. Note for cdd users: lrs uses essentially the same file format as cdd. Files prepared for cdd should work with little or no modification. Note that  the V-representation corresponds to the "hull" option in cdd. Options specific to cdd can be left in the input files and will be ignored by lrs.  Note the input files for lrs are read in free format, after the line m n rational, lrs will look for exactly m*n rationals or integers separated by white space (blank,  carriage return, tab etc.). lrs will not "drop" extra columns of input if n is less than the number of columns supplied. Basic Options Almost all options are placed after the end statement, maintaining compatibility with cdd. Where this is not the case, it will be mentioned explicitly. allbases This option instructs lrs to list each vertex (or facet) for each of its bases. Output Duplication . This option is often combined with printcobasis. bound  x Use with H-representation  - for lrs or nash Either the maximize or minimize option should be selected. x is an integer or rational. For maximization (resp. minimization) the reverse search tree is truncated  whenever the current objective value is less (resp. more) than x. cache n lrs stores the latest  n dictionaries in the reverse search tree. This speeds up the backtracking step, but requires more memory. debug  startingbasis endingbasis
Print out cryptic but detailed trace, dictionaries etc. starting at #B=startingbasis and ending at #B=endingbasis. debug 0 0 gives a complete trace.
digits n placed before the begin statement n is the maximum number of decimal digits to be used. If this is exceeded the program terminates with a message (it can  usually be restarted).   The default is set to about 100 digits. At the end of a run a message is given informing the user of the maximum integer size encountered. This may be used to optimize memory usage and speed on subsequent runs (if doing estimation for example). dualperturb If lrs is executed with the maximize or minimize option, the reverse search tree is rooted at an optimum vertex for this function.If there are mulitiple optimum vertices, the output will often not be complete. This option gives a small perturbation to the objective to avoid this. A warning message is given if the starting dictionary is dual degenerate. estimates k Estimate the output size. Used in conjunction with maxdepth - see Estimation.   geometric   // H-representation  or voronoi option only // With this option, each ray is printed together with the vertex with which it is incident. For more information see Geometric Rays in Hints and Comments . incidence
This option automatically switches on printcobasis , so see below for a description of this option first. Can be used with printcobasis n. (Ver 4.2b) For input H-representation, indices of all input inequalities that contain the vertex/ray that is about to be output. For a simplicial face, there is no new output, since these indices are already listed. Otherwise, the additional tight inequalities are listed after a colon. For input V-representation, indices of all input vertices/rays that lie on the facet that is about to be output. A starred indexindicates that this vertex  is also in the cobasis, but is not contained in the facet. It arises due to the lifting operation used with input V-representations.
#incidence
The same as printcobasis. Included for compatability with cdd.
linearity  k  i1i2 i ... ik
The input contains k linearities in rows i1i2i ... ikof the input file are equations. See Linearities.
maxdepth k The search will be truncated at depth k. All bases with depth less than or equal to k will be computed.  k is  a non-negative integer, and this option is used for estimates - see Estimation. Note: For H-representations, rays at depth k will not be reported. For V-representations, facets at depth k will not be reported. maximize a0 a1... an-1  // H-representation  only // minimize  a0 a1... an-1 // H-representation  only // If used with lrs the starting vertex maximizes (or minimizes) the function  a0 + a1x1+ ... + an-1 xn-1.The dualperturb option may be needed to avoid dual degeneracy.See Nash Equilibria and  Linear Programming maxoutput n Limits number of output lines produced (either vertices+rays or facets) to n mindepth k  Backtracking will be terminated at depth k, for k a non-negative integer. This can be used for running reverse search on subtrees as separate processes, e.g. in a distributed computing environment. nonnegative // This option must come before the begin statement// //H-representation only //   Bug: Can only be used if the origin is a vertex of the polyhedron 
For problems where the input is an H-representation of the form b+Ax>=0, x>=0 (ie. all variables non-negative, all constraints inequalities) it is not necessary to give the non-negative constraints explicitly if the nonnegative option is used. This option cannot be used for V-representations, or with the linearity option (in which case the linearities will be treated as inequalities). This option may be used with redund , but the implied nonnegativity constraints are not tested themselves for redundancy. To test everything it is necessary to enter the nonnegativity constraints explicitly in the input file. (In Ver 4.1, the origin must be a vertex).
printcobasis  k;Modified in lrs 4.0 Every k'th cobasis is printed. If k is omitted, the cobasis is printed for each vertex/ray/facet that is output. For a long run it is useful to print the cobasis occasionally so that the program can be restarted if necessary. H-representation: If the input is an H-representation the cobasis is a list the indices of the inequalities from the input file that define the current vertex or ray. See option  incidence above for more information. For rays, a cobasis is also printed. In this case the cobasis is the cobasis of the vertex from which the ray emanates. One of the indices is starred, this indicates the inequality to be dropped from the cobasis to define the ray. Alternatively, if the allbasesoption is used, all cobases will be printed out. V-representation: If the input is a V-representation, the cobasis is a list of the input vertices /rays that define the current facet. See option incidence above for more information. To initiate lrs from this facet all 4 indices must be given in this order (omit the *). printslack New in Ver 4.2 ; // Use with H-representation // lrs prints a list of the indices of the input inequalities that are satisfied strictly for the current vertex, ie. corresponding slack variable is positive. If nonnegative is set, the list will also include indices n+i for each decision variable xi which is positive. project Used by lrsfourier only. restart  V# R# B# depth {facet #s or vertex/ray #s} Modified in lrs4.0 lrs can be restarted from any known cobasis. The calculation will proceed to normal termination. All of the information is contained in the output from a printcobasis option.  The order of the indices is very important, enter them exactly as they appear in the output from the previously aborted run. Note that if some cobasic index is followed by a "*",  then the index only, without the "*", is included in the restart line. Caution: When restarting, output from the restart dictionary may be duplicated, and the final totals of number of vertices/rays/facets may reflect this. startingcobasis i1i2i ... in-1 This allows the user to specify a known cobasis for beginning the reverse search. i1i2i ... in-1 is a list of the inequalities (for H-representation) or vertices/rays (for V-representation) that define a cobasis. If it is invalid, or this option is not specified, lrs will find its own starting cobasis.
The reverse search tree is truncated(pruned)  whenever a new vertex is encountered. Note: This does note necessarily produce the set of all vertices adjacent to the optimum vertex in the polyhedron, but just a subset of them.
verbose
Print slightly more detailed information about the run.
volume // V-representation  only // Compute volume - see section Volume Computation. voronoi // V-representation  only - place immediately after end statement // Compute Voronoi diagram - see section Voronoi Diagrams.
debian/docs0000644000000000000000000000000712201676420010036 0ustar README debian/copyright0000644000000000000000000000232612201676420011124 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Source: http://cgm.cs.mcgill.ca/~avis/C/lrs.html Files: * Copyright: © Copyright 1999-2012 David Avis License: GPL2+ 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.,51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. . On Debian systems, you can find the full license text for the GPL-2 at /usr/share/common-licenses/GPL-2 Files: debian/* Copyright: © 2008-2012, David Bremner License: GPL2+ On Debian systems, you can find the full license text for the GPL-2 at /usr/share/common-licenses/GPL-2 debian/liblrs0d.links0000644000000000000000000000005612201676420011744 0ustar usr/lib/liblrs.so.0d.0.0 usr/lib/liblrs.so.0d debian/rules0000755000000000000000000000176612201676420010260 0ustar #!/usr/bin/make -f SONAME=liblrs.so.0d SOMINOR=.0.0 SHLIB=$(SONAME)$(SOMINOR) DOCBASEURL=http://cgm.cs.mcgill.ca/%7Eavis/C/lrslib/USERGUIDE.html DB2MAN=/usr/share/xml/docbook/stylesheet/docbook-xsl/manpages/docbook.xsl XP=xsltproc --nonet CFLAGS=$(shell dpkg-buildflags --get CFGLAGS) CPPFLAGS=$(shell dpkg-buildflags --get CPPFLAGS) LDFLAGS=$(shell dpkg-buildflags --get LDFLAGS) export CFLAGS CPPFLAGS LDFLAGS override_dh_auto_build: lrslib.1 nash.1 make -f debian/Makefile.debian SONAME=$(SONAME) SOMINOR=$(SOMINOR) SHLIB=$(SONAME)$(SOMINOR) \ DESTDIR=$(CURDIR)/debian/tmp all override_dh_auto_install: lrslib.1 nash.1 make -f debian/Makefile.debian SONAME=$(SONAME) SOMINOR=$(SOMINOR) SHLIB=$(SONAME)$(SOMINOR) \ DESTDIR=$(CURDIR)/debian/tmp install override_dh_auto_clean: make -f debian/Makefile.debian SONAME=$(SONAME) SOMINOR=$(SOMINOR) SHLIB=$(SONAME)$(SOMINOR) clean %: dh $@ %.1: debian/%.1.xml $(XP) --stringparam man.base.url.for.relative.links $(DOCBASEURL) -o $@ $(DB2MAN) $< debian/changelog0000644000000000000000000000063312201676420011042 0ustar lrslib (0.43-1) unstable; urgency=low * New upstream release * Enable hardening flags * Update Standards-version to 3.9.4 (no mandatory changes, debian/copyright syntax tidied.) -- David Bremner Sun, 11 Aug 2013 13:42:47 +0200 lrslib (0.42c-1) unstable; urgency=low * Initial release (Closes: #454469) -- David Bremner Fri, 16 Oct 2009 22:09:17 -0300 debian/clean0000644000000000000000000000002012201676420010163 0ustar nash.1 lrslib.1 debian/lrslib.manpages0000644000000000000000000000002012201676420012162 0ustar lrslib.1 nash.1 debian/liblrs0d.install0000644000000000000000000000003212201676420012264 0ustar liblrs.so.0d.0.0 usr/lib debian/Makefile.debian0000644000000000000000000000240712201676420012052 0ustar CC=gcc CPPFLAGS+= -DLRS_QUIET -DTIMES -DSIGNALS -DGMP # these two lines need to be in this order SHLIBFLAGS:=$(LDFLAGS) -lgmp LDFLAGS := $(LDFLAGS) -L. -llrs -lgmp # static library LIBOBJ= lrslib.o lrsgmp.o LIB=liblrs.a # Shared library SONAME ?=liblrs.so.0 SOMINOR ?=.0.0 SHLIB ?=$(SONAME)$(SOMINOR) SHLINK ?=liblrs.so %.sho: %.c ${CC} -c -fPIC ${CPPFLAGS} ${CFLAGS} -o $@ $< SHLIBOBJ=$(subst .o,.sho,$(LIBOBJ)) # Binaries BINARIES=lrs redund nash lrsfourier setupnash setupnash2 lrsbuffer 2nash %: %.c $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< $(LDFLAGS) install: all mkdir -p $(DESTDIR)/usr/lib install -t $(DESTDIR)/usr/lib $(SHLIB) $(LIB) cd $(DESTDIR)/usr/lib && ln -sf $(SHLIB) $(SHLINK) mkdir -p $(DESTDIR)/usr/bin install -t $(DESTDIR)/usr/bin $(BINARIES) mkdir -p $(DESTDIR)/usr/include install -t $(DESTDIR)/usr/include lrslib.h lrsgmp.h all: $(SHLINK) $(LIB) $(BINARIES) $(SHLINK): $(SHLIB) $(SHLIB): $(SHLIBOBJ) $(CC) -shared -Wl,-soname=$(SONAME) $(SHLIBFLAGS) -o $@ $(SHLIBOBJ) $(LIB): $(LIBOBJ) ar r $(LIB) $(LIBOBJ) lrsbuffer: buffer.c $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< $(LDFLAGS) lrsfourier: fourier.c $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< $(LDFLAGS) clean: rm -f $(LIBOBJ) $(SHLINK) $(SHLIBOBJ) $(LIB) $(SHLIB) $(BINARIES) debian/README.Debian0000644000000000000000000000024512201676420011230 0ustar The executables buffer and fourier were renamed lrsbuffer and lrsfourier to avoid name clashes. -- David Bremner , Thu, 26 Nov 2009 14:54:09 -0400 debian/nash.1.xml0000644000000000000000000001036512201676420011005 0ustar nash 1 July 2009 lrslib 0.42b nash find nash equilibria of two person noncooperative games setupnash input game1.ine game2.ine setupnash2 input game1.ine game2.ine nash game1.ine game2.ine 2nash game1.ine game2.ine DESCRIPTION Nash Equilibria All Nash equilibria (NE) for a two person noncooperative game are computed using two interleaved reverse search vertex enumeration steps. The input for the problem are two m by n matrices A,B of integers or rationals. The first player is the row player, the second is the column player. If row i and column j are played, player 1 receives Ai,j and player 2 receives Bi,j. If you have two or more cpus available run 2nash instead of nash as the order of the input games is immaterial. It runs in parallel with the games in each order. (If you use nash, the program usually runs faster if m is <= n , see below.) The easiest way to use the program nash or 2nash is to first run setupnash or ( setupnash2 see below ) on a file containing:  m n matrix A matrix B eg. the file game is for a game with m=3 n=2: 3 2 0 6 2 5 3 3 1 0 0 2 4 3 % setupnash game game1 game2 produces two H-representations, game1 and game2, one for each player. To get the equilibria, run % nash game1 game2 or % 2nash game1 game2 Each row beginning 1 is a strategy for the row player yielding a NE with each row beginning 2 listed immediately above it.The payoff for player 2 is the last number on the line beginning 1, and vice versa. Eg: first two lines of output: player 1 uses row probabilities 2/3 2/3 0 resulting in a payoff of 2/3 to player 2.Player 2 uses column probabilities 1/3 2/3 yielding a payoff of 4 to player 1. If both matrices are nonnegative and have no zero columns, you may instead use setupnash2: % setupnash2 game game1 game2 Now the polyhedra produced are polytopes. The output  of nash in this case is a list of unscaled probability vectors x and y. To normalize, divide each vector by v = 1^T x and u=1^T y.u and v are the payoffs to players 1 and 2 respectively. In this case, lower bounds on the payoff functions to either or both players may be included. To give a lower bound of r on the payoff for player 1 add the options to file game2  (yes that is correct!)To give a lower bound of r on the payoff for player 2 add the options to file game1 minimize 0 1 1 ... 1    (n entries to begiven) bound   1/r;   ( note: reciprocal of r) If you do not wish to use the 2-cpu program 2nash, please read the following. If m is greater than n then nash usually runs faster by transposing the players. This is achieved by running: % nash game2 game1 If you wish to construct the game1 and game2 files by hand, see the lrslib user manual SEE ALSO For information on H-representation file formats, see the man page for lrslib or the lrslib user manual debian/liblrs-dev.install0000644000000000000000000000016512201676420012623 0ustar usr/lib/liblrs.a usr/lib usr/lib/liblrs.so usr/lib usr/include/lrslib.h usr/include usr/include/lrsgmp.h usr/include debian/patches/0000755000000000000000000000000012201676475010627 5ustar debian/patches/series0000644000000000000000000000011212201676475012036 0ustar # exported from git by git-debcherry 0001-Make-some-symbols-private.patch debian/patches/0001-Make-some-symbols-private.patch0000644000000000000000000001626512201676475017214 0ustar From b93ed56a6c88f91c84a9f2e56bb4bac979371876 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Sun, 11 Aug 2013 11:03:12 +0200 Subject: [PATCH] Make some symbols private. These symbols are not intended to be used by clients of lrslib. - make temp1, temp2, temp3 static - make pushQ ptimes and get_time static - make dict_count, dict_limit, cache_tries, cache_misses static - convert cache_dict, check_cache, save_basis to static - make signal handling routines private - make get_time static - make new_lrs_dic static - remove declaration of ptimes from lrsgmp.h --- lrsgmp.c | 2 +- lrsgmp.h | 5 ----- lrslib.c | 49 +++++++++++++++++++++++++++++++++++++------------ lrslib.h | 22 ---------------------- lrslong.h | 5 ----- lrsmp.h | 5 ----- 6 files changed, 38 insertions(+), 50 deletions(-) diff --git a/lrsgmp.c b/lrsgmp.c index 3816422..691c74e 100755 --- a/lrsgmp.c +++ b/lrsgmp.c @@ -19,7 +19,7 @@ long digits; long record_digits; /* these are allocated once and used as temporary storage where needed */ -lrs_mp temp1,temp2,temp3; +static lrs_mp temp1,temp2,temp3; #define MAXINPUT 1000 /*max length of any input rational */ diff --git a/lrsgmp.h b/lrsgmp.h index 32c455f..60928c8 100755 --- a/lrsgmp.h +++ b/lrsgmp.h @@ -120,11 +120,6 @@ #define errcheck(s,e) if ((long)(e)==-1L){ perror(s);exit(1);} #endif -#ifndef OMIT_TIMES -void ptimes (); -#endif - - #define CALLOC(n,s) xcalloc(n,s,__LINE__,__FILE__) /*************/ diff --git a/lrslib.c b/lrslib.c index c818499..be8575f 100755 --- a/lrslib.c +++ b/lrslib.c @@ -24,6 +24,7 @@ #include #include "lrslib.h" + /* Globals; these need to be here, rather than lrslib.h, so they are not multiply defined. */ @@ -31,7 +32,8 @@ FILE *lrs_cfp; /* output file for checkpoint information */ FILE *lrs_ifp; /* input file pointer */ FILE *lrs_ofp; /* output file pointer */ -unsigned long dict_count, dict_limit, cache_tries, cache_misses; + +static unsigned long dict_count, dict_limit, cache_tries, cache_misses; /* Variables and functions global to this file only */ static long lrs_checkpoint_seconds = 0; @@ -41,9 +43,32 @@ static long lrs_global_count = 0; /* Track how many lrs_dat records are static lrs_dat_p *lrs_global_list[MAX_LRS_GLOBALS + 1]; +static lrs_dic *new_lrs_dic (long m, long d, long m_A); + + +static void cache_dict (lrs_dic ** D_p, lrs_dat * global, long i, long j); +static long check_cache (lrs_dic ** D_p, lrs_dat * global, long *i_p, long *j_p); +static void save_basis (lrs_dic * D, lrs_dat * Q); static void lrs_dump_state (); +static void pushQ (lrs_dat * global, long m, long d, long m_A); + +#ifdef TIMES +static void ptimes (); +static double get_time(); +#endif + + +/*******************************/ +/* signals handling */ +/*******************************/ +#ifdef SIGNALS +static void checkpoint (); +static void die_gracefully (); +static void setup_signals (); +static void timecheck (); +#endif /*******************************/ /* functions for external use */ @@ -3699,7 +3724,7 @@ pimat (lrs_dic * P, long r, long s, lrs_mp Nt, char name[]) /* From here mostly Bremner's handiwork */ -void +static void cache_dict (lrs_dic ** D_p, lrs_dat * global, long i, long j) { @@ -3785,7 +3810,7 @@ copy_dict (lrs_dat * global, lrs_dic * dest, lrs_dic * src) #define TRACE(s) #endif -void +static void pushQ (lrs_dat * global, long m, long d ,long m_A) { @@ -3877,7 +3902,7 @@ lrs_dic *p; #define NULLRETURN(e) if (!(e)) return NULL; -lrs_dic * +static lrs_dic * new_lrs_dic (long m, long d, long m_A) { lrs_dic *p; @@ -3979,7 +4004,7 @@ lrs_free_dat ( lrs_dat *Q ) } -long +static long check_cache (lrs_dic ** D_p, lrs_dat * global, long *i_p, long *j_p) { /* assign local variables to structures */ @@ -4131,7 +4156,7 @@ lrs_alloc_dic (lrs_dat * Q) It is also used to make sure that in case of overflow, we have a valid cobasis to restart from. */ -void +static void save_basis (lrs_dic * P, lrs_dat * Q) { int i; @@ -4240,7 +4265,7 @@ print_basis (FILE * fp, lrs_dat * global) INT (ctrl-C) ditto HUP ditto */ -void +static void setup_signals () { errcheck ("signal", signal (SIGTERM, die_gracefully)); @@ -4250,7 +4275,7 @@ setup_signals () errcheck ("signal", signal (SIGUSR1, checkpoint)); } -void +static void timecheck () { lrs_dump_state (); @@ -4258,14 +4283,14 @@ timecheck () alarm (lrs_checkpoint_seconds); } -void +static void checkpoint () { lrs_dump_state (); errcheck ("signal", signal (SIGUSR1, checkpoint)); } -void +static void die_gracefully () { lrs_dump_state (); @@ -4283,7 +4308,7 @@ die_gracefully () #include #define double_time(t) ((double)(t.tv_sec)+(double)(t.tv_usec)/1000000) -void +static void ptimes () { struct rusage rusage; @@ -4296,7 +4321,7 @@ ptimes () } -double get_time() +static double get_time() { struct rusage rusage; getrusage (RUSAGE_SELF, &rusage); diff --git a/lrslib.h b/lrslib.h index 6c131b5..47e5df1 100755 --- a/lrslib.h +++ b/lrslib.h @@ -43,12 +43,6 @@ #define errcheck(s,e) if ((long)(e)==-1L){ perror(s);exit(1);} #endif -#ifdef TIMES -void ptimes (); -double get_time(); -#endif - - #define CALLOC(n,s) xcalloc(n,s,__LINE__,__FILE__) /* make this include file includable in a C++ file @@ -208,7 +202,6 @@ lrs_dat, lrs_dat_p; extern FILE *lrs_cfp; /* output file for checkpoint information */ -extern unsigned long dict_count, dict_limit, cache_tries, cache_misses; extern lrs_dic *PBnew; /* we will save Bob's dictionary in getabasis */ @@ -314,27 +307,12 @@ long checkindex (lrs_dic * P, lrs_dat * Q, long index); /* index=0 non-red.,1 r void lrs_free_dic ( lrs_dic *P, lrs_dat *Q); void lrs_free_dat ( lrs_dat *Q); -void cache_dict (lrs_dic ** D_p, lrs_dat * global, long i, long j); -long check_cache (lrs_dic ** D_p, lrs_dat * global, long *i_p, long *j_p); void copy_dict (lrs_dat * global, lrs_dic * dest, lrs_dic * src); -void pushQ (lrs_dat * global, long m, long d, long m_A); -void save_basis (lrs_dic * D, lrs_dat * Q); lrs_dic *alloc_memory (lrs_dat * Q); lrs_dic * lrs_getdic(lrs_dat *Q); -lrs_dic *new_lrs_dic (long m, long d, long m_A); lrs_dic *resize (lrs_dic * P, lrs_dat * Q); - -/*******************************/ -/* signals handling */ -/*******************************/ - -void checkpoint (); -void die_gracefully (); -void setup_signals (); -void timecheck (); - /*******************************/ /* utilities */ /*******************************/ diff --git a/lrslong.h b/lrslong.h index af16731..53c598a 100755 --- a/lrslong.h +++ b/lrslong.h @@ -126,11 +126,6 @@ #define errcheck(s,e) if ((long)(e)==-1L){ perror(s);exit(1);} #endif -#ifndef OMIT_TIMES -void ptimes (); -#endif - - #define CALLOC(n,s) xcalloc(n,s,__LINE__,__FILE__) /*************/ diff --git a/lrsmp.h b/lrsmp.h index 14b79ef..eccf3f5 100755 --- a/lrsmp.h +++ b/lrsmp.h @@ -119,11 +119,6 @@ #define errcheck(s,e) if ((long)(e)==-1L){ perror(s);exit(1);} #endif -#ifdef TIMES -void ptimes (); -#endif - - #define CALLOC(n,s) xcalloc(n,s,__LINE__,__FILE__) /*************/ -- 1.7.10.4 debian/source/0000755000000000000000000000000012201676420010466 5ustar debian/source/format0000644000000000000000000000001412201676420011674 0ustar 3.0 (quilt) debian/watch0000644000000000000000000000051612201676420010221 0ustar # Example watch control file for uscan # Rename this file to "watch" and then you can run the "uscan" command # to check for upstream updates and more. # See uscan(1) for format # Compulsory line, this is a version 3 file version=3 opts="uversionmangle=s/0(\d+)/0.$1/" \ http://cgm.cs.mcgill.ca/~avis/C/lrslib/lrslib-(.*).tar.gz debian/README.source0000644000000000000000000000171412201676420011350 0ustar If you are reading this from a Debian source package, you can stop now; this package should build fine after extracting with dpkg-source -x. The rest of this file gives some hints about generating source packages from the packaging git repository. This package has patches to upstream source applied to the master branch. In order you generate a source package, you have several choices. To generate an old style single patch, you can use dpkg-source or e.g. gitpkg without any special preparation, with the possible exception of adding "single-debian-patch" to debian/source/local-options. In order have patches exported individually at source package creation time, you can enable "git-debcherry". After installing a recent version of gitpkg [1], see /usr/share/gitpkg/hooks/debcherry-deb-export-hook for configuration hints. -- David Bremner , Sun, 11 Aug 2013 14:00:59 +0200 [1] At time of writing this version of gitpkg is not uploaded yet. debian/lrslib.links0000644000000000000000000000061412201676420011520 0ustar usr/share/man/man1/lrslib.1 usr/share/man/man1/lrs.1 usr/share/man/man1/lrslib.1 usr/share/man/man1/lrsbuffer.1 usr/share/man/man1/lrslib.1 usr/share/man/man1/redund.1 usr/share/man/man1/lrslib.1 usr/share/man/man1/lrsfourier.1 usr/share/man/man1/nash.1 usr/share/man/man1/setupnash.1 usr/share/man/man1/nash.1 usr/share/man/man1/setupnash2.1 usr/share/man/man1/nash.1 usr/share/man/man1/2nash.1 debian/dirs0000644000000000000000000000001112201676420010042 0ustar usr/bin debian/control0000644000000000000000000000570012201676420010573 0ustar Source: lrslib Section: math Priority: optional Maintainer: David Bremner Build-Depends: debhelper (>= 7.0.50~), libgmp3-dev, xsltproc, docbook-xsl, docbook-xml Standards-Version: 3.9.4 Homepage: http://cgm.cs.mcgill.ca/~avis/C/lrs.html Vcs-Git: git://git.debian.org/git/debian-science/packages/lrslib/ Vcs-Browser: http://git.debian.org/?p=debian-science/packages/lrslib.git Package: lrslib Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: package to enumerate vertices and extreme rays of a convex polyhedron A convex polyhedron is the set of points satisfying a finite family of linear inequalities. The study of the vertices and extreme rays of such systems is important and useful in e.g. mathematics and optimization. In a dual interpretation, finding the vertices of a (bounded) polyhedron is equivalent to finding the convex hull (bounding inequalities) of an (arbitrary dimensional) set of points. Lrs (lexicographic reverse search) has two important features that can be very important for certain applications: it works in exact arithmetic, and it consumes memory proportional to the input, no matter how large the output is. Package: liblrs0d Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: package to enumerate vertices and extreme rays (shared libraries) A convex polyhedron is the set of points satisfying a finite family of linear inequalities. The study of the vertices and extreme rays of such systems is important and useful in e.g. mathematics and optimization. In a dual interpretation, finding the vertices of a (bounded) polyhedron is equivalent to finding the convex hull (bounding inequalities) of an (arbitrary dimensional) set of points. Lrs (lexicographic reverse search) has two important features that can be very important for certain applications: it works in exact arithmetic, and it consumes memory proportional to the input, no matter how large the output is. . This package contains the (required) shared library. Package: liblrs-dev Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, liblrs0d (=${binary:Version}) Section: libdevel Description: package to enumerate vertices and extreme rays (static libraries and headers) A convex polyhedron is the set of points satisfying a finite family of linear inequalities. The study of the vertices and extreme rays of such systems is important and useful in e.g. mathematics and optimization. In a dual interpretation, finding the vertices of a (bounded) polyhedron is equivalent to finding the convex hull (bounding inequalities) of an (arbitrary dimensional) set of points. Lrs (lexicographic reverse search) has two important features that can be very important for certain applications: it works in exact arithmetic, and it consumes memory proportional to the input, no matter how large the output is. . This package contains the optional static libraries and headers, useful for developers. debian/liblrs0d.symbols0000644000000000000000000000445012201676420012316 0ustar liblrs.so.0d liblrs0d #MINVER# atoaa@Base 0.42c atomp@Base 0.42c checkcobasic@Base 0.42c checkindex@Base 0.42c checkredund@Base 0.42c comprod@Base 0.42c copy_dict@Base 0.42c dan_selectpivot@Base 0.42c digits@Base 0.42c digits_overflow@Base 0.42c divrat@Base 0.42c getabasis@Base 0.42c getnextoutput@Base 0.42c ismin@Base 0.42c lcm@Base 0.42c lexmin@Base 0.42c linint@Base 0.42c linrat@Base 0.42c lprat@Base 0.42c lreadrat@Base 0.42c lrs_alloc_dat@Base 0.42c lrs_alloc_dic@Base 0.42c lrs_alloc_mp_matrix@Base 0.42c lrs_alloc_mp_vector@Base 0.42c lrs_cfp@Base 0.42c lrs_checkbound@Base 0.42c lrs_clear_mp_matrix@Base 0.42c lrs_clear_mp_vector@Base 0.42c lrs_close@Base 0.42c lrs_degenerate@Base 0.42c lrs_digits@Base 0.42c lrs_estimate@Base 0.42c lrs_free_dat@Base 0.42c lrs_free_dic@Base 0.42c lrs_getdic@Base 0.42c lrs_getdigits@Base 0.42c lrs_getfirstbasis@Base 0.42c lrs_getinput@Base 0.42c lrs_getnextbasis@Base 0.42c lrs_getray@Base 0.42c lrs_getsolution@Base 0.42c lrs_getvertex@Base 0.42c lrs_ifp@Base 0.42c lrs_init@Base 0.42c lrs_lpoutput@Base 0.42c lrs_main@Base 0.42c lrs_mp_close@Base 0.42c lrs_mp_init@Base 0.42c lrs_ofp@Base 0.42c lrs_printcobasis@Base 0.42c lrs_printoutput@Base 0.42c lrs_printrow@Base 0.42c lrs_printtotals@Base 0.42c lrs_read_dat@Base 0.42c lrs_read_dic@Base 0.42c lrs_record_digits@Base 0.42c lrs_set_digits@Base 0.42c lrs_set_obj@Base 0.42c lrs_set_obj_mp@Base 0.42c lrs_set_row@Base 0.42c lrs_set_row_mp@Base 0.42c lrs_solve_lp@Base 0.42c lrs_solvelp@Base 0.42c mulrat@Base 0.42c myrandom@Base 0.42c notimpl@Base 0.42c phaseone@Base 0.42c pimat@Base 0.42c pivot@Base 0.42c pmp@Base 0.42c prat@Base 0.42c primalfeasible@Base 0.42c printA@Base 0.42c print_basis@Base 0.42c ratio@Base 0.42c rattodouble@Base 0.42c readfacets@Base 0.42c readlinearity@Base 0.42c readmp@Base 0.42c readrat@Base 0.42c record_digits@Base 0.42c reduce@Base 0.42c reducearray@Base 0.42c reduceint@Base 0.42c redund_main@Base 0.42c removecobasicindex@Base 0.42c reorder1@Base 0.42c reorder@Base 0.42c rescaledet@Base 0.42c rescalevolume@Base 0.42c resize@Base 0.42c restartpivots@Base 0.42c reverse@Base 0.42c selectpivot@Base 0.42c storesign@Base 0.42c stringcpy@Base 0.42c update@Base 0.42c updatevolume@Base 0.42c xcalloc@Base 0.42c debian/lrslib.install0000644000000000000000000000021512201676420012043 0ustar lrs usr/bin redund usr/bin nash usr/bin lrsbuffer usr/bin setupnash usr/bin setupnash2 usr/bin nash usr/bin lrsfourier usr/bin 2nash usr/bin