diff --git a/_scmsync.obsinfo b/_scmsync.obsinfo new file mode 100644 index 0000000..fe484c2 --- /dev/null +++ b/_scmsync.obsinfo @@ -0,0 +1,4 @@ +mtime: 1725961359 +commit: bc3f2ee17d072aa7d4f5a40deebe16f4e8c00930 +url: https://src.opensuse.org/jengelh/gfan +revision: master diff --git a/cddlib.patch b/cddlib.patch deleted file mode 100644 index 613775f..0000000 --- a/cddlib.patch +++ /dev/null @@ -1,74 +0,0 @@ -From: Jan Engelhardt -Date: 2020-09-19 11:39:47.110726857 +0200 - -To fix the CDDPREFIX yes-or-no conundrum, cddlib 0.94k has introduced -new unique locations for use inside <>. Adjust gfan. - ---- - src/app_librarytest.cpp | 9 ++------- - src/gfanlib_zcone.cpp | 9 ++------- - src/lp_cdd.cpp | 12 +++--------- - 3 files changed, 7 insertions(+), 23 deletions(-) - -Index: gfan0.6.2/src/app_librarytest.cpp -=================================================================== ---- gfan0.6.2.orig/src/app_librarytest.cpp -+++ gfan0.6.2/src/app_librarytest.cpp -@@ -8,13 +8,8 @@ - #include "gfanapplication.h" - #include "gfanlib.h" - #include "printer.h" --#ifdef NOCDDPREFIX --#include "setoper.h" --#include "cdd.h" --#else --#include "cdd/setoper.h" --#include "cdd/cdd.h" --#endif -+#include -+#include - #include - #include - using namespace gfan; -Index: gfan0.6.2/src/gfanlib_zcone.cpp -=================================================================== ---- gfan0.6.2.orig/src/gfanlib_zcone.cpp -+++ gfan0.6.2/src/gfanlib_zcone.cpp -@@ -12,13 +12,8 @@ - #include - - //extern "C"{ --#ifdef NOCDDPREFIX --#include "setoper.h" --#include "cdd.h" --#else --#include "cdd/setoper.h" --#include "cdd/cdd.h" --#endif -+#include -+#include - //} - - namespace gfan{ -Index: gfan0.6.2/src/lp_cdd.cpp -=================================================================== ---- gfan0.6.2.orig/src/lp_cdd.cpp -+++ gfan0.6.2/src/lp_cdd.cpp -@@ -1,14 +1,8 @@ - #include "lp_cdd.h" - //extern "C"{ --#ifdef NOCDDPREFIX --#include "setoper.h" --#include "cdd.h" --#include "cdd_f.h" --#else --#include "cdd/setoper.h" --#include "cdd/cdd.h" --#include "cdd/cdd_f.h" --#endif -+#include -+#include -+#include - //} - #include "termorder.h" - #include "printer.h" diff --git a/gfan-automake.diff b/gfan-automake.diff index f19caa3..4c2c88f 100644 --- a/gfan-automake.diff +++ b/gfan-automake.diff @@ -1,54 +1,30 @@ -From: Jan Engelhardt -Date: 2011-09-27 03:33:14.793222451 +0200 -Upstream: dead? +From: Jan Engelhardt +Date: 2024-09-10 11:29:23.277998131 +0200 Use much simpler Makefiles. --- - Makefile.am | 1 + - configure.ac | 6 ++++++ - src/Makefile.am | 20 ++++++++++++++++++++ - 3 files changed, 27 insertions(+) + Makefile.am | 4 ++++ + configure.ac | 6 ++++++ + 2 files changed, 10 insertions(+) -Index: gfan0.6.2/Makefile.am +Index: gfan0.7/Makefile.am =================================================================== --- /dev/null -+++ gfan0.6.2/Makefile.am -@@ -0,0 +1 @@ -+SUBDIRS=src -Index: gfan0.6.2/configure.ac ++++ gfan0.7/Makefile.am +@@ -0,0 +1,4 @@ ++AM_CPPFLAGS = -DGMPRATIONAL ++bin_PROGRAMS = gfan ++gfan_SOURCES = src/polynomialgcd.cpp src/lp_cdd.cpp src/parser.cpp src/field.cpp src/monomial.cpp src/printer.cpp src/polynomial.cpp src/termorder.cpp src/term.cpp src/vektor.cpp src/division.cpp src/buchberger.cpp src/wallideal.cpp src/lp.cpp src/enumeration.cpp src/ep_standard.cpp src/ep_xfig.cpp src/reversesearch.cpp src/application.cpp src/timer.cpp src/renderer.cpp src/field_rationals.cpp src/symmetry.cpp src/breadthfirstsearch.cpp src/genericwalk.cpp src/minkowskisum.cpp src/newtonpolytope.cpp src/tropical.cpp src/dimension.cpp src/bergman.cpp src/subspace.cpp src/polyhedralcone.cpp src/gfanapplication.cpp src/polyhedralfan.cpp src/tropical2.cpp src/field_zmodpz.cpp src/binomial.cpp src/matrix.cpp src/latticeideal.cpp src/scarf.cpp src/xfig.cpp src/halfopencone.cpp src/lll.cpp src/multiplicity.cpp src/substitute.cpp src/polymakefile.cpp src/saturation.cpp src/determinant.cpp src/polynomialring.cpp src/log.cpp src/tropicalbasis.cpp src/symmetriccomplex.cpp src/linalg.cpp src/minors.cpp src/continuedfractions.cpp src/triangulation.cpp src/minkowskidual.cpp src/regularsubdivision.cpp src/fieldlp.cpp src/field_rationalfunctions.cpp src/tropical_weildivisor.cpp src/intsinpolytope.cpp src/lattice.cpp src/graph.cpp src/restrictedautoreduction.cpp src/tropicaltraverse.cpp src/groebnerengine.cpp src/ge_gfan.cpp src/nbody.cpp src/codimoneconnectedness.cpp src/tropicalmap.cpp src/traverser_tropical.cpp src/traverser_groebnerfan.cpp src/field_rationalfunctions2.cpp src/mixedvolume.cpp src/traverser_stableintersection.cpp src/traverser_secondaryfan.cpp src/linalgfloat.cpp src/primarydecomposition.cpp src/tropicaldeterminant.cpp src/determinantpoly.cpp src/traverser_sphere.cpp src/gfanlib_zcone.cpp src/gfanlib_symmetry.cpp src/gfanlib_symmetriccomplex.cpp src/gfanlib_polyhedralfan.cpp src/gfanlib_zfan.cpp src/gfanlib_polymakefile.cpp src/gfanlib_mixedvolume.cpp src/gfanlib_circuittableint.cpp src/gfanlib_paralleltraverser.cpp src/padic.cpp src/integergb.cpp src/traverser_resultantfan.cpp src/bsptree.cpp src/traverser_resultantfanspecialization.cpp src/myassert.cpp src/traverser_bsptree.cpp src/gfanlib_traversal.cpp src/tropicalcurve.cpp src/packedmonomial.cpp src/gmpallocator.cpp src/gfanlib_memoryresource.cpp src/gfanlib_hypersurfaceintersection.cpp src/divisionobject.cpp src/gfanlibglue.cpp src/app_main.cpp src/app_buchberger.cpp src/app_doesidealcontain.cpp src/app_facets.cpp src/app_groebnercone.cpp src/app_homogeneityspace.cpp src/app_homogenize.cpp src/app_initialforms.cpp src/app_interactive.cpp src/app_isgroebnerbasis.cpp src/app_ismarkedgroebnerbasis.cpp src/app_krulldimension.cpp src/app_leadingterms.cpp src/app_multiplymatrix.cpp src/app_polynomialsetunion.cpp src/app_render.cpp src/app_renderstaircase.cpp src/app_stats.cpp src/app_substitute.cpp src/app_supportindices.cpp src/app_tolatex.cpp src/app_transposematrix.cpp src/app_tropicalbasis.cpp src/app_tropicalintersection.cpp src/app_tropicalstartingcone.cpp src/app_tropicaltraverse.cpp src/app_walk.cpp src/app_weightvector.cpp src/app_scarfisgeneric.cpp src/app_scarfvisualize.cpp src/app_scarfcomplex.cpp src/app_sturmsequence.cpp src/app_latticeideal.cpp src/app_lll.cpp src/app_tropicalmultiplicity.cpp src/app_idealintersection.cpp src/app_test.cpp src/app_saturation.cpp src/app_idealproduct.cpp src/app_representatives.cpp src/app_tropicallifting.cpp src/app_topolyhedralfan.cpp src/app_tropicalbruteforce.cpp src/app_secondaryfan.cpp src/app_composepermutations.cpp src/app_minors.cpp src/app_tropicalrank.cpp src/app_minkowski.cpp src/app_triangulate.cpp src/app_tropicallinearspace.cpp src/app_combinerays.cpp src/app_regularsubdivision.cpp src/app_lpsolve.cpp src/app_tropicalweildivisor.cpp src/app_lattice.cpp src/app_intsinpolytope.cpp src/app_tropicalevaluation.cpp src/app_smalessixth.cpp src/app_smalessixth2.cpp src/app_nbody.cpp src/app_spolynomial.cpp src/app_link.cpp src/app_normalfancleanup.cpp src/app_tropicalfunction.cpp src/app_volume.cpp src/app_isconnected.cpp src/app_tropicalhypersurface.cpp src/app_product.cpp src/app_commonrefinement.cpp src/app_tropicalimage.cpp src/app_groebnerfan.cpp src/app_fanhomology.cpp src/app_genericlinearchange.cpp src/app_mixedvolume.cpp src/app_fiberpolytope.cpp src/app_symmetries.cpp src/app_evaluate.cpp src/app_exponentlattice.cpp src/app_minimalassociatedprimes.cpp src/app_realroots.cpp src/app_initialdeterminant.cpp src/app_fansubfan.cpp src/app_fancones.cpp src/app_issmooth.cpp src/app_fancoarsening.cpp src/app_pointconfiguration.cpp src/app_librarytest.cpp src/app_padic.cpp src/app_integergb.cpp src/app_matrixproduct.cpp src/app_traversetropicalintersection.cpp src/app_markpolynomialset.cpp src/app_tropicalhypersurfacereconstruction.cpp src/app_resultantfan.cpp src/app_isbalanced.cpp src/app_polytopealgebra.cpp src/app_debug.cpp src/app_randompolynomials.cpp src/app_tropicalcurve.cpp src/app_tropicalhomotopy.cpp src/app_integerfactorization.cpp src/app_tropicalvarietyspan.cpp src/app_chowbetti.cpp src/app_anton.cpp src/app_components.cpp src/app_tropicalprevarietycomponents.cpp src/app_tropicalprevariety.cpp src/app_anders.cpp src/symmetrictraversal.cpp ++gfan_LDADD = -lpthread -lgmp -lcddgmp +Index: gfan0.7/configure.ac =================================================================== --- /dev/null -+++ gfan0.6.2/configure.ac ++++ gfan0.7/configure.ac @@ -0,0 +1,6 @@ -+AC_INIT([gfan], [0.6.2]) -+AM_INIT_AUTOMAKE([-Wall foreign]) ++AC_INIT([gfan], [0.7]) ++AM_INIT_AUTOMAKE([-Wall foreign subdir-objects]) +AC_PROG_INSTALL +AC_PROG_CXX -+AC_CONFIG_FILES([Makefile src/Makefile]) ++AC_CONFIG_FILES([Makefile]) +AC_OUTPUT -Index: gfan0.6.2/src/Makefile.am -=================================================================== ---- /dev/null -+++ gfan0.6.2/src/Makefile.am -@@ -0,0 +1,20 @@ -+AM_CPPFLAGS = -DGMPRATIONAL -+AM_CXXFLAGS = -Wuninitialized -+bin_PROGRAMS = gfan -+gfan_SOURCES = \ -+app_buchberger.cpp app_chowbetti.cpp app_combinerays.cpp app_commonrefinement.cpp app_composepermutations.cpp app_debug.cpp app_doesidealcontain.cpp app_evaluate.cpp app_exponentlattice.cpp app_facets.cpp app_fancoarsening.cpp app_fancones.cpp app_fanhomology.cpp app_fansubfan.cpp \ -+app_fiberpolytope.cpp app_genericlinearchange.cpp app_groebnercone.cpp app_groebnerfan.cpp app_homogeneityspace.cpp app_homogenize.cpp app_idealintersection.cpp app_idealproduct.cpp app_initialdeterminant.cpp app_initialforms.cpp app_integerfactorization.cpp app_integergb.cpp \ -+app_interactive.cpp app_intsinpolytope.cpp app_isbalanced.cpp app_isconnected.cpp app_isgroebnerbasis.cpp app_ismarkedgroebnerbasis.cpp app_issmooth.cpp app_krulldimension.cpp app_latticeideal.cpp app_lattice.cpp app_leadingterms.cpp app_librarytest.cpp application.cpp app_link.cpp \ -+app_lll.cpp app_lpsolve.cpp app_main.cpp app_markpolynomialset.cpp app_matrixproduct.cpp app_minimalassociatedprimes.cpp app_minkowski.cpp app_minors.cpp app_mixedvolume.cpp app_multiplymatrix.cpp app_nbody.cpp app_normalfancleanup.cpp app_padic.cpp app_pointconfiguration.cpp \ -+app_polynomialsetunion.cpp app_polytopealgebra.cpp app_product.cpp app_randompolynomials.cpp app_realroots.cpp app_regularsubdivision.cpp app_render.cpp app_renderstaircase.cpp app_representatives.cpp app_resultantfan.cpp app_saturation.cpp app_scarfcomplex.cpp \ -+app_scarfisgeneric.cpp app_scarfvisualize.cpp app_secondaryfan.cpp app_smalessixth2.cpp app_smalessixth.cpp app_spolynomial.cpp app_stats.cpp app_sturmsequence.cpp app_substitute.cpp app_supportindices.cpp app_symmetries.cpp app_test.cpp app_tolatex.cpp app_topolyhedralfan.cpp \ -+app_transposematrix.cpp app_traversetropicalintersection.cpp app_triangulate.cpp app_tropicalbasis.cpp app_tropicalbruteforce.cpp app_tropicalcurve.cpp app_tropicalevaluation.cpp app_tropicalfunction.cpp app_tropicalhomotopy.cpp app_tropicalhypersurface.cpp \ -+app_tropicalhypersurfacereconstruction.cpp app_tropicalimage.cpp app_tropicalintersection.cpp app_tropicallifting.cpp app_tropicallinearspace.cpp app_tropicalmultiplicity.cpp app_tropicalrank.cpp app_tropicalstartingcone.cpp app_tropicaltraverse.cpp \ -+app_tropicalvarietyspan.cpp app_tropicalweildivisor.cpp app_volume.cpp app_walk.cpp app_weightvector.cpp bergman.cpp binomial.cpp breadthfirstsearch.cpp bsptree.cpp buchberger.cpp codimoneconnectedness.cpp continuedfractions.cpp determinant.cpp determinantpoly.cpp dimension.cpp \ -+division.cpp enumeration.cpp ep_standard.cpp ep_xfig.cpp fieldlp.cpp field.cpp field_rationalfunctions2.cpp field_rationalfunctions.cpp field_rationals.cpp field_zmodpz.cpp ge_gfan.cpp genericwalk.cpp gfanapplication.cpp gfanlib_circuittableint.cpp gfanlib_mixedvolume.cpp \ -+gfanlib_paralleltraverser.cpp gfanlib_polyhedralfan.cpp gfanlib_polymakefile.cpp gfanlib_symmetriccomplex.cpp gfanlib_symmetry.cpp gfanlib_traversal.cpp gfanlib_zcone.cpp gfanlib_zfan.cpp gmpallocator.cpp graph.cpp groebnerengine.cpp halfopencone.cpp integergb.cpp intsinpolytope.cpp \ -+latticeideal.cpp lattice.cpp linalgfloat.cpp linalg.cpp lll.cpp log.cpp lp_cdd.cpp lp.cpp matrix.cpp minkowskidual.cpp minkowskisum.cpp minors.cpp mixedvolume.cpp monomial.cpp multiplicity.cpp myassert.cpp nbody.cpp newtonpolytope.cpp packedmonomial.cpp padic.cpp parser.cpp polyhedralcone.cpp \ -+polyhedralfan.cpp polymakefile.cpp polynomialgcd.cpp polynomial.cpp polynomialring.cpp primarydecomposition.cpp printer.cpp regularsubdivision.cpp renderer.cpp restrictedautoreduction.cpp reversesearch.cpp saturation.cpp scarf.cpp subspace.cpp substitute.cpp symmetriccomplex.cpp \ -+symmetrictraversal.cpp symmetry.cpp term.cpp termorder.cpp timer.cpp traverser_bsptree.cpp traverser_groebnerfan.cpp traverser_resultantfan.cpp traverser_resultantfanspecialization.cpp traverser_secondaryfan.cpp traverser_sphere.cpp traverser_stableintersection.cpp \ -+traverser_tropical.cpp triangulation.cpp tropical2.cpp tropicalbasis.cpp tropicalcurve.cpp tropicaldeterminant.cpp tropicalmap.cpp tropical.cpp tropicaltraverse.cpp tropical_weildivisor.cpp vektor.cpp wallideal.cpp xfig.cpp -+gfan_LDADD = -lpthread -lgmp -lcddgmp diff --git a/gfan-c++20.patch b/gfan-c++20.patch new file mode 100644 index 0000000..cb9b820 --- /dev/null +++ b/gfan-c++20.patch @@ -0,0 +1,12 @@ +--- gfan0.7/src/gfanlib_circuittableint.h.orig 2024-08-12 10:00:15.000000000 -0600 ++++ gfan0.7/src/gfanlib_circuittableint.h 2024-08-15 16:14:29.983298300 -0600 +@@ -591,7 +591,8 @@ public: + ret=min; + + { +- auto ret2=CircuitTableIntPOD((s.v*denominatorDivisor.multiplicativeInverse)*boundA.v); ++ CircuitTableIntPOD ret2{}; ++ ret2=(s.v*denominatorDivisor.multiplicativeInverse)*boundA.v; + ret2=MIN(ret2.v,-ret2.v); + return ret2; + if(ret.v!=ret2.v) diff --git a/gfan-gcd.patch b/gfan-gcd.patch new file mode 100644 index 0000000..68cef50 --- /dev/null +++ b/gfan-gcd.patch @@ -0,0 +1,14 @@ +--- gfan0.7/src/gfanlib_q.h.orig 2024-08-12 10:00:15.000000000 -0600 ++++ gfan0.7/src/gfanlib_q.h 2024-08-16 10:13:16.625990374 -0600 +@@ -179,6 +179,11 @@ public: + assert(0 && "gcd for Rational not defined"); + return a; + } ++ static Rational gcd(Rational const &a, Rational const &b) ++ { ++ assert(0 && "gcd for Rational not defined"); ++ return a; ++ } + /** + * Assigns the value to q. q must have been initialized as a gmp variable. + */ diff --git a/gfan-multiplicities.patch b/gfan-multiplicities.patch new file mode 100644 index 0000000..d383f42 --- /dev/null +++ b/gfan-multiplicities.patch @@ -0,0 +1,19 @@ +--- + src/gfanlib_zfan.cpp | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +Index: gfan0.7/src/gfanlib_zfan.cpp +=================================================================== +--- gfan0.7.orig/src/gfanlib_zfan.cpp ++++ gfan0.7/src/gfanlib_zfan.cpp +@@ -37,7 +37,9 @@ namespace gfan + { + IntVector indices=getConeIndices(dimension,index,orbit,maximal); + ZCone ret=this->complex->makeZCone(indices); +- if(maximal)ret.setMultiplicity(((orbit)?multiplicitiesOrbits:multiplicities)[dimension][index]); ++ const std::vector >&mult = orbit ? multiplicitiesOrbits : multiplicities; ++ if(maximal && mult.size() > dimension && mult[dimension].size() > index) ++ ret.setMultiplicity(mult[dimension][index]); + return ret; + } + IntVector ZFan::getConeIndices(int dimension, int index, bool orbit, bool maximal)const diff --git a/gfan-odr.patch b/gfan-odr.patch deleted file mode 100644 index 08b09b4..0000000 --- a/gfan-odr.patch +++ /dev/null @@ -1,85 +0,0 @@ -From a75e670e0e228e0a738eb65c7128a01446b4135c Mon Sep 17 00:00:00 2001 -From: Alois Wohlschlager -Date: Sat, 3 Jul 2021 11:07:23 +0200 -Subject: [PATCH] Fix ODR violations -Upstream: not reachable - -Various traversal code reused class names (Boundary, pathStepRidge, -pathStepFacet) in violation of the one definition rule. Put the -respective classes into anonymous namespaces to comply with ODR. ---- - src/gfanlib_traversal.cpp | 4 ++++ - src/symmetrictraversal.cpp | 4 ++++ - src/tropicaltraverse.cpp | 5 +++++ - 3 files changed, 13 insertions(+) - -diff --git a/src/gfanlib_traversal.cpp b/src/gfanlib_traversal.cpp -index dce38c1..3e9a746 100644 ---- a/src/gfanlib_traversal.cpp -+++ b/src/gfanlib_traversal.cpp -@@ -62,6 +62,8 @@ bool FanBuilder::process(FanTraverser &traverser) - in the computation is made these edges will be deleted. - */ - -+namespace -+{ - - class Boundary - { -@@ -185,6 +187,8 @@ struct pathStepFacet - list ridgesRayUniqueVector;//stores the ray of the link that we came from - }; - -+} -+ - /** - We need to simulate two mutually recursive functions. An actual - implementation of these two functions would probably not work since -diff --git a/src/symmetrictraversal.cpp b/src/symmetrictraversal.cpp -index 8cf6f40..4fe66e0 100644 ---- a/src/symmetrictraversal.cpp -+++ b/src/symmetrictraversal.cpp -@@ -103,6 +103,8 @@ bool SymmetricTargetVertexSetBuilder::process(ConeTraverser &traverser) - in the computation is made these edges will be deleted. - */ - -+namespace -+{ - - class Boundary - { -@@ -258,6 +260,8 @@ struct pathStepFacet - IntegerVectorList ridgesRayUniqueVector;//stores the ray of the link that we came from - }; - -+} -+ - /** - We need to simulate two mutually recursive functions. An actual - implementation of these two functions would probably not work since -diff --git a/src/tropicaltraverse.cpp b/src/tropicaltraverse.cpp -index 05e9747..c01a69f 100644 ---- a/src/tropicaltraverse.cpp -+++ b/src/tropicaltraverse.cpp -@@ -104,6 +104,9 @@ public: - } - }; - -+namespace -+{ -+ - /** - Rewrite these comments. - -@@ -130,6 +133,8 @@ struct pathStepFacet - IntegerVectorList ridges; - }; - -+} -+ - /** - We need to simulate two mutually recursive functions. An actual - implementation of these two functions would propably not work since --- -2.32.0 - diff --git a/gfan-soplex.patch b/gfan-soplex.patch new file mode 100644 index 0000000..8eff60c --- /dev/null +++ b/gfan-soplex.patch @@ -0,0 +1,398 @@ +--- gfan0.7/src/lp_soplexcdd.cpp.orig 2024-08-12 13:34:07.043619886 -0600 ++++ gfan0.7/src/lp_soplexcdd.cpp 2024-08-12 13:42:14.382953300 -0600 +@@ -1,37 +1,11 @@ + #include "lp_soplexcdd.h" + +-#include "printer.h" +- +-#include "spxdefines.h" +-#include "spxsolver.h" +- +-#include "timer.h" +-#include "spxpricer.h" +-//#include "spxdefaultpr.h" +-#include "spxparmultpr.h" +-#include "spxdevexpr.h" +-#include "spxhybridpr.h" +-#include "spxsteeppr.h" +-#include "spxweightpr.h" +-#include "spxratiotester.h" +-#include "spxharrisrt.h" +-#include "spxdefaultrt.h" +-#include "spxfastrt.h" +-#include "spxsimplifier.h" +-//#include "spxaggregatesm.h" +-//#include "spxredundantsm.h" +-//#include "spxrem1sm.h" +-//#include "spxgeneralsm.h" +-#include "spxscaler.h" +-#include "spxequilisc.h" +-#include "spxsumst.h" +-#include "spxweightst.h" +-#include "spxvectorst.h" +-#include "slufactor.h" +-#include "soplex.h" ++#include ++#include + #include "continuedfractions.h" + #include "matrix.h" + #include "linalg.h" ++#include "printer.h" + + #include "log.h" + using namespace soplex; +@@ -42,81 +16,45 @@ using namespace soplex; + class MySoPlex : public SoPlex + { + private: +- SLUFactor m_slu; ++ SLUFactor m_slu; + + public: + /// default constructor +- MySoPlex(SPxSolver::Type p_type = SPxSolver::LEAVE, SPxSolver::Representation p_rep = SPxSolver::COLUMN) +- : SoPlex(p_type, p_rep) ++ MySoPlex() : SoPlexBase() + { ++ NameSet rownames; ++ NameSet colnames; ++ SPxOut::Verbosity verbose = SPxOut::Verbosity::ERROR; ++ SLUFactor::UpdateType update = SLUFactor::FOREST_TOMLIN; ++ Real timelimit = 1.0; + ++ spxout.setVerbosity(verbose); + ++ //options -p4 -t2 -g1 -s0 -c0 ++ setUtype(update); + +- bool print_solution = false; +- bool print_quality = false; +- NameSet rownames; +- NameSet colnames; +- SPxStarter* starter = 0; +- SPxSolver::Type type = SPxSolver::LEAVE; +- SPxSolver::Representation representation = SPxSolver::COLUMN; +- int precision; +- Real delta = DEFAULT_BND_VIOL; +- Real epsilon = DEFAULT_EPS_ZERO; +- int verbose = 0; +- SLUFactor::UpdateType update = SLUFactor::FOREST_TOMLIN; +- Real timelimit = 1.0;-1.0; +- SPxPricer* pricer = 0; +- SPxRatioTester* ratiotester = 0; +- SPxScaler* scaler = 0; +- SPxSimplifier* simplifier = 0; +- +- precision = int(-log10(delta)) + 1; +- +- Param::setEpsilon(epsilon); +- Param::setVerbose(verbose); +- +- +- +- //options -p4 -t2 -g1 -s0 -c0 +- setUtype(update); +- setTerminationTime(timelimit); +- setDelta(delta); +- +- assert(isConsistent()); +- +- pricer = new SPxSteepPR; +- setPricer(pricer); +- assert(isConsistent()); ++ setRealParam(TIMELIMIT, timelimit); ++ assert(isConsistent()); + +- ratiotester = new SPxFastRT; +- setTester(ratiotester); +- assert(isConsistent()); ++ setIntParam(PRICER, PRICER_STEEP); ++ assert(isConsistent()); + +- /* scaler = new SPxEquili(representation == SoPlex::COLUMN, true); +- setScaler(scaler); +- assert(isConsistent()); +- */ +- setSimplifier(simplifier); +- assert(isConsistent()); ++ setIntParam(RATIOTESTER, RATIOTESTER_FAST); ++ assert(isConsistent()); + +- setStarter(starter); +- assert(isConsistent()); +- } ++ setIntParam(SIMPLIFIER, SIMPLIFIER_OFF); ++ assert(isConsistent()); + +- virtual bool terminate() +- { +- /* if (iteration() % 100 == 0) +- std::cout << iteration() << ":\t" << value() << std::endl; +- */ +- return SoPlex::terminate(); ++ setIntParam(STARTER, STARTER_OFF); ++ assert(isConsistent()); + } + +- void setUtype(SLUFactor::UpdateType tp) ++ void setUtype(SLUFactor::UpdateType tp) + { + m_slu.setUtype(tp); + } + +- void build(const IntegerVectorList &g, IntegerVectorList::const_iterator i) ++ void build(const IntegerVectorList &g, IntegerVectorList::const_iterator i) + { + int width=g.size()-1; + int height=i->v.size(); +@@ -141,22 +79,23 @@ public: + cols.add(obj,lower,c1,upper); + } + } +- ++ + LPRowSet rows(height,width*height); + DSVector r1(width); +- ++ + //Change Rows + for(int t=0;tv[t],r1,i->v[t]); +- +- addRows(rows); +- addCols(cols); +- +- changeSense(SPxLP::MINIMIZE); +- ++ ++ addRowsReal(rows); ++ addColsReal(cols); ++ ++ setIntParam(OBJSENSE, OBJSENSE_MINIMIZE); ++ + assert(isConsistent()); + } +- void buildType2(int n, const IntegerVectorList &inequalities, const IntegerVectorList &equations) ++ ++ void buildType2(int n, const IntegerVectorList &inequalities, const IntegerVectorList &equations) + { + int width=n; + int nInequalities=inequalities.size(); +@@ -192,27 +131,29 @@ public: + + LPRowSet rows(height,width*height); + DSVector r1(width); +- ++ + //Change Rows + for(int t=0;t(&r); ++ return *theInt; + } + ++#if 0 + static void printLP(SPxLP &w) + { + std::cout << "LP has " +@@ -272,10 +213,9 @@ static void printLP(SPxLP &w) + std::cout< solution(work.nCols()); +- for(int i=0;i solution(work.numCols()); ++ for(int i=0;i solutionNum; + int denominator; + doubleVectorToFractions(solution,solutionNum,denominator); + IntegerVector s(solution.size()); +- for(int i=0;i certificate(work.nRows()); +- for(int i=0;i certificate(work.numRows()); ++ for(int i=0;i certificateNum; + int denominator; + doubleVectorToFractions(certificate,certificateNum,denominator); + IntegerVector c(certificate.size()); +- for(int i=0;i solution(work.nCols()); +- for(int i=0;i solution(work.numCols()); ++ for(int i=0;i solutionNum; + int denominator; + doubleVectorToFractions(solution,solutionNum,denominator); + IntegerVector s(solution.size()); +- for(int i=0;isize()==solution.size()); +- for(int j=0;jsize();j++)S+=solution[j]*(*i)[j]; ++ for(size_t j=0;jsize();j++)S+=solution[j]*(*i)[j]; + if(S>-0.000001 && S<0.000001)A.push_back(*i); + } + FieldMatrix temp=integerMatrixToFieldMatrix(rowsToIntegerMatrix(A,solution.size()),Q); +@@ -538,7 +470,7 @@ if(0) { + */ + log2 fprintf(Stderr,"Solution failed (Type2).\n"); + +- /* for(int i=0;i certificate(work.nRows()); +- for(int i=0;i certificate(work.numRows()); ++ for(int i=0;i certificateNum; + int denominator; + doubleVectorToFractions(certificate,certificateNum,denominator); + IntegerVector c(certificate.size()); +- for(int i=0;i + #include +--- gfan0.7/src/application.cpp.orig 2024-08-12 10:00:15.000000000 -0600 ++++ gfan0.7/src/application.cpp 2024-08-12 11:05:45.720320231 -0600 +@@ -3,6 +3,8 @@ + #include + #include + #include ++#include ++#include + #include + #include + #include +@@ -566,11 +568,11 @@ void Application::makeSymbolicLinks(cons + if(all || p->includeInDefaultInstallation()) + if(strlen(p->name())>0) + { +- char c[1024]; +- sprintf(c,"ln -s %s%s %s%s%s\n",path,name,path,name,p->name()); +- fprintf(stderr,"%s",c); +- int err=system(c); +- assert(err==0); ++ char c[PATH_MAX], d[PATH_MAX]; ++ snprintf(c,PATH_MAX,"%s%s",path,name); ++ snprintf(d,PATH_MAX,"%s%s%s",path,name,p->name()); ++ fprintf(stderr,"ln -s %s %s\n",c,d); ++ symlink(c,d); + } + p=p->next; + } +--- gfan0.7/src/app_test.cpp.orig 2024-08-12 10:00:15.000000000 -0600 ++++ gfan0.7/src/app_test.cpp 2024-08-13 10:46:14.680617406 -0600 +@@ -1,5 +1,8 @@ + #include + #include ++#include ++#include ++#include + #include "parser.h" + #include "printer.h" + #include "polynomial.h" +@@ -813,7 +816,7 @@ int testGfanLib() + int largest=10+2; + vector halfOpenConesStatistics(largest+1); + vector nonEmptyIntersectionsStatistics(largest+1); +- for(int k=2/*largest/*2*/;k<=largest;k++) ++ for(int k=2/*largest/2*/;k<=largest;k++) + { + vector > f; + vector > configurations=convertMatrixVectorT(MixedVolumeExamples::cyclic(k)); +@@ -1333,11 +1336,7 @@ if(0) { + { + outputName=outputName+"New"; + } +- int err=0; +- { +- string t="rm -f "+outputName; +- err|=system(t.c_str()); +- } ++ int err=(unlink(outputName.c_str()) == 0 || errno == ENOENT) ? 0 : 1; + string command3="cat <"+input+"|"+string(command2)+">"+outputName; + cerr<<"Running command:\""< subFolderNames() + { +-#define tempName "GfAnTeMpTeStS" +- char command[256]; +- int err=system("rm " tempName); +- err=0;//Having err!=0 above is probably not at mistake. Rather the file did not exist. +- sprintf(command,"ls %s>" tempName ,testSuiteFolderOption.getValue()); +- err|=system(command); +- assert(err==0); +- + list ret; +- FILE *f=fopen(tempName,"r"); +- assert(f); +- char name[256]; +- while(fgets(name,255,f)) ++ DIR *dir = opendir(testSuiteFolderOption.getValue()); ++ struct dirent *dirent; ++ ++ assert(dir); ++ for (struct dirent *ent = readdir(dir); ent; ent = readdir(dir)) + { +- for(int i=0;i<255 && name[i];i++)if(name[i]=='\n'){name[i]=0;} +- if(name[0]>='0' && name[0]<='9')ret.push_back(string(testSuiteFolderOption.getValue())+"/"+string(name)); ++ if (ent->d_name[0]>='0' && ent->d_name[0]<='9') ++ ret.push_back(string(testSuiteFolderOption.getValue())+"/"+string(ent->d_name)); + } +- fclose(f); ++ closedir(dir); + return ret; + } + +@@ -1379,7 +1371,7 @@ if(0) { + // gfan::Matrix::readMatrix(cin,4); + } + +- if(developerTestOption.getValue()!="testsuite") ++ if(strcmp(developerTestOption.getValue(),"testsuite") != 0) + { + // lpRationalFunctionTest(); + // testRationalFunctionField(); +--- gfan0.7/src/bergman.cpp.orig 2024-08-12 10:00:15.000000000 -0600 ++++ gfan0.7/src/bergman.cpp 2024-08-12 11:05:45.721320218 -0600 +@@ -327,7 +327,7 @@ log0 AsciiPrinter(Stderr).printPolynomia + if(doesPermutationFixCone(*j))numFixed++; + + // fprintf(Stderr,"groupSize = %i, numFixed = %i\n",groupSize,numFixed); +- return groupSize/numFixed; ++ return (numFixed>0) ? groupSize/numFixed : 0; + } + + void markFacet(IntegerVector const &relIntRidgeVector) +--- gfan0.7/src/breadthfirstsearch.cpp.orig 2024-08-12 10:00:15.000000000 -0600 ++++ gfan0.7/src/breadthfirstsearch.cpp 2024-08-12 11:05:45.722320204 -0600 +@@ -260,7 +260,7 @@ public: + } + + log2 fprintf(Stderr,"numFixed = %i\n",numFixed); +- return groupSize/numFixed; ++ return (numFixed>0) ? groupSize/numFixed : 0; + } + }; + +--- gfan0.7/src/bsptree.cpp.orig 2024-08-12 10:00:15.000000000 -0600 ++++ gfan0.7/src/bsptree.cpp 2024-08-12 11:05:45.722320204 -0600 +@@ -131,7 +131,8 @@ public: + p=&(i->first); + } + } +- normal=*p; ++ if (p) ++ normal=*p; + } + return normal; + } +--- gfan0.7/src/enumeration.h.orig 2024-08-12 10:00:15.000000000 -0600 ++++ gfan0.7/src/enumeration.h 2024-08-12 11:05:45.722320204 -0600 +@@ -36,7 +36,7 @@ class EnumerationFilePrinter: public Enu + FILE *file; + public: + EnumerationFilePrinter(); +- ~EnumerationFilePrinter(); ++ virtual ~EnumerationFilePrinter(); + + void open(std::string filename); + void open(FILE *file); +@@ -61,6 +61,7 @@ class EnumerationAlgorithm + bool targetBasis(const PolynomialSet &groebnerBasis){bool ret=true;if(target)ret=target->basis(groebnerBasis);printProgress();return ret;} + public: + EnumerationAlgorithm(){target=0;progressCounter=0;} ++ virtual ~EnumerationAlgorithm(){} + void setEnumerationTarget(EnumerationTarget *target){this->target=target;} + virtual void enumerate(const PolynomialSet &groebnerBasis){} + }; +--- gfan0.7/src/field.h.orig 2024-08-12 10:00:15.000000000 -0600 ++++ gfan0.7/src/field.h 2024-08-13 10:48:41.438830878 -0600 +@@ -207,7 +207,7 @@ class FieldElementImplementation + virtual int getIntegerRepresentation()const + { + fprintf(stderr,"*this is not in Z/pZ.\n"); +- assert(0); ++ abort(); + } + virtual bool isInteger()const + { +@@ -222,7 +222,7 @@ class FieldElementImplementation + + Field& operator=(const Field& a) + { +- assert(0); ++ abort(); + }//assignment + }; + +@@ -270,7 +270,7 @@ class FieldImplementation + virtual FieldElement zHomomorphism(int n)=0; + virtual FieldElement random() + { +- assert(0); ++ abort(); + } + virtual int getCharacteristic()const=0; + virtual const char *name()=0; +--- gfan0.7/src/field_rationalfunctions2.cpp.orig 2024-08-12 10:00:15.000000000 -0600 ++++ gfan0.7/src/field_rationalfunctions2.cpp 2024-08-13 10:49:15.909411259 -0600 +@@ -509,7 +509,7 @@ class FieldElementRationalFunction2 : pu + + static string LaTeXTranslator(const string &s) + { +- assert(0);//not supported yet ++ abort();//not supported yet + /* int startIndex=0; + string sign; + if(s[0]=='-') +--- gfan0.7/src/field_rationals.cpp.orig 2024-08-12 10:00:15.000000000 -0600 ++++ gfan0.7/src/field_rationals.cpp 2024-08-12 13:56:15.163561256 -0600 +@@ -397,7 +397,7 @@ const char *FieldRationalsImplementation + + /*FieldRationals::FieldRationals(): + Field(new FieldRationalsImplementation()) +-{ ++{*/ + /* fprintf(Stderr,"Adding field rationals\n"); + next=list; + list=this; +--- gfan0.7/src/gfanlib_matrix.h.orig 2024-08-12 10:00:15.000000000 -0600 ++++ gfan0.7/src/gfanlib_matrix.h 2024-08-12 13:31:35.566692074 -0600 +@@ -45,7 +45,7 @@ template + class HasMemberType_##Type + { + private: +-/* using Yes=char[2]; ++ using Yes=char[2]; + using No=char[1]; + struct Fallback {struct Type{};}; + struct Derived:T,Fallback{}; +--- gfan0.7/src/gfanlib_memoryresource.h.orig 2024-08-12 10:00:15.000000000 -0600 ++++ gfan0.7/src/gfanlib_memoryresource.h 2024-08-12 13:31:08.231066021 -0600 +@@ -34,7 +34,7 @@ void test() { + // t.a=0; + for(int i=0;i<100000;i++) + { +- std::experimental::pmr::vector A(100000,t/* ,&stackResource/); ++ std::experimental::pmr::vector A(100000,t,&stackResource); + //A.resize(100000,MyInt{}); + } + } +--- gfan0.7/src/gfanlib_symmetry.cpp.orig 2024-08-12 10:00:15.000000000 -0600 ++++ gfan0.7/src/gfanlib_symmetry.cpp 2024-08-12 11:05:45.722320204 -0600 +@@ -423,7 +423,7 @@ int SymmetryGroup::orbitSize(ZVector con + if(doesFix)numFixed++; + } + } +- return groupSize/numFixed; ++ return (numFixed>0) ? groupSize/numFixed : 0; + } + + +--- gfan0.7/src/gfanlib_tableau.h.orig 2024-08-12 10:00:15.000000000 -0600 ++++ gfan0.7/src/gfanlib_tableau.h 2024-08-13 10:59:21.016045143 -0600 +@@ -845,7 +845,7 @@ template class Tableau{ + return true;//break; //If this is reached we are ok + } + } +- assert(0); ++ abort(); + } + void checkInLexTriangulation() + { +@@ -3059,7 +3059,7 @@ static bool isSubsetOf(vector const + // polymakeFile.writeCardinalProperty("DIM",getMaxDim()); + polymakeFile.writeCardinalProperty("LINEALITY_DIM",linealitySpace.getHeight()); + // if(flags&&FPF_boundedInfo)polymakeFile.writeMatrixProperty("RAYS",toZMatrix(vertices),true);//?????? +- if(flags&&FPF_rays)polymakeFile.writeMatrixProperty("RAYS",toZMatrix(vertices),true); ++ if(flags&FPF_rays)polymakeFile.writeMatrixProperty("RAYS",toZMatrix(vertices),true); + polymakeFile.writeCardinalProperty("N_RAYS",vertices.getHeight()); + + polymakeFile.writeMatrixProperty("LINEALITY_SPACE",toZMatrix(linealitySpace),ambientDimension); +--- gfan0.7/src/gfanlib_zcone.cpp.orig 2024-08-12 10:00:15.000000000 -0600 ++++ gfan0.7/src/gfanlib_zcone.cpp 2024-08-12 11:05:45.723320190 -0600 +@@ -16,8 +16,8 @@ + #include "setoper.h" + #include "cdd.h" + #else +-#include "cdd/setoper.h" +-#include "cdd/cdd.h" ++#include "cddlib/setoper.h" ++#include "cddlib/cdd.h" + #endif + //} + +@@ -52,8 +52,8 @@ namespace gfan{ + "dd_free_global_constants()\n" + "in your deinitialisation code (only available for cddlib version>=094d).\n" + "This requires the header includes:\n" +- "#include \"cdd/setoper.h\"\n" +- "#include \"cdd/cdd.h\"\n" ++ "#include \"cddlib/setoper.h\"\n" ++ "#include \"cddlib/cdd.h\"\n" + "\n" + "Alternatively, you may call gfan:initializeCddlibIfRequired() and deinitializeCddlibIfRequired()\n" + "if gfanlib is the only code using cddlib. If at some point cddlib is no longer required by gfanlib\n" +--- gfan0.7/src/gfanlib_z.h.orig 2024-08-12 10:00:15.000000000 -0600 ++++ gfan0.7/src/gfanlib_z.h 2024-08-12 13:53:41.429631248 -0600 +@@ -218,17 +218,17 @@ namespace gfan{ + { + return !(((long int)(value->_mp_d))&1); + } +- void initSetInt32(std::int32_t v)//should only be used in constructor or after mpz_clear has been called ++ void initSetInt32(int32_t v)//should only be used in constructor or after mpz_clear has been called + { + value->_mp_alloc=v; +- *((long int*)&(value->_mp_d))=1; ++ value->_mp_d=reinterpret_cast(1); + } +- void setInt32(std::int32_t v) ++ void setInt32(int32_t v) + { + assert(!hasLimbs()); + value->_mp_alloc=v; + } +- std::int32_t getInt32()const ++ int32_t getInt32()const + { + assert(!hasLimbs()); + return int32_t(value[0]._mp_alloc); +--- gfan0.7/src/lp_cdd.cpp.orig 2024-08-12 10:00:15.000000000 -0600 ++++ gfan0.7/src/lp_cdd.cpp 2024-08-12 11:05:45.724320177 -0600 +@@ -5,9 +5,9 @@ + #include "cdd.h" + #include "cdd_f.h" + #else +-#include "cdd/setoper.h" +-#include "cdd/cdd.h" +-#include "cdd/cdd_f.h" ++#include "cddlib/setoper.h" ++#include "cddlib/cdd.h" ++#include "cddlib/cdd_f.h" + #endif + //} + #include "termorder.h" +--- gfan0.7/src/lp.cpp.orig 2024-08-12 10:00:15.000000000 -0600 ++++ gfan0.7/src/lp.cpp 2024-08-13 10:49:50.357991909 -0600 +@@ -58,7 +58,7 @@ bool LpSolver::interiorPoint(const Integ + bool LpSolver::hasInteriorPoint(const IntegerVectorList &g, bool strictlyPositive, IntegerVector const *equalitySet) + { + fprintf(stderr,"hasInteriorPoint method not supported in \"%s\" LP class\n",name()); +- assert(0); ++ abort(); + } + + +@@ -118,7 +118,7 @@ void LpSolver::dual(int n, const Integer + bool LpSolver::hasHomogeneousSolution(int n, const IntegerVectorList &inequalities, const IntegerVectorList &equations) + { + fprintf(stderr,"hasHomogeneousSolution method not supported in \"%s\" LP class\n",name()); +- assert(0); ++ abort(); + } + + static LpSolver *soplex,*soplexCddGmp,*huber,*cdd,*cddgmp,*default_; +--- gfan0.7/src/lp_soplexcdd.cpp.orig 2024-08-12 10:00:15.000000000 -0600 ++++ gfan0.7/src/lp_soplexcdd.cpp 2024-08-12 13:34:07.043619886 -0600 +@@ -306,7 +306,7 @@ static bool isInfeasibilityCertificate(I + return true; + } + /* for(IntegerVectorList::const_iterator j=g.begin();j!=g.end();j++) +- { ++ {*/ + /* double prod=0; + for(int i=0;i0) ++ for(int i=0;(size_t)i0) + { + s << getRing().getVariableName(i); + if(int(exponent[i]*sign)!=1) +--- gfan0.7/src/nbody.cpp.orig 2024-08-12 10:00:15.000000000 -0600 ++++ gfan0.7/src/nbody.cpp 2024-08-13 10:50:08.557770361 -0600 +@@ -16,7 +16,7 @@ static int rIndex(int i, int j, int N, b + if((I==i)&&(J==j))return r; + r++; + } +- assert(0); ++ abort(); + } + + static int sIndex(int i, int j, int N, bool withMasses) +--- gfan0.7/src/packedmonomial.cpp.orig 2024-08-12 10:00:15.000000000 -0600 ++++ gfan0.7/src/packedmonomial.cpp 2024-08-13 10:50:25.380565573 -0600 +@@ -18,7 +18,7 @@ vector minimized(vector temp(generators); + +- assert(0); ++ abort(); + // sort(temp.begin(),temp.end()); + /* g->sort(polynomialOrder(LexicographicTermOrder())); + +--- gfan0.7/src/parser.cpp.orig 2024-08-12 10:00:15.000000000 -0600 ++++ gfan0.7/src/parser.cpp 2024-08-13 10:50:41.716366715 -0600 +@@ -637,7 +637,7 @@ Field CharacterBasedParser::parseField() + } + + parserError("field",c); +- assert(0); ++ abort(); + } + + +--- gfan0.7/src/polyhedralfan.cpp.orig 2024-08-12 10:00:15.000000000 -0600 ++++ gfan0.7/src/polyhedralfan.cpp 2024-08-13 10:51:08.061046009 -0600 +@@ -1671,7 +1671,7 @@ PolyhedralCone PolyhedralFan::coneContai + for(PolyhedralConeList::const_iterator i=cones.begin();i!=cones.end();i++) + if(i->contains(v))return i->faceContaining(v); + debug<<"Vector "< readIntList(istream &s) + { + list ret; + int c=s.peek(); +- while((c>='0') && (c<='9')|| (c==' ')) ++ while((c>='0' && c<='9')|| c==' ') + { + // fprintf(Stderr,"?\n"); + int r; +--- gfan0.7/src/symmetry.cpp.orig 2024-08-12 10:00:15.000000000 -0600 ++++ gfan0.7/src/symmetry.cpp 2024-08-12 11:05:45.724320177 -0600 +@@ -580,7 +580,7 @@ int SymmetryGroup::orbitSize(IntegerVect + if(doesFix)numFixed++; + } + } +- return groupSize/numFixed; ++ return (numFixed>0) ? groupSize/numFixed : 0; + } + + +--- gfan0.7/src/vektor.cpp.orig 2024-08-12 10:00:15.000000000 -0600 ++++ gfan0.7/src/vektor.cpp 2024-08-12 13:37:34.017788560 -0600 +@@ -96,17 +96,17 @@ int gcdGFAN(int r, int s) + int gcdOfVector(IntegerVector const &v) + { + int ret=0; +- for(int i=0;i + #include + #include + #include +@@ -14,8 +15,6 @@ using namespace std; + //typedef signed long int int64; + typedef int64_t int64; + +-void outOfRange(int i, int n); +- + /* + * TODO: in the process of making gfan a library to be used by POLYMAKE etc. + * we need to: +@@ -80,7 +79,7 @@ public: + template explicit Vektor(const Vektor& c) + :v(c.size()) + { +- for(int i=0;i=0 && n=0 && (size_t)nq[i])p1[i]=q[i];return p1;} +- friend Vektor coordinatewiseProduct(const Vektor& p, const Vektor& q){assert(p.size()==q.size());Vektor p1(q.size());for(int i=0;iq[i])p1[i]=q[i];return p1;} ++ friend Vektor coordinatewiseProduct(const Vektor& p, const Vektor& q){assert(p.size()==q.size());Vektor p1(q.size());for(size_t i=0;i0)if(q.v[i]0)&&(q[t]>0)) return false; ++ size_t n=p.size(); ++ for(size_t t=0;t0)&&(q[t]>0)) return false; + return true; + } + Vektor supportVector()const + { + Vektor r(v.size()); +- for(int i=0;i=0); +- assert(end<=size()); ++ assert((size_t)end<=size()); + assert(end>=begin); + Vektor ret(end-begin); + for(int i=0;i const &subset)const // Inverse of the above, except that unknown entries are set to zero. + { + Vektor ret(subset.size()); +- int i=0; +- for(int j=0;j const &positions) + { + Vektor ret(newSize); + assert(positions.size()==size()); +- for(int i=0;i0)==true)&1); ++ for(size_t i=0;i0)==true)&1); + } + }; + +--- gfan0.7/src/wallideal.cpp.orig 2024-08-12 10:00:15.000000000 -0600 ++++ gfan0.7/src/wallideal.cpp 2024-08-12 13:30:10.087861417 -0600 +@@ -951,7 +951,7 @@ bool fastIsFacet(IntegerVectorList const + } + + +- ++*/ + /* IntegerVector maxAttained(n); + IntegerVector minAttained(n); + for(IntegerVectorList::const_iterator k=tempNormals.begin();k!=tempNormals.end();k++) diff --git a/gfan-warnings.diff b/gfan-warnings.diff deleted file mode 100644 index a4c4038..0000000 --- a/gfan-warnings.diff +++ /dev/null @@ -1,92 +0,0 @@ - -[ 8s] app_fancoarsening.cpp:41:3: warning: no return statement in function returning non-void [-Wreturn-type] -[ 13s] app_main.cpp:184:12: warning: deleting object of polymorphic class type 'EnumerationAlgorithm' which has non-virtual destructor might cause undefined behavior [-Wdelete-non-virtual-dtor] -[ 13s] delete rs; //<--- In next release, make the class virtual -[ 15s] app_main.cpp:208:12: warning: deleting object of abstract class type 'EnumerationFilePrinter' which has non-virtual destructor will cause undefined behavior [-Wdelete-non-virtual-dtor] -[ 15s] delete ep;//<--- In next release, make the class virtual -[ 18s] app_test.cpp:103:1: warning: no return statement in function returning non-void [-Wreturn-type] -[ 20s] app_tropicalhypersurfacereconstruction.cpp:57:3: warning: no return statement in function returning non-void [-Wreturn-type] -[ 27s] gfanlib_tropicalhomotopy.h:457:8: warning: operation on 'numberToDrop' may be undefined [-Wsequence-point] -[ 27s] int numberToDrop=(subconfigurationIndex!=0) ? numberToDrop=k+1 : 0; - ---- - src/app_fancoarsening.cpp | 1 + - src/app_test.cpp | 4 ++-- - src/app_tropicalhypersurfacereconstruction.cpp | 1 + - src/enumeration.h | 3 +++ - src/gfanlib_tropicalhomotopy.h | 2 +- - 5 files changed, 8 insertions(+), 3 deletions(-) - -Index: gfan0.6.2/src/app_fancoarsening.cpp -=================================================================== ---- gfan0.6.2.orig/src/app_fancoarsening.cpp -+++ gfan0.6.2/src/app_fancoarsening.cpp -@@ -37,6 +37,7 @@ public: - { - - int i=0; -+ return {}; - - } - -Index: gfan0.6.2/src/app_test.cpp -=================================================================== ---- gfan0.6.2.orig/src/app_test.cpp -+++ gfan0.6.2/src/app_test.cpp -@@ -98,8 +98,8 @@ int testIntegers() - b=a; - a=c; - cerr<endEnumeration();} - bool targetBasis(const PolynomialSet &groebnerBasis){bool ret=true;if(target)ret=target->basis(groebnerBasis);printProgress();return ret;} - public: -+ virtual ~EnumerationAlgorithm() = default; - EnumerationAlgorithm(){target=0;progressCounter=0;} - void setEnumerationTarget(EnumerationTarget *target){this->target=target;} - virtual void enumerate(const PolynomialSet &groebnerBasis){} -Index: gfan0.6.2/src/gfanlib_tropicalhomotopy.h -=================================================================== ---- gfan0.6.2.orig/src/gfanlib_tropicalhomotopy.h -+++ gfan0.6.2/src/gfanlib_tropicalhomotopy.h -@@ -454,7 +454,7 @@ template + +- Update to release 0.7 + * Introduction of ``_tropicalprevariety`` which is much faster + than the old ``_tropicalintersection``. +- Add gfan-c++20.patch, gfan-gcd.patch, gfan-multiplicities.patch, + gfan-soplex.patch, gfan-warning.patch +- Delete gfan-warnings.diff & cddlib.patch + (replaced by gfan-warning.patch), delete gfan-odr.patch (obsolete) + ------------------------------------------------------------------- Tue Jul 13 09:09:06 UTC 2021 - Alois Wohlschlager diff --git a/gfan.spec b/gfan.spec index 73ef826..4f63ac3 100644 --- a/gfan.spec +++ b/gfan.spec @@ -17,18 +17,20 @@ Name: gfan -Version: 0.6.2 +Version: 0.7 Release: 0 Summary: Calculation of Gröbner fans License: GPL-2.0-only Group: Productivity/Scientific/Math -URL: http://home.imf.au.dk/jensen/software/gfan/gfan.html - -Source: http://home.imf.au.dk/jensen/software/gfan/%name%version.tar.gz +URL: https://math.au.dk/~jensen/software/gfan/gfan.html +Source: https://math.au.dk/~jensen/software/gfan/%name%version.tar.gz Patch1: gfan-automake.diff -Patch2: gfan-warnings.diff -Patch3: cddlib.patch -Patch4: gfan-odr.patch +# From fedora +Patch2: gfan-warning.patch +Patch3: gfan-soplex.patch +Patch4: gfan-c++20.patch +Patch5: gfan-gcd.patch +Patch6: gfan-multiplicities.patch BuildRequires: automake BuildRequires: cddlib-devel BuildRequires: gcc-c++ @@ -48,6 +50,8 @@ BuildRequires: tex(english.ldf) %endif %endif %endif +# Software requires the presence of __int128; possibly relevant for armv7l too +ExcludeArch: %ix86 %description Gfan is a software package for computing Gröbner fans and tropical @@ -58,11 +62,10 @@ varieties. These are polyhedral fans associated to polynomial ideals. %build autoreconf -fi -export CXXFLAGS="%optflags -Wno-sign-compare -Wno-reorder -Wno-unused -Wno-comment -Wno-misleading-indentation -std=gnu++11" %configure -make %{?_smp_mflags} V=1 +%make_build V=1 %if 0%{?with_pdf} -make -C doc %{?_smp_mflags} +%make_build -C doc %endif %install diff --git a/gfan0.6.2.tar.gz b/gfan0.6.2.tar.gz deleted file mode 100644 index 89e00e8..0000000 --- a/gfan0.6.2.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a674d5e5dc43634397de0d55dd5da3c32bd358d05f72b73a50e62c1a1686f10a -size 1321059 diff --git a/gfan0.7.tar.gz b/gfan0.7.tar.gz new file mode 100644 index 0000000..f7ec846 --- /dev/null +++ b/gfan0.7.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ab833757e1e4d4a98662f4aa691394013ea9a226f6416b8f8565356d6fcc989e +size 1549653