View | Details | Raw Unified | Return to bug 250879
Collapse All | Expand All

(-)math/gfan/Makefile (-12 / +5 lines)
Lines 4-13 Link Here
4
DISTVERSION=	0.6.2
4
DISTVERSION=	0.6.2
5
PORTREVISION=	1
5
PORTREVISION=	1
6
CATEGORIES=	math
6
CATEGORIES=	math
7
MASTER_SITES=	http://home.math.au.dk/jensen/software/gfan/
7
MASTER_SITES=	https://users-math.au.dk/jensen/software/gfan/
8
DISTNAME=	${PORTNAME}${DISTVERSION}
8
DISTNAME=	${PORTNAME}${DISTVERSION}
9
9
10
MAINTAINER=	ports@FreeBSD.org
10
MAINTAINER=	moritz@schmi.tt
11
COMMENT=	Software for computing Groebner fans and tropical varieties
11
COMMENT=	Software for computing Groebner fans and tropical varieties
12
12
13
LICENSE=	GPLv2+
13
LICENSE=	GPLv2+
Lines 18-34 Link Here
18
18
19
USES=		compiler:c++11-lang gmake localbase
19
USES=		compiler:c++11-lang gmake localbase
20
20
21
CFLAGS+=	-DGMPRATIONAL
22
23
OPTIONS_DEFINE=	DOCS EXAMPLES
21
OPTIONS_DEFINE=	DOCS EXAMPLES
24
22
25
post-patch:
23
CFLAGS+=	-DGMPRATIONAL
26
	@${REINPLACE_CMD} \
24
LDFLAGS+=	-L${LOCALBASE}/lib
27
		's,ADDITIONALLINKOPTIONS = ,ADDITIONALLINKOPTIONS = -L${LOCALBASE}/lib ,' \
28
		${WRKSRC}/Makefile
29
	for x in ${WRKSRC}/src/*; \
30
		do ${REINPLACE_CMD} 's,log2,gfan_log2,g' $$x; \
31
		done
32
25
33
do-install:
26
do-install:
34
	${INSTALL_PROGRAM} ${WRKSRC}/gfan ${STAGEDIR}${PREFIX}/bin
27
	${INSTALL_PROGRAM} ${WRKSRC}/gfan ${STAGEDIR}${PREFIX}/bin
Lines 41-47 Link Here
41
34
42
post-install-EXAMPLES-on:
35
post-install-EXAMPLES-on:
43
	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
36
	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
44
	cd ${WRKSRC}/examples && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}
37
	${CP} ${WRKSRC}/examples/* ${STAGEDIR}${EXAMPLESDIR}
45
38
46
do-test:
39
do-test:
47
	cd ${WRKSRC} && ./gfan _test
40
	cd ${WRKSRC} && ./gfan _test
(-)math/gfan/files/patch-src_app__doesidealcontain.cpp (+15 lines)
Line 0 Link Here
1
--- src/app_doesidealcontain.cpp.orig	2017-06-20 14:47:37 UTC
2
+++ src/app_doesidealcontain.cpp
3
@@ -52,9 +52,9 @@ class DoesIdealContainApplication : public GFanApplica
4
     	for(PolynomialSet::const_iterator i=b.begin();i!=b.end();i++)
5
     	{
6
     		Polynomial remainder=division(multiplier* *i,a,LexicographicTermOrder());
7
-	log2 AsciiPrinter(Stderr).printString("Remainder: ");
8
-	log2 AsciiPrinter(Stderr).printPolynomial(remainder);
9
-	log2 AsciiPrinter(Stderr).printNewLine();
10
+	gfan_log2 AsciiPrinter(Stderr).printString("Remainder: ");
11
+	gfan_log2 AsciiPrinter(Stderr).printPolynomial(remainder);
12
+	gfan_log2 AsciiPrinter(Stderr).printNewLine();
13
 	if(!remainder.isZero())
14
 	  {
15
 	    log1 AsciiPrinter(Stderr).printString("Polynomial not in ideal: ");
(-)math/gfan/files/patch-src_app__fiberpolytope.cpp (+11 lines)
Line 0 Link Here
1
--- src/app_fiberpolytope.cpp.orig	2017-06-20 14:47:37 UTC
2
+++ src/app_fiberpolytope.cpp
3
@@ -166,7 +166,7 @@ class FiberPolytopeApplication : public GFanApplicatio
4
 		    for(PolyhedralFan::coneIterator i=f1.conesBegin();i!=f1.conesEnd();i++)
5
 			{
6
 		    	static int a;
7
-		    	log2 cerr<<"Processing Cone "<<a++<<" which has dimension "<<i->dimension()<<endl;
8
+		    	gfan_log2 cerr<<"Processing Cone "<<a++<<" which has dimension "<<i->dimension()<<endl;
9
 		    	SecondaryFanTraverser traverser(triangulationWithFullDimensionalIntersection(t,*i),*i);
10
 				symmetricTraverse(traverser,target,&s);
11
 			}
(-)math/gfan/files/patch-src_app__groebnerfan.cpp (+20 lines)
Line 0 Link Here
1
--- src/app_groebnerfan.cpp.orig	2017-06-20 14:47:37 UTC
2
+++ src/app_groebnerfan.cpp
3
@@ -74,7 +74,7 @@ class GroebnerFanApplication : public GFanApplication 
4
 	{
5
 	  log1 fprintf(Stderr,"Computing Groebner Basis...\n");
6
 	  buchberger(&g,StandardGradedLexicographicTermOrder());
7
-	  log2 AsciiPrinter(Stderr).printPolynomialSet(g);
8
+	  gfan_log2 AsciiPrinter(Stderr).printPolynomialSet(g);
9
 	}
10
       log1 fprintf(Stderr,"A reduced Groebner basis has been computed\n");
11
 
12
@@ -113,7 +113,7 @@ class GroebnerFanApplication : public GFanApplication 
13
 	    for(PolyhedralFan::coneIterator i=f1.conesBegin();i!=f1.conesEnd();i++)
14
 		{
15
 	    	static int t;
16
-	    	log2 cerr<<"Processing Cone "<<t++<<" which has dimension "<<i->dimension()<<endl;
17
+	    	gfan_log2 cerr<<"Processing Cone "<<t++<<" which has dimension "<<i->dimension()<<endl;
18
 	    	GroebnerFanTraverser traverser(groebnerBasisWithFullDimensionalIntersection(g,*i),*i);
19
     		SymmetricTargetCounterInterrupted target2(target,optionInterrupt.getValue());
20
 			symmetricTraverse(traverser,target2,&s);
(-)math/gfan/files/patch-src_app__main.cpp (+11 lines)
Line 0 Link Here
1
--- src/app_main.cpp.orig	2017-06-20 14:47:37 UTC
2
+++ src/app_main.cpp
3
@@ -143,7 +143,7 @@ class GCats : public GFanApplication (public)
4
 	{
5
 	  log1 fprintf(Stderr,"Computing Groebner Basis...\n");
6
 	  buchberger(&g,StandardGradedLexicographicTermOrder());
7
-	  log2 AsciiPrinter(Stderr).printPolynomialSet(g);
8
+	  gfan_log2 AsciiPrinter(Stderr).printPolynomialSet(g);
9
 	}
10
       log1 fprintf(Stderr,"A reduced Groebner basis has been computed\n");
11
     }
(-)math/gfan/files/patch-src_app__resultantfan.cpp (+24 lines)
Line 0 Link Here
1
--- src/app_resultantfan.cpp.orig	2017-06-20 14:47:37 UTC
2
+++ src/app_resultantfan.cpp
3
@@ -164,7 +164,7 @@ class ResultantFanApplication : public GFanApplication
4
               for(IntegerVectorList::const_iterator i=linealityGen.begin();i!=linealityGen.end();i++)temp.push_back(*i);
5
               for(IntegerVectorList::const_iterator i=gen.begin();i!=gen.end();i++)temp.push_back(*i);
6
 
7
-              if(::rank(rowsToIntegerMatrix(temp,N))!=N){log2 debug<<"Skipping\n";continue;}
8
+              if(::rank(rowsToIntegerMatrix(temp,N))!=N){gfan_log2 debug<<"Skipping\n";continue;}
9
             }
10
 
11
 
12
@@ -182,10 +182,10 @@ class ResultantFanApplication : public GFanApplication
13
           C.canonicalize();
14
    //       debug<<toNonSpecialSubspace(gen,*special);
15
   //        debug<<toNonSpecialSubspace(linealityGen,*special);
16
-          log2 debug<<":"<<C.dimension()<<"\n";
17
+          gfan_log2 debug<<":"<<C.dimension()<<"\n";
18
           if(C.dimension()==n-1)
19
             {
20
-              log2 debug<<"adding\n";
21
+              gfan_log2 debug<<"adding\n";
22
               F.push_back(C);
23
             }
24
         }
(-)math/gfan/files/patch-src_app__secondaryfan.cpp (+11 lines)
Line 0 Link Here
1
--- src/app_secondaryfan.cpp.orig	2017-06-20 14:47:37 UTC
2
+++ src/app_secondaryfan.cpp
3
@@ -385,7 +385,7 @@ class SecondaryFanApplication : public GFanApplication
4
 		    for(PolyhedralFan::coneIterator i=f1.conesBegin();i!=f1.conesEnd();i++)
5
 			{
6
 		    	static int a;
7
-		    	log2 cerr<<"Processing Cone "<<a++<<" which has dimension "<<i->dimension()<<endl;
8
+		    	gfan_log2 cerr<<"Processing Cone "<<a++<<" which has dimension "<<i->dimension()<<endl;
9
 		    	SecondaryFanTraverser traverser(triangulationWithFullDimensionalIntersection(t,*i),*i);
10
 				SymmetricTargetCounterInterrupted target2(target,optionInterrupt.getValue());
11
 				symmetricTraverse(traverser,target2,&s);
(-)math/gfan/files/patch-src_app__tropicalintersection.cpp (+11 lines)
Line 0 Link Here
1
--- src/app_tropicalintersection.cpp.orig	2017-06-20 14:47:37 UTC
2
+++ src/app_tropicalintersection.cpp
3
@@ -37,7 +37,7 @@ class SymmetricTargetTropicalBasisTester : public Symm
4
 	bool process(ConeTraverser &traverser)
5
 	{
6
 		IntegerVector w=traverser.refToPolyhedralCone().getRelativeInteriorPoint();
7
-		log2 AsciiPrinter(Stderr) << "Testing weight vector:\n"<<w<<"\n";
8
+		gfan_log2 AsciiPrinter(Stderr) << "Testing weight vector:\n"<<w<<"\n";
9
 		WeightReverseLexicographicTermOrder T(w);
10
 		buchberger(&g,T);
11
 		PolynomialSet temp=initialForms(g,w);
(-)math/gfan/files/patch-src_app__tropicaltraverse.cpp (+13 lines)
Line 0 Link Here
1
--- src/app_tropicaltraverse.cpp.orig	2017-06-20 14:47:37 UTC
2
+++ src/app_tropicaltraverse.cpp
3
@@ -93,8 +93,8 @@ class TropicalTraverseApplication : public GFanApplica
4
 	s.computeClosure(generators);
5
 	  s.createTrie();
6
 
7
-	  log2 s.print(Stderr);
8
-	log2 fprintf(Stderr,"\n");
9
+	  gfan_log2 s.print(Stderr);
10
+	gfan_log2 fprintf(Stderr,"\n");
11
       }
12
     if(optionTorusSymmetry.getValue() && !optionSymmetry.getValue())
13
       {
(-)math/gfan/files/patch-src_bergman.cpp (+117 lines)
Line 0 Link Here
1
--- src/bergman.cpp.orig	2017-06-20 14:47:37 UTC
2
+++ src/bergman.cpp
3
@@ -79,15 +79,15 @@ BergmanFan bergmanRayIntersection(PolynomialSet const 
4
   //  fprintf(Stderr,"---------------------------------------------------------\n");
5
 
6
 
7
-  log2  cerr<<"BBLABL";
8
+  gfan_log2  cerr<<"BBLABL";
9
   for(IntegerVectorList::const_iterator i=rays.begin();i!=rays.end();i++)
10
     {
11
-      log2 cerr<<"1";
12
+      gfan_log2 cerr<<"1";
13
       PolynomialSet g=idealGroebnerBasis;
14
       g=GE_groebnerBasis(g,WeightReverseLexicographicTermOrder(*i),true,false);//Set to true?
15
       //      buchberger(&g,WeightReverseLexicographicTermOrder(*i));
16
       PolynomialSet cg=initialFormsAssumeMarked(g,*i);
17
-      log2 cerr<<"2";
18
+      gfan_log2 cerr<<"2";
19
  
20
       bool inList=false;
21
       for(BergmanFan::MaximalConeList::const_iterator j=bfan.cones.begin();j!=bfan.cones.end();j++)
22
@@ -98,14 +98,14 @@ BergmanFan bergmanRayIntersection(PolynomialSet const 
23
 	      break;
24
 	    }
25
 	}
26
-      log2 cerr<<"3";
27
+      gfan_log2 cerr<<"3";
28
       if(!inList)
29
 	{
30
 	  bfan.cones.push_back(BergmanFan::MaximalCone(cg,g,true,maximalConeLabel++));
31
 	}
32
-      log2 cerr<<"4";
33
+      gfan_log2 cerr<<"4";
34
     }
35
-  log2 cerr<<"BBLAB  END";
36
+  gfan_log2 cerr<<"BBLAB  END";
37
   //  AsciiPrinter temp(Stderr);
38
   //  bfan.print(temp);
39
   return bfan;
40
@@ -631,7 +631,7 @@ BergmanFan bergman(PolynomialSet const &coneGroebnerBa
41
 			     symmetry checks were algebraic and not
42
 			     geometric*/
43
 			  //  assert(i->idealGroebnerBasis.isMarked());
44
-			  log2 cerr<<"8";
45
+			  gfan_log2 cerr<<"8";
46
 
47
 			  PolynomialSet g2(theRing);
48
 			  WeightTermOrder termOrder(termorderWeight(initialIdeal));
49
@@ -639,14 +639,14 @@ BergmanFan bergman(PolynomialSet const &coneGroebnerBa
50
 			  for(PolynomialSet::const_iterator j=i->idealGroebnerBasis.begin();j!=i->idealGroebnerBasis.end();j++)
51
 			    g2.push_back(divisionLift(*j, initialIdeal, current.idealGroebnerBasis, termOrder));
52
 			  assert(g2.isMarked());
53
-			  log2 cerr<<"9";
54
+			  gfan_log2 cerr<<"9";
55
 			
56
 			 
57
 			  if(1)
58
 			    {
59
-			      log2 cerr << "AUTOREDUCTION";
60
+			      gfan_log2 cerr << "AUTOREDUCTION";
61
 			      autoReduce(&g2,LexicographicTermOrder());
62
-			      log2 cerr << "AUTOREDUCTION END"<<endl;
63
+			      gfan_log2 cerr << "AUTOREDUCTION END"<<endl;
64
 			    }
65
 			  else
66
 			    {
67
@@ -655,17 +655,17 @@ BergmanFan bergman(PolynomialSet const &coneGroebnerBa
68
 			      log0 cerr << "RESTRICTED AUTOREDUCTION END"<<endl;
69
 			    }
70
 			  ConeOrbit tempConeOrbit(*symmetryGroup,i->coneGroebnerBasis,g2,-1);
71
-			  log2 cerr<<"0";
72
+			  gfan_log2 cerr<<"0";
73
 			  IntegerVector relIntFacetVector=tempConeOrbit.getStableRay();
74
 
75
-			  log2 cerr<<"A";
76
+			  gfan_log2 cerr<<"A";
77
 
78
 			  int label=-1;
79
 			  IntegerVector labelPermutation;
80
 			  if(!active.containsAndMark(relIntFacetVector,relIntRidgeVector,&label,&labelPermutation))
81
 			    //			  if(!active.containsAndMark(i->coneGroebnerBasis,initialIdeal,&label,&labelPermutation))
82
 			    {
83
-			  log2 cerr<<"B";
84
+			  gfan_log2 cerr<<"B";
85
 			      if(!ret.contains(i->coneGroebnerBasis))
86
 				{
87
 				  label=maximalConeLabel++;
88
@@ -680,13 +680,13 @@ BergmanFan bergman(PolynomialSet const &coneGroebnerBa
89
 				{
90
 				  assert(0);//Can this ever happen? REMOVE JAN 2009
91
 				}
92
-			  log2 cerr<<"C";
93
+			  gfan_log2 cerr<<"C";
94
 			    }
95
-			  log2 cerr<<"D";
96
+			  gfan_log2 cerr<<"D";
97
 			  ret.codimensionOneCones.back().incidenceList.push_back(label);
98
-			  log2 cerr<<"E";
99
+			  gfan_log2 cerr<<"E";
100
 			  ret.codimensionOneCones.back().incidencePermutationList.push_back(labelPermutation);
101
-			  log2 cerr<<"F";
102
+			  gfan_log2 cerr<<"F";
103
 			}
104
 		    }
105
 		    //		  else
106
@@ -898,9 +898,9 @@ PolyhedralFan BergmanFan::toPolyhedralFan()const
107
       //PolyhedralCone c1(wallInequalities(i->idealGroebnerBasis),wallInequalities(i->coneGroebnerBasis));
108
       //      PolyhedralCone c1(wallFlipableNormals(i->idealGroebnerBasis,false),wallInequalities(i->coneGroebnerBasis),n);
109
       PolyhedralCone c1=i->theCone;
110
-      log2 fprintf(Stderr,"Cononicalising...\n");
111
+      gfan_log2 fprintf(Stderr,"Cononicalising...\n");
112
       c1.canonicalize();
113
-      log2 fprintf(Stderr,"... done canonicalising...\n");
114
+      gfan_log2 fprintf(Stderr,"... done canonicalising...\n");
115
       //      fprintf(Stderr,"a\n");
116
       //      for(SymmetryGroup::ElementContainer::const_iterator j=symmetryGroup.elements.begin();j!=symmetryGroup.elements.end();j++)
117
       //	{
(-)math/gfan/files/patch-src_breadthfirstsearch.cpp (+29 lines)
Line 0 Link Here
1
--- src/breadthfirstsearch.cpp.orig	2017-06-20 14:47:37 UTC
2
+++ src/breadthfirstsearch.cpp
3
@@ -259,7 +259,7 @@ class Orbit{ (public)
4
 	//	fprintf(Stderr,"1b\n");
5
       }
6
 
7
-    log2 fprintf(Stderr,"numFixed = %i\n",numFixed);
8
+    gfan_log2 fprintf(Stderr,"numFixed = %i\n",numFixed);
9
     return groupSize/numFixed;
10
   }
11
 };
12
@@ -368,7 +368,7 @@ void BreadthFirstSearch::enumerate(const PolynomialSet
13
 	static int n;
14
 	n++;
15
 	if(!(n%10))
16
-	  log2 fprintf(Stderr,"%i\n",n);
17
+	  gfan_log2 fprintf(Stderr,"%i\n",n);
18
       }
19
        log3  fprintf(Stderr,"Active set:\n");
20
        log3 active.print(Stderr);
21
@@ -484,7 +484,7 @@ void BreadthFirstSearch::enumerate(const PolynomialSet
22
 		    }
23
 		  else
24
 		    {
25
-		      // log2 fprintf(Stderr,"-- marked\n");
26
+		      // gfan_log2 fprintf(Stderr,"-- marked\n");
27
 		    }
28
 		}
29
 	    }
(-)math/gfan/files/patch-src_buchberger.cpp (+44 lines)
Line 0 Link Here
1
--- src/buchberger.cpp.orig	2017-06-20 14:47:37 UTC
2
+++ src/buchberger.cpp
3
@@ -65,7 +65,7 @@ void buchberger/*Simple*/(PolynomialSet *g, TermOrder 
4
 		return buchberger2(g, termOrder, allowSaturation);
5
 	//return buchbergerChain(g, termOrder, allowSaturation);
6
 	PolynomialRing theRing=g->getRing();
7
-  //  log2 fprintf(Stderr,"ENTERING buchberger\n");
8
+  //  gfan_log2 fprintf(Stderr,"ENTERING buchberger\n");
9
   TimerScope ts(&buchbergerTimer);
10
   PolynomialSet sPolynomials(theRing);
11
 
12
@@ -136,11 +136,11 @@ void buchberger/*Simple*/(PolynomialSet *g, TermOrder 
13
     //  else
14
     //	  pout<<"ZERO\n";
15
     }
16
-  //log2  fprintf(Stderr," buchberger minimize\n");
17
+  //gfan_log2  fprintf(Stderr," buchberger minimize\n");
18
   minimize(g);
19
-  //log2 fprintf(Stderr," buchberger autoreduce\n");
20
+  //gfan_log2 fprintf(Stderr," buchberger autoreduce\n");
21
   autoReduce(g,termOrder);
22
-  //log2 fprintf(Stderr,"LEAVING buchberger\n\n");
23
+  //gfan_log2 fprintf(Stderr,"LEAVING buchberger\n\n");
24
 
25
   cerr<<"NumberOfReductions: "<<numberOfReductions<<std::endl;
26
 }
27
@@ -496,7 +496,7 @@ void buchberger2(PolynomialSet *g, TermOrder const &te
28
           g->push_back(p);
29
           G.push_back(p);
30
           numberOfUsefulCriticalPairs++;
31
-          log2
32
+          gfan_log2
33
           {
34
         	  static int t;
35
         	  if(((++t)&=31)==0)
36
@@ -587,7 +587,7 @@ bool isMarkedGroebnerBasis(PolynomialSet const &g)
37
   int counter=0;
38
   for(PolynomialSet::const_iterator i=g.begin();i!=g.end();i++)
39
     {
40
-    log2 fprintf(Stderr,"%i ",counter++);
41
+    gfan_log2 fprintf(Stderr,"%i ",counter++);
42
     for(PolynomialSet::const_iterator j=i;j!=g.end();j++)
43
       if(!relativelyPrime(i->getMarked().m.exponent,j->getMarked().m.exponent))
44
 	{
(-)math/gfan/files/patch-src_codimoneconnectedness.cpp (+10 lines)
Line 0 Link Here
1
--- src/codimoneconnectedness.cpp.orig	2017-06-20 14:47:37 UTC
2
+++ src/codimoneconnectedness.cpp
3
@@ -33,6 +33,6 @@ bool CodimOneConnectednessTester::isConnected()const
4
       g.addEdge(facetIndex,nFacets+(lower_bound(allRidges2.begin(),allRidges2.end(),*j)-allRidges2.begin()));
5
 
6
   int diameter=g.diameter();
7
-  log2 cerr << "Diameter " << diameter << " nFacets " << nFacets << " nRidges " << nRidges << endl;
8
+  gfan_log2 cerr << "Diameter " << diameter << " nFacets " << nFacets << " nRidges " << nRidges << endl;
9
   return diameter<nFacets+nRidges;
10
 }
(-)math/gfan/files/patch-src_enumeration.cpp (+11 lines)
Line 0 Link Here
1
--- src/enumeration.cpp.orig	2017-06-20 14:47:37 UTC
2
+++ src/enumeration.cpp
3
@@ -72,7 +72,7 @@ void EnumerationAlgorithm::printProgress(int step)
4
       //      if(!(progressCounter&4095))
5
 	//      if(!(progressCounter&255))
6
       if(!(progressCounter&15))
7
-	log2 fprintf(Stderr,"Number of Gr\"obner Bases found %i\n",progressCounter);
8
+	gfan_log2 fprintf(Stderr,"Number of Gr\"obner Bases found %i\n",progressCounter);
9
       fflush(Stderr);
10
       step--;
11
     }
(-)math/gfan/files/patch-src_ep__xfig.cpp (+17 lines)
Line 0 Link Here
1
--- src/ep_xfig.cpp.orig	2017-06-20 14:47:37 UTC
2
+++ src/ep_xfig.cpp
3
@@ -75,12 +75,12 @@ bool XfigEnumerationPrinter::basis(const PolynomialSet
4
             }
5
         }
6
 
7
-  log2 xfig->printPolygon(p);
8
+  gfan_log2 xfig->printPolygon(p);
9
   xfig->drawPolygon(p,0);
10
 
11
   basisCounter++;
12
 
13
-  log2 fprintf(Stderr,"basisCounter:%i\n",basisCounter);
14
+  gfan_log2 fprintf(Stderr,"basisCounter:%i\n",basisCounter);
15
 
16
   return true;
17
 }
(-)math/gfan/files/patch-src_field__rationals.cpp (+11 lines)
Line 0 Link Here
1
--- src/field_rationals.cpp.orig	2017-06-20 14:47:37 UTC
2
+++ src/field_rationals.cpp
3
@@ -402,7 +402,7 @@ const char *FieldRationalsImplementation::name()
4
   list=this;
5
   */
6
 /*
7
-  log2 fprintf(Stderr,"Initializing field Rationals\n");
8
+  gfan_log2 fprintf(Stderr,"Initializing field Rationals\n");
9
 }
10
 */
11
 				//FieldRationals Q;
(-)math/gfan/files/patch-src_gfanlib__polyhedralfan.cpp (+38 lines)
Line 0 Link Here
1
--- src/gfanlib_polyhedralfan.cpp.orig	2017-06-20 14:47:37 UTC
2
+++ src/gfanlib_polyhedralfan.cpp
3
@@ -221,10 +221,10 @@ PolyhedralFan PolyhedralFan::fullComplex()const
4
 
5
   while(1)
6
     {
7
-      log2 debug<<"looping";
8
+      gfan_log2 debug<<"looping";
9
       bool doLoop=false;
10
       PolyhedralFan facets=ret.facetComplex();
11
-      log2 debug<<"number of facets"<<facets.size()<<"\n";
12
+      gfan_log2 debug<<"number of facets"<<facets.size()<<"\n";
13
       for(PolyhedralConeList::const_iterator i=facets.cones.begin();i!=facets.cones.end();i++)
14
         if(!ret.contains(*i))
15
           {
16
@@ -561,7 +561,7 @@ std::string PolyhedralFan::toString(int flags)const
17
         static int t;
18
 //        log1 fprintf(Stderr,"Adding faces of cone %i\n",t++);
19
       }
20
-//      log2 fprintf(Stderr,"Dim: %i\n",i->dimension());
21
+//      gfan_log2 fprintf(Stderr,"Dim: %i\n",i->dimension());
22
 
23
       addFacesToSymmetricComplex(symCom,*i,i->getHalfSpaces(),generatorsOfLinealitySpace);
24
     }
25
@@ -706,11 +706,11 @@ PolyhedralFan PolyhedralFan::readFan(string const &fil
26
 
27
     PolyhedralFan ret(n);
28
 
29
-    log2 cerr<< "Number of orbits to expand "<<cones.size()<<endl;
30
+    gfan_log2 cerr<< "Number of orbits to expand "<<cones.size()<<endl;
31
     for(int i=0;i<cones.size();i++)
32
       if(coneIndices==0 || coneIndices->count(i))
33
         {
34
-          log2 cerr<<"Expanding symmetries of cone"<<endl;
35
+          gfan_log2 cerr<<"Expanding symmetries of cone"<<endl;
36
           {
37
             IntegerVectorList coneRays;
38
             for(list<int>::const_iterator j=cones[i].begin();j!=cones[i].end();j++)
(-)math/gfan/files/patch-src_gfanlib__symmetriccomplex.cpp (+11 lines)
Line 0 Link Here
1
--- src/gfanlib_symmetriccomplex.cpp.orig	2017-06-20 14:47:37 UTC
2
+++ src/gfanlib_symmetriccomplex.cpp
3
@@ -554,7 +554,7 @@ IntegerMatrix SymmetricComplex::boundaryMap(int d)
4
           static int t;
5
   //        log1 fprintf(Stderr,"Adding faces of cone %i\n",t++);
6
         }
7
-  //      log2 fprintf(Stderr,"Dim: %i\n",i->dimension());
8
+  //      gfan_log2 fprintf(Stderr,"Dim: %i\n",i->dimension());
9
 
10
         addFacesToSymmetricComplex(symCom,*i,i->getHalfSpaces(),generatorsOfLinealitySpace);
11
       }
(-)math/gfan/files/patch-src_gfanlib__zfan.cpp (+16 lines)
Line 0 Link Here
1
--- src/gfanlib_zfan.cpp.orig	2017-06-20 14:47:37 UTC
2
+++ src/gfanlib_zfan.cpp
3
@@ -162,11 +162,11 @@ namespace gfan
4
 
5
         ZFan ret(sym);
6
 
7
-//        log2 cerr<< "Number of orbits to expand "<<cones.size()<<endl;
8
+//        gfan_log2 cerr<< "Number of orbits to expand "<<cones.size()<<endl;
9
         for(unsigned i=0;i<cones.size();i++)
10
         //  if(coneIndices==0 || coneIndices->count(i))
11
             {
12
-//              log2 cerr<<"Expanding symmetries of cone"<<endl;
13
+//              gfan_log2 cerr<<"Expanding symmetries of cone"<<endl;
14
               {
15
                 ZMatrix coneRays(0,n);
16
                 for(list<int>::const_iterator j=cones[i].begin();j!=cones[i].end();j++)
(-)math/gfan/files/patch-src_halfopencone.cpp (+172 lines)
Line 0 Link Here
1
--- src/halfopencone.cpp.orig	2017-06-20 14:47:37 UTC
2
+++ src/halfopencone.cpp
3
@@ -602,7 +602,7 @@ void tropicalHyperSurfaceIntersectionWithProcessor(int
4
       intersectionOld.print(&P);
5
 	*/
6
       }
7
-  log2 fprintf(Stderr,"Halfopen intersection completed.\n");
8
+  gfan_log2 fprintf(Stderr,"Halfopen intersection completed.\n");
9
 }
10
 
11
 PolyhedralFan tropicalHyperSurfaceIntersectionClosed(int dimension, PolynomialSet const &g, PolyhedralCone *restrictingCone, bool expand, bool saveResult, int intervalLow, int intervalHigh)
12
@@ -1296,7 +1296,7 @@ struct RecursionData (public)
13
 
14
     if(index == fans.size())
15
       {
16
-	log2 fprintf(Stderr,"ADDING CONE\n");
17
+	gfan_log2 fprintf(Stderr,"ADDING CONE\n");
18
 	//ret.push_back(current);
19
 	processor.process(current,chosenFans,chosen);
20
 	numberOfUsefulCalls++;
21
@@ -1339,7 +1339,7 @@ struct RecursionData (public)
22
 
23
 	static int iterationNumber;
24
 	if(!(iterationNumber++ & 31))
25
-	  log2
26
+	  gfan_log2
27
 	{
28
 	  fprintf(Stderr,"Iteration level:%i, Chosen fan:%i, Number of candidates:%i, Iteration Number:%i, Useful (%i/%i)=%f\n",index,bestIndex,bestNumberOfCandidates,iterationNumber,numberOfUsefulCalls,totalNumberOfCalls,float(numberOfUsefulCalls)/totalNumberOfCalls);
29
 	  fprintf(Stderr,"Chosen fans vector: ");
30
@@ -1490,7 +1490,7 @@ struct RecursionData (public)
31
   }
32
   bool closure()
33
   {
34
-    log2 cerr<<"computing closure"<<endl;
35
+    gfan_log2 cerr<<"computing closure"<<endl;
36
     bool ret=false;
37
     int a=0;
38
     for(int f1=0;f1<fans.size();f1++)
39
@@ -1532,8 +1532,8 @@ struct RecursionData (public)
40
 		  }
41
 	      }
42
       }
43
-    log2 fprintf(Stderr,"%i FOR FREE\n",a);
44
-    log2 cerr<<"done computing closure"<<endl;
45
+    gfan_log2 fprintf(Stderr,"%i FOR FREE\n",a);
46
+    gfan_log2 cerr<<"done computing closure"<<endl;
47
     return ret;
48
   }
49
 
50
@@ -1607,8 +1607,8 @@ struct RecursionData (public)
51
 		freeLPs++;
52
 	      }
53
     //    table.print();
54
-//    log2 fprintf(Stderr,"LPs solved:%i for relation table\n",data2.table.numberOfSolvedLPs);
55
-    log2 fprintf(Stderr,"Number of infeassible LPs discovered from higherdimensional cones: %i\n",freeLPs);
56
+//    gfan_log2 fprintf(Stderr,"LPs solved:%i for relation table\n",data2.table.numberOfSolvedLPs);
57
+    gfan_log2 fprintf(Stderr,"Number of infeassible LPs discovered from higherdimensional cones: %i\n",freeLPs);
58
   }
59
 };
60
 
61
@@ -1630,9 +1630,9 @@ void tropicalHyperSurfaceIntersection(int dimension, P
62
 	HalfOpenConeList l,lf;
63
 	buildFanFromPolynomial(*i, &lf, &l, &(parents[I]),restrictingCone);
64
 
65
-	log2 AsciiPrinter(Stderr).printVector(parents[I]);
66
+	gfan_log2 AsciiPrinter(Stderr).printVector(parents[I]);
67
 
68
-	log2 fprintf(Stderr,"\n");
69
+	gfan_log2 fprintf(Stderr,"\n");
70
 
71
 	vector<HalfOpenCone> L;
72
 	for(HalfOpenConeList::const_iterator i=l.begin();i!=l.end();i++)
73
@@ -1658,7 +1658,7 @@ void tropicalHyperSurfaceIntersection(int dimension, P
74
 //  data.table.print();//HERE
75
   IntegerVectorList empty;
76
   data.rek(0, HalfOpenCone(dimension,empty,empty,empty));
77
-  log2 fprintf(Stderr,"LPs solved:%i for relation table\n",data.table.numberOfSolvedLPs);
78
+  gfan_log2 fprintf(Stderr,"LPs solved:%i for relation table\n",data.table.numberOfSolvedLPs);
79
 }
80
 
81
 
82
@@ -1861,7 +1861,7 @@ void tropicalHyperSurfaceIntersectionInSubspace(int di
83
     are gotten as the pull-back of the lower dimensional equations by
84
     this normal form map.
85
    */
86
-  log2 cerr<<"Projecting Newton polytopes modulo the homogeneity space.";
87
+  gfan_log2 cerr<<"Projecting Newton polytopes modulo the homogeneity space.";
88
 
89
   int N=G.getRing().getNumberOfVariables();
90
   IntegerVectorList w=wallInequalities(G);
91
@@ -1887,7 +1887,7 @@ void tropicalHyperSurfaceIntersectionInSubspace(int di
92
       restrictingCone=&restrictedConeNew;
93
     }
94
 
95
-  log2 cerr<<"Done projecting Newton polytopes modulo the homogeneity space.";
96
+  gfan_log2 cerr<<"Done projecting Newton polytopes modulo the homogeneity space.";
97
   /*
98
     Now do the computation with the new set of polynomials.
99
    */
100
@@ -1895,7 +1895,7 @@ void tropicalHyperSurfaceIntersectionInSubspace(int di
101
   /*
102
     Here follows restriction to subspace cut out by the binomials.
103
    */
104
-  log2 cerr<<"Restricting to subspace determined by binomials and computing tropical hypersurfaces.";
105
+  gfan_log2 cerr<<"Restricting to subspace determined by binomials and computing tropical hypersurfaces.";
106
 
107
   int n=g.getRing().getNumberOfVariables();
108
   IntegerVectorList equations;
109
@@ -1937,12 +1937,12 @@ void tropicalHyperSurfaceIntersectionInSubspace(int di
110
   for(PolynomialSet::const_iterator i=g.begin();i!=g.end();i++)
111
     if(i->numberOfTerms()!=2)
112
       {
113
-	log2 cerr << I;
114
+	gfan_log2 cerr << I;
115
 	HalfOpenConeList l,lf;
116
-	log2 cerr<< "Building fan"<<endl;
117
+	gfan_log2 cerr<< "Building fan"<<endl;
118
 	buildFanFromPolynomial(*i, &lf, &l, &(parents[I]),restrictingCone);
119
-	log2 cerr<< "Number of cones:" << lf.size()<<","<< l.size()<<endl;
120
-	log2 cerr<< "rewriting"<<endl;
121
+	gfan_log2 cerr<< "Number of cones:" << lf.size()<<","<< l.size()<<endl;
122
+	gfan_log2 cerr<< "rewriting"<<endl;
123
 
124
 	vector<HalfOpenCone> L;
125
 	for(HalfOpenConeList::const_iterator i=l.begin();i!=l.end();i++)
126
@@ -1953,10 +1953,10 @@ void tropicalHyperSurfaceIntersectionInSubspace(int di
127
 
128
 	fullDimFanList.push_back(F);
129
 	coDimOneFanList.push_back(L);
130
-	log2 cerr<< "Done Building fan"<<endl;
131
+	gfan_log2 cerr<< "Done Building fan"<<endl;
132
 	I++;
133
       }
134
-  log2 cerr<<"Done computing tropical hypersurfaces.";
135
+  gfan_log2 cerr<<"Done computing tropical hypersurfaces.";
136
 
137
   /* Now we must create a new HalfOpenConeProcessor and tell it how to expand a cone.
138
      We must insert the pivot columns from A and add in the equtions gotten from the binomials.
139
@@ -1974,12 +1974,12 @@ void tropicalHyperSurfaceIntersectionInSubspace(int di
140
 
141
 
142
   IntegerVectorList empty;
143
-  log2 cerr<<"Doing intersection.";
144
+  gfan_log2 cerr<<"Doing intersection.";
145
   if(intervalHigh!=-1)data.setInterval(intervalLow,intervalHigh);
146
   data.rek(0, HalfOpenCone(nonPivots.size(),empty,empty,empty));
147
-  log2 cerr<<"Done doing intersection.";
148
+  gfan_log2 cerr<<"Done doing intersection.";
149
   //  data.rek(0, HalfOpenCone(dimension,empty,empty,empty));
150
-  //  log2 fprintf(Stderr,"LPs solved:%i for relation table\n",data.table.numberOfSolvedLPs);
151
+  //  gfan_log2 fprintf(Stderr,"LPs solved:%i for relation table\n",data.table.numberOfSolvedLPs);
152
 
153
   /*  HalfOpenConeList ret;
154
 
155
@@ -2151,7 +2151,7 @@ bool hasMixedCellOfDimension(PolynomialSet const &g, i
156
   IntegerVectorList empty;
157
   data.rek(0, HalfOpenCone(g.getRing().getNumberOfVariables(),empty,empty,empty));
158
 
159
-  log2 fprintf(Stderr,"LPs solved:%i for relation table\n",data.table.numberOfSolvedLPs);
160
+  gfan_log2 fprintf(Stderr,"LPs solved:%i for relation table\n",data.table.numberOfSolvedLPs);
161
 
162
   if(maximalSeen)*maximalSeen=p.getMaximalDimensionFound();
163
 
164
@@ -2185,7 +2185,7 @@ bool hasMixedCellOfDimension(list<list<IntegerVector> 
165
   IntegerVectorList empty;
166
   data.rek(0, HalfOpenCone(/*g.getRing().getNumberOfVariables()*/d,empty,empty,empty));
167
 
168
-  log2 fprintf(Stderr,"LPs solved:%i for relation table\n",data.table.numberOfSolvedLPs);
169
+  gfan_log2 fprintf(Stderr,"LPs solved:%i for relation table\n",data.table.numberOfSolvedLPs);
170
 
171
   if(maximalSeen)*maximalSeen=p.getMaximalDimensionFound();
172
 
(-)math/gfan/files/patch-src_linalg.cpp (+11 lines)
Line 0 Link Here
1
--- src/linalg.cpp.orig	2017-09-08 14:13:16 UTC
2
+++ src/linalg.cpp
3
@@ -885,7 +885,7 @@ IntegerVector vectorInKernel(IntegerMatrix const &m) /
4
 		return ret;
5
 	}
6
 	fallback:
7
-	log2 debug << "LINALG FALLBACK\n";
8
+	gfan_log2 debug << "LINALG FALLBACK\n";
9
 
10
 
11
   FieldMatrix m2=integerMatrixToFieldMatrix(m,Q);
(-)math/gfan/files/patch-src_log.h (+11 lines)
Line 0 Link Here
1
--- src/log.h.orig	2017-06-20 14:47:37 UTC
2
+++ src/log.h
3
@@ -14,7 +14,7 @@ void setLogLevel(int l);
4
 #define log0 if(logLevel>=0)
5
 
6
 #define log1 if(logLevel>=1)
7
-#define log2 if(logLevel>=2)
8
+#define gfan_log2 if(logLevel>=2)
9
 #define log3 if(logLevel>=3)
10
 
11
 #endif
(-)math/gfan/files/patch-src_lp__soplexcdd.cpp (+20 lines)
Line 0 Link Here
1
--- src/lp_soplexcdd.cpp.orig	2017-06-20 14:47:37 UTC
2
+++ src/lp_soplexcdd.cpp
3
@@ -536,7 +536,7 @@ if(0)	     {
4
 	     debug<<"\n";
5
 	     D(s);
6
 */
7
-	     log2 fprintf(Stderr,"Solution failed (Type2).\n");
8
+	     gfan_log2 fprintf(Stderr,"Solution failed (Type2).\n");
9
 
10
 	     /*	     for(int i=0;i<work.nCols();i++)
11
 	       {
12
@@ -578,7 +578,7 @@ if(0)	     {
13
 		 return false;
14
 	       }
15
 	     
16
-	       log2 fprintf(Stderr,"Certificate failed (Type2).\n");
17
+	       gfan_log2 fprintf(Stderr,"Certificate failed (Type2).\n");
18
 	       /* std::cerr<< work;
19
 	      std::cerr<< farkasx;
20
 	     AsciiPrinter(Stderr).printVector(c);
(-)math/gfan/files/patch-src_padic.cpp (+28 lines)
Line 0 Link Here
1
--- src/padic.cpp.orig	2017-06-20 14:47:37 UTC
2
+++ src/padic.cpp
3
@@ -406,14 +406,14 @@ void pAdicBuchberger(PolynomialSet &g, int prime, Inte
4
   for(PolynomialSet::const_iterator i=g.begin();i!=g.end();i++)
5
     for(PolynomialSet::const_iterator j=g.begin();j!=i;j++)
6
       {
7
-log2        debug<<"checking s poly\n"<<*i<<"("<<ST(*i,prime,omega,tieBreaker)<<")"<<"\n"<<*j<<"("<<ST(*j,prime,omega,tieBreaker)<<")"<<"\n";
8
+gfan_log2        debug<<"checking s poly\n"<<*i<<"("<<ST(*i,prime,omega,tieBreaker)<<")"<<"\n"<<*j<<"("<<ST(*j,prime,omega,tieBreaker)<<")"<<"\n";
9
         Polynomial f=SPolynomial(*i,*j,prime,omega,tieBreaker);
10
 //        debug<<"S="<<f<<"\n";
11
 // Enable the relatively prime criterion by uncommenting this following:
12
 #if 1
13
         if(relativelyPrime(ST(*i,prime,omega,tieBreaker).m.exponent,ST(*j,prime,omega,tieBreaker).m.exponent))
14
           {
15
-log2            debug<<"SKIPPING\n";
16
+gfan_log2            debug<<"SKIPPING\n";
17
           }
18
         else
19
 #endif
20
@@ -424,7 +424,7 @@ log2            debug<<"SKIPPING\n";
21
         f=longDivision(f,g,prime,omega,tieBreaker,H,u);
22
         if(!f.isZero())
23
           {
24
-log2            debug<<"Adding:"<<f<<"\n";
25
+gfan_log2            debug<<"Adding:"<<f<<"\n";
26
             g.push_back(f);
27
           }
28
         }
(-)math/gfan/files/patch-src_polyhedralcone.cpp (+11 lines)
Line 0 Link Here
1
--- src/polyhedralcone.cpp.orig	2017-06-20 14:47:37 UTC
2
+++ src/polyhedralcone.cpp
3
@@ -879,7 +879,7 @@ IntegerVectorList PolyhedralCone::extremeRays(IntegerV
4
 	    ret.push_back(u);
5
 	  else
6
 	    {
7
-	      log2 fprintf(Stderr,"Remember to fix cdd double description interface\n");
8
+	      gfan_log2 fprintf(Stderr,"Remember to fix cdd double description interface\n");
9
 	    }
10
 	}
11
     }
(-)math/gfan/files/patch-src_polyhedralfan.cpp (+65 lines)
Line 0 Link Here
1
--- src/polyhedralfan.cpp.orig	2017-06-20 14:47:37 UTC
2
+++ src/polyhedralfan.cpp
3
@@ -400,10 +400,10 @@ PolyhedralFan PolyhedralFan::fullComplex()const
4
 
5
   while(1)
6
     {
7
-      log2 debug<<"looping";
8
+      gfan_log2 debug<<"looping";
9
       bool doLoop=false;
10
       PolyhedralFan facets=ret.facetComplex();
11
-      log2 debug<<"number of facets"<<facets.size()<<"\n";
12
+      gfan_log2 debug<<"number of facets"<<facets.size()<<"\n";
13
       for(PolyhedralConeList::const_iterator i=facets.cones.begin();i!=facets.cones.end();i++)
14
 	if(!ret.contains(*i))
15
 	  {
16
@@ -1232,7 +1232,7 @@ void addFacesToSymmetricComplex(SymmetricComplex &c, s
17
 
18
       if(!c.contains(theCone))
19
 	{
20
-	  log2
21
+	  gfan_log2
22
 	  {
23
 	    static int t;
24
 	    if((t&1023)==0)
25
@@ -1317,7 +1317,7 @@ SymmetricComplex PolyhedralFan::toSymmetricComplex(Sym
26
 		static int t;
27
 		log1 fprintf(Stderr,"Adding faces of cone %i\n",t++);
28
 	      }
29
-	      log2 fprintf(Stderr,"Dim: %i\n",i->dimension());
30
+	      gfan_log2 fprintf(Stderr,"Dim: %i\n",i->dimension());
31
 
32
 	      addFacesToSymmetricComplex(symCom,*i,i->getHalfSpaces(),generatorsOfLinealitySpace);
33
 	    }
34
@@ -1387,7 +1387,7 @@ void PolyhedralFan::printWithIndices(class Printer *p,
35
 	static int t;
36
 	log1 fprintf(Stderr,"Adding faces of cone %i\n",t++);
37
       }
38
-      log2 fprintf(Stderr,"Dim: %i\n",i->dimension());
39
+      gfan_log2 fprintf(Stderr,"Dim: %i\n",i->dimension());
40
 
41
       addFacesToSymmetricComplex(symCom,*i,i->getHalfSpaces(),generatorsOfLinealitySpace);
42
     }
43
@@ -1565,11 +1565,11 @@ PolyhedralFan PolyhedralFan::readFan(string const &fil
44
 
45
     PolyhedralFan ret(n);
46
 
47
-    log2 cerr<< "Number of orbits to expand "<<cones.size()<<endl;
48
+    gfan_log2 cerr<< "Number of orbits to expand "<<cones.size()<<endl;
49
     for(int i=0;i<cones.size();i++)
50
       if(coneIndices==0 || coneIndices->count(i))
51
 	{
52
-	  log2 cerr<<"Expanding symmetries of cone"<<endl;
53
+	  gfan_log2 cerr<<"Expanding symmetries of cone"<<endl;
54
 	  /*	  for(SymmetryGroup::ElementContainer::const_iterator perm=sym->elements.begin();perm!=sym->elements.end();perm++)
55
 	    {
56
 	      IntegerVectorList coneRays;
57
@@ -1851,7 +1851,7 @@ bool PolyhedralFan::isConnected(SymmetryGroup *sym)con
58
 
59
   for(PolyhedralConeList::const_iterator i=cones.begin();i!=cones.end();i++)
60
     {
61
-      log2 cerr<<"Computing ridges of facet." << endl;
62
+      gfan_log2 cerr<<"Computing ridges of facet." << endl;
63
       PolyhedralFan ridges=facetsOfCone(*i);
64
       IntegerVectorList interiorPoints;
65
       for(PolyhedralConeList::const_iterator j=ridges.cones.begin();j!=ridges.cones.end();j++)
(-)math/gfan/files/patch-src_reversesearch.cpp (+33 lines)
Line 0 Link Here
1
--- src/reversesearch.cpp.orig	2017-06-20 14:47:37 UTC
2
+++ src/reversesearch.cpp
3
@@ -65,7 +65,7 @@ int ReverseSearch::treeSize(PolynomialSet &groebnerBas
4
     static int n;
5
     n++;
6
     if(!(n%10))
7
-      log2 fprintf(Stderr,"%i %i\n",n,depth);
8
+      gfan_log2 fprintf(Stderr,"%i %i\n",n,depth);
9
   }
10
 
11
   int s=1;
12
@@ -144,17 +144,17 @@ int ReverseSearch::treeSize(PolynomialSet &groebnerBas
13
 
14
 PolynomialSet ReverseSearch::findRoot(PolynomialSet groebnerBasis)
15
 {
16
-  log2 fprintf(Stderr,"Computing root\n");
17
-  log2 buchberger(&groebnerBasis,termOrder);
18
+  gfan_log2 fprintf(Stderr,"Computing root\n");
19
+  gfan_log2 buchberger(&groebnerBasis,termOrder);
20
 
21
   IntegerVector edge;
22
   while(computeSearchEdge(groebnerBasis,&edge))
23
     {
24
-      log2 AsciiPrinter(Stderr).printVector(edge);
25
+      gfan_log2 AsciiPrinter(Stderr).printVector(edge);
26
       groebnerBasis=flip(groebnerBasis,edge);
27
     }
28
 
29
-  log2 fprintf(Stderr,"Done computing root\n");
30
+  gfan_log2 fprintf(Stderr,"Done computing root\n");
31
   return groebnerBasis;
32
 }
33
 
(-)math/gfan/files/patch-src_singular.cpp (+28 lines)
Line 0 Link Here
1
--- src/singular.cpp.orig	2017-06-20 14:47:37 UTC
2
+++ src/singular.cpp
3
@@ -115,10 +115,10 @@ ring R=mySingularRingDegRevLex(idealGenerators.getRing
4
         test|=(Sy_bit(OPT_REDSB)|Sy_bit(OPT_REDTAIL)|Sy_bit(OPT_INTSTRATEGY));
5
         test|=(Sy_bit(OPT_REDTHROUGH));
6
 
7
-	log2 cerr<<"calling singular\n";
8
+	gfan_log2 cerr<<"calling singular\n";
9
 	//  debug<<"test"<<int(test)<<"\n";
10
 	ideal j=kStd(i,NULL,testHomog,NULL);
11
-	log2 cerr<<"returning from singular\n";
12
+	gfan_log2 cerr<<"returning from singular\n";
13
 
14
 	idDelete(&i);
15
 	ret=fromSingularIdeal(ret.getRing(),j,R);
16
@@ -175,10 +175,10 @@ ring R=mySingularRingDegRevLex(idealGenerators.getRing
17
     ideal i=singularPolynomialSet(idealGenerators);
18
     test|=(Sy_bit(OPT_REDSB)|Sy_bit(OPT_REDTAIL)|Sy_bit(OPT_INTSTRATEGY));
19
 
20
-    log2 cerr<<"calling singular\n";
21
+    gfan_log2 cerr<<"calling singular\n";
22
     ideal j=kStd(i,NULL,testHomog,NULL);
23
 	//    ideal j=kInterRed(i);
24
-    log2 cerr<<"returning from singular\n";
25
+    gfan_log2 cerr<<"returning from singular\n";
26
 
27
     idDelete(&i);
28
     ret=fromSingularIdeal(ret.getRing(),j,R);
(-)math/gfan/files/patch-src_symmetriccomplex.cpp (+11 lines)
Line 0 Link Here
1
--- src/symmetriccomplex.cpp.orig	2017-06-20 14:47:37 UTC
2
+++ src/symmetriccomplex.cpp
3
@@ -509,7 +509,7 @@ bool SymmetricComplex::isPure()const
4
   int dim=-1;
5
   for(ConeContainer::const_iterator i=cones.begin();i!=cones.end();i++)
6
     {
7
-      log2{static int a;if(!((a++)&63))fprintf(Stderr,"%i\n",a);}//log0
8
+      gfan_log2{static int a;if(!((a++)&63))fprintf(Stderr,"%i\n",a);}//log0
9
     if(isMaximal(*i))
10
       {
11
 	int dim2=i->dimension;
(-)math/gfan/files/patch-src_symmetry.cpp (+11 lines)
Line 0 Link Here
1
--- src/symmetry.cpp.orig	2017-06-20 14:47:37 UTC
2
+++ src/symmetry.cpp
3
@@ -631,7 +631,7 @@ void SymmetryGroup::createTrie()
4
 	int I=0;
5
 	for(ElementContainer::const_iterator i=elements.begin();i!=elements.end();i++,I++)
6
 		trie->insert(*i,I);
7
-	log2 debug<<"Number of elements";log2 debug.printInteger(trie->size());log2 debug<<"\n";
8
+	gfan_log2 debug<<"Number of elements";gfan_log2 debug.printInteger(trie->size());gfan_log2 debug<<"\n";
9
 	log1 debug<<"Done creating symmetry trie.\n";
10
 
11
 	if(0)
(-)math/gfan/files/patch-src_traverser__stableintersection.cpp (+20 lines)
Line 0 Link Here
1
--- src/traverser_stableintersection.cpp.orig	2017-06-20 14:47:37 UTC
2
+++ src/traverser_stableintersection.cpp
3
@@ -62,7 +62,7 @@ IntegerVectorList StableIntersectionTraverser::link(In
4
 
5
 	IntegerVectorList rays1=theLink.getRaysInPrintingOrder(0);
6
 
7
-	log2 {
8
+	gfan_log2 {
9
 	  cerr<<"Ray candidates:"<<endl;
10
 	  AsciiPrinter(Stderr)<<rays1;
11
 	}
12
@@ -80,7 +80,7 @@ IntegerVectorList StableIntersectionTraverser::link(In
13
 			rays2.push_back(ray.getUniquePoint());
14
 			//			rays2.push_back(*i);
15
 			}
16
-	log2{
17
+	gfan_log2{
18
 	cerr<<"True rays:"<<endl;
19
 	AsciiPrinter(Stderr)<<rays2;
20
 	}
(-)math/gfan/files/patch-src_traverser__tropical.cpp (+75 lines)
Line 0 Link Here
1
--- src/traverser_tropical.cpp.orig	2017-06-20 14:47:37 UTC
2
+++ src/traverser_tropical.cpp
3
@@ -41,12 +41,12 @@ void TropicalTraverser::updatePolyhedralCone()
4
 
5
 void TropicalTraverser::changeCone(IntegerVector const &ridgeVector, IntegerVector const &rayVector)
6
 {
7
-log2 {
8
+gfan_log2 {
9
 	debug << "Interior point:"<<theCone.getUniquePoint()<<"\n";
10
 	debug << "Ridge:"<<ridgeVector<<"Ray:"<<rayVector<<"\n";
11
 }
12
 	assert(idealGroebnerBasis.containsInClosedGroebnerCone(ridgeVector));
13
-	  log2 cerr<<endl<<"Changing cone"<<endl;
14
+	  gfan_log2 cerr<<endl<<"Changing cone"<<endl;
15
 
16
 	//  assert(!containsMonomial(coneGroebnerBasis));
17
 
18
@@ -59,7 +59,7 @@ log2 {
19
 	  WeightReverseLexicographicTermOrder T(rayVector);
20
 
21
 	  //  P<<ridgeIdeal;
22
-	  log2 cerr<<"Computing initial Groebner basis"<<endl;
23
+	  gfan_log2 cerr<<"Computing initial Groebner basis"<<endl;
24
 	  //  buchberger(&ridgeIdeal,T);
25
 
26
 	  ridgeIdeal=GE_groebnerBasis(ridgeIdeal,T,true,false);//Set to true?
27
@@ -70,7 +70,7 @@ log2 {
28
 	  //  WeightTermOrder termOrder(termorderWeight(ridgeIdeal));
29
 	  WeightTermOrder termOrder(termorderWeight(ridgeIdealOld));
30
 
31
-	  log2 cerr<<"Lifting"<<endl;
32
+	  gfan_log2 cerr<<"Lifting"<<endl;
33
 	  PolynomialSet temp=ridgeIdealOld;
34
 	  temp.markAndScale(T);
35
 	  temp=temp.markedTermIdeal();
36
@@ -90,7 +90,7 @@ log2 {
37
 	    }
38
 	  assert(g2.isMarked());
39
 	  //printMarkedTermIdeal(g2,"g2");
40
-	  log2 cerr<<"Autoreducing"<<endl;
41
+	  gfan_log2 cerr<<"Autoreducing"<<endl;
42
 
43
 	  //  autoReduce(&g2,LexicographicTermOrder());
44
 	  //PolynomialSet g2Old=g2;
45
@@ -117,7 +117,7 @@ log2 {
46
 	  assert(idealGroebnerBasis.size()==oldSize);
47
 	  //  idealGroebnerBasis=g2;
48
 //	  assert(!containsMonomial(coneGroebnerBasis));
49
-	  log2 cerr<<"Done changing cone"<<endl<<endl;
50
+	  gfan_log2 cerr<<"Done changing cone"<<endl<<endl;
51
 
52
 	  //  P<<coneGroebnerBasis;
53
 	  //  P<<idealGroebnerBasis;
54
@@ -136,7 +136,7 @@ log2 {
55
 	    P<<coneGroebnerBasis;
56
 	    }*/
57
 
58
-	  log2 cerr << "Number of terms in new basis: "<< g2.totalNumberOfTerms()<<endl;
59
+	  gfan_log2 cerr << "Number of terms in new basis: "<< g2.totalNumberOfTerms()<<endl;
60
 
61
 
62
 	updatePolyhedralCone();
63
@@ -152,10 +152,10 @@ IntegerVectorList TropicalTraverser::link(IntegerVecto
64
 
65
 	//P<<tempIdeal;
66
 
67
-//	log2 D(tempIdeal);
68
+//	gfan_log2 D(tempIdeal);
69
 //	tempIdeal=saturatedIdeal(tempIdeal);//TODO: figure out if it is an advantage to saturate the ideal
70
 	/* That seems not to be the case. For example on Grassmann 3_8. Here most time would be spent saturating.*/
71
-//	log2 D(tempIdeal);
72
+//	gfan_log2 D(tempIdeal);
73
 
74
 	IntegerVectorList rays;
75
 
(-)math/gfan/files/patch-src_triangulation2.h (+20 lines)
Line 0 Link Here
1
--- src/triangulation2.h.orig	2017-06-20 14:47:37 UTC
2
+++ src/triangulation2.h
3
@@ -602,7 +602,7 @@ using namespace std;
4
 /*    void flip(IntegerVector const &normal)
5
     {
6
       AsciiPrinter P(Stderr);
7
-      log2 print(P);
8
+      gfan_log2 print(P);
9
       //log0 P.printVector(normal);
10
       int n=normal.size();
11
       //      IntegerVectorList l=wallRemoveScaledInequalities(inequalities());// This is not needed - one circuit should be enough
12
@@ -610,7 +610,7 @@ using namespace std;
13
       for(IntegerVectorList::const_iterator i=l.begin();i!=l.end();i++)
14
 	if(dependent(*i,normal))
15
 	  {
16
-	    log2 AsciiPrinter(Stderr).printVector(*i);
17
+	    gfan_log2 AsciiPrinter(Stderr).printVector(*i);
18
 	    for(int k=0;k<normal.size();k++)
19
 	      if((*i)[k]<0)
20
 		{
(-)math/gfan/files/patch-src_tropical.cpp (+11 lines)
Line 0 Link Here
1
--- src/tropical.cpp.orig	2017-06-20 14:47:37 UTC
2
+++ src/tropical.cpp
3
@@ -241,7 +241,7 @@ bool containsMonomialDehomogenize(PolynomialSet const 
4
 
5
 bool containsMonomial(PolynomialSet const &ideal)
6
 {
7
-	log2 debug<<"containsMonomial() called on input ideal:\n"<<ideal;
8
+	gfan_log2 debug<<"containsMonomial() called on input ideal:\n"<<ideal;
9
 
10
 //	if(ideal.empty())return false;
11
 
(-)math/gfan/files/patch-src_tropical2.cpp (+88 lines)
Line 0 Link Here
1
--- src/tropical2.cpp.orig	2017-09-28 13:40:06 UTC
2
+++ src/tropical2.cpp
3
@@ -287,7 +287,7 @@ PolynomialSet initialForms(PolynomialSet const &groebn
4
 PolyhedralFan tropicalPrincipalIntersection(int n, PolynomialSet const &g, int linealitySpaceDimension)
5
 {
6
   //return tropicalHyperSurfaceIntersection(n, g);////////////////////////////////////////
7
-  log2 fprintf(Stderr,"Intersecting\n");
8
+  gfan_log2 fprintf(Stderr,"Intersecting\n");
9
   log3 AsciiPrinter(Stderr).printPolynomialSet(g);
10
 
11
   TimerScope ts(&tropicalPrincipalIntersectionTimer);
12
@@ -297,7 +297,7 @@ PolyhedralFan tropicalPrincipalIntersection(int n, Pol
13
     {
14
       ret=refinement(ret,PolyhedralFan::bergmanOfPrincipalIdeal(*i),linealitySpaceDimension,true);
15
     }
16
-  log2 fprintf(Stderr,"Done intersecting\n");
17
+  gfan_log2 fprintf(Stderr,"Done intersecting\n");
18
   return ret;
19
 }
20
 
21
@@ -308,12 +308,12 @@ static PolynomialSet checkList(IntegerVectorList const
22
   for(IntegerVectorList::const_iterator i=l.begin();i!=l.end();i++)
23
     {
24
       WeightReverseLexicographicTermOrder t(*i);
25
-      log2 fprintf(Stderr,"Computing Gr\"obner basis with respect to:");
26
-      log2 AsciiPrinter(Stderr).printVector(*i);
27
-      log2 fprintf(Stderr,"\n");
28
+      gfan_log2 fprintf(Stderr,"Computing Gr\"obner basis with respect to:");
29
+      gfan_log2 AsciiPrinter(Stderr).printVector(*i);
30
+      gfan_log2 fprintf(Stderr,"\n");
31
       PolynomialSet h2=groebnerBasis;
32
       buchberger(&h2,t);
33
-      log2 fprintf(Stderr,"Done computing Gr\"obner basis.\n");
34
+      gfan_log2 fprintf(Stderr,"Done computing Gr\"obner basis.\n");
35
 
36
       log3 AsciiPrinter(Stderr).printPolynomialSet(h2);
37
       PolynomialSet wall=initialFormsAssumeMarked(h2,*i);
38
@@ -459,14 +459,14 @@ PolynomialSet guessInitialIdealWithoutMonomial(Polynom
39
   #endif
40
 
41
   {
42
-    //log2
43
+    //gfan_log2
44
     fprintf(Stderr,"Computing extreme rays.\n");
45
     //IntegerVectorList a;
46
     PolyhedralCone p=coneFromMarkedBasis(groebnerBasis);
47
     //PolyhedralCone p=PolyhedralCone(wallInequalities(groebnerBasis),a);
48
     IntegerVectorList extreme=p.extremeRays();
49
-    log2 fprintf(Stderr,"Extreme rays of Groebner cone:\n");
50
-    log2 AsciiPrinter(Stderr).printVectorList(extreme);
51
+    gfan_log2 fprintf(Stderr,"Extreme rays of Groebner cone:\n");
52
+    gfan_log2 AsciiPrinter(Stderr).printVectorList(extreme);
53
 
54
     bool result;
55
     PolynomialSet r=checkList(extreme,groebnerBasis,fullNeighbourBasis,h,result, onlyCheckRays);
56
@@ -512,11 +512,11 @@ static PolynomialSet checkListStably(IntegerVectorList
57
   for(IntegerVectorList::const_iterator i=l.begin();i!=l.end();i++)
58
     {
59
       WeightReverseLexicographicTermOrder t(*i);
60
-      log2 fprintf(Stderr,"Taking initial forms with respect to:");
61
-      log2 AsciiPrinter(Stderr).printVector(*i);
62
-      log2 fprintf(Stderr,"\n");
63
+      gfan_log2 fprintf(Stderr,"Taking initial forms with respect to:");
64
+      gfan_log2 AsciiPrinter(Stderr).printVector(*i);
65
+      gfan_log2 fprintf(Stderr,"\n");
66
       PolynomialSet h2=groebnerBasis;
67
-      log2 fprintf(Stderr,"Done computing Gr\"obner basis.\n");
68
+      gfan_log2 fprintf(Stderr,"Done computing Gr\"obner basis.\n");
69
 
70
       log3 AsciiPrinter(Stderr).printPolynomialSet(h2);
71
       PolynomialSet wall=initialForms(h2,*i);
72
@@ -568,13 +568,13 @@ PolynomialSet guessInitialIdealWithoutMonomialStably(P
73
     }
74
 
75
   {
76
-    log2 fprintf(Stderr,"Computing extreme rays.\n");
77
+    gfan_log2 fprintf(Stderr,"Computing extreme rays.\n");
78
     //IntegerVectorList a;
79
     PolyhedralCone p=coneFromMarkedBasis(groebnerBasis);
80
     //PolyhedralCone p=PolyhedralCone(wallInequalities(groebnerBasis),a);
81
     IntegerVectorList extreme=p.extremeRays();
82
-    log2 fprintf(Stderr,"Extreme rays of Groebner cone:\n");
83
-    log2 AsciiPrinter(Stderr).printVectorList(extreme);
84
+    gfan_log2 fprintf(Stderr,"Extreme rays of Groebner cone:\n");
85
+    gfan_log2 AsciiPrinter(Stderr).printVectorList(extreme);
86
 
87
     bool result;
88
     PolynomialSet r=checkListStably(extreme,groebnerBasis,fullNeighbourBasis,h,result, onlyCheckRays);
(-)math/gfan/files/patch-src_tropical__weildivisor.cpp (+11 lines)
Line 0 Link Here
1
--- src/tropical_weildivisor.cpp.orig	2017-06-20 14:47:37 UTC
2
+++ src/tropical_weildivisor.cpp
3
@@ -53,7 +53,7 @@ PolyhedralFan weilDivisor(PolyhedralFan const &F, Poly
4
 
5
 	  AsciiPrinter P(Stderr);
6
 
7
-	  log2 P<<v<<v<<"\n";
8
+	  gfan_log2 P<<v<<v<<"\n";
9
 
10
 	  int multiplicity=0;
11
 	  IntegerVector evaluationVector(n);
(-)math/gfan/files/patch-src_tropicalbasis.cpp (+112 lines)
Line 0 Link Here
1
--- src/tropicalbasis.cpp.orig	2017-06-20 14:47:37 UTC
2
+++ src/tropicalbasis.cpp
3
@@ -118,10 +118,10 @@ PolynomialSet tropicalBasisOfCurve(int n, PolynomialSe
4
 	PolynomialSet originalG=g;
5
 //  bool prebasis=true;
6
 //  debug<<"PREBASIS="<<prebasis<<"\n";
7
-  log2 debug<<"TropicalBasis begin\n";
8
-	log2 debug<<g;
9
+  gfan_log2 debug<<"TropicalBasis begin\n";
10
+	gfan_log2 debug<<g;
11
 	int homog=linealitySpaceDimension;
12
-	log2 D(linealitySpaceDimension);
13
+	gfan_log2 D(linealitySpaceDimension);
14
   assert(homog>0 || n==0);
15
   TimerScope ts(&iterativeTropicalBasisTimer);
16
   PolyhedralFan f(n);
17
@@ -148,7 +148,7 @@ restart:
18
 
19
 	  if(containsNoMonomialCache.count(relativeInteriorPoint)>0)
20
 	    {
21
-	      log2 fprintf(Stderr,"Weight vector found in cache.... contains no monomial.\n");
22
+	      gfan_log2 fprintf(Stderr,"Weight vector found in cache.... contains no monomial.\n");
23
 	    }
24
 	  else
25
 	    {
26
@@ -163,9 +163,9 @@ restart:
27
 	            }
28
 	        }*/
29
 	      WeightReverseLexicographicTermOrder t(relativeInteriorPoint);
30
-	      log2 fprintf(Stderr,"Computing Gr\"obner basis with respect to:");
31
-	      log2 AsciiPrinter(Stderr).printVector(relativeInteriorPoint);
32
-	      log2 fprintf(Stderr,"\n");
33
+	      gfan_log2 fprintf(Stderr,"Computing Gr\"obner basis with respect to:");
34
+	      gfan_log2 AsciiPrinter(Stderr).printVector(relativeInteriorPoint);
35
+	      gfan_log2 fprintf(Stderr,"\n");
36
 	      PolynomialSet h2=originalG;//g;//<------------------- Using the original set here speeds up things a lot in the starting cone via stable intersections algorithm
37
   //            debug<<"g"<<g;
38
 
39
@@ -178,7 +178,7 @@ restart:
40
 	     // buchberger(&h2,t);
41
 	      h2=GE_groebnerBasis(h2,t,true/*autoreduce*/,true/*saturate*/);
42
         //      debug<<"h2"<<h2;
43
-	      log2 fprintf(Stderr,"Done computing Gr\"obner basis.\n");
44
+	      gfan_log2 fprintf(Stderr,"Done computing Gr\"obner basis.\n");
45
 
46
 	  //    debug<<h2;
47
 //	      log3 AsciiPrinter(Stderr).printPolynomialSet(h2);
48
@@ -187,17 +187,17 @@ restart:
49
 
50
 	      if(containsMonomial(wall))
51
 		{
52
-		  log2 fprintf(Stderr,"Initial ideal contains a monomial.\n");
53
+		  gfan_log2 fprintf(Stderr,"Initial ideal contains a monomial.\n");
54
 		  Polynomial m(computeTermInIdeal(wall));
55
-		  log2 fprintf(Stderr,"Done computing term in ideal\n");
56
+		  gfan_log2 fprintf(Stderr,"Done computing term in ideal\n");
57
 
58
 //		  Polynomial temp=m-division(m,h2,LexicographicTermOrder());
59
 		  Polynomial temp=m-division(m,h2,t);
60
 		  g.push_back(temp);
61
 
62
-		  log2 fprintf(Stderr,"Adding element to basis:\n");
63
-		  log2 AsciiPrinter(Stderr).printPolynomial(temp);
64
-		  log2 fprintf(Stderr,"\n");
65
+		  gfan_log2 fprintf(Stderr,"Adding element to basis:\n");
66
+		  gfan_log2 AsciiPrinter(Stderr).printPolynomial(temp);
67
+		  gfan_log2 fprintf(Stderr,"\n");
68
 
69
 		  *intersectionFan=refinement(*intersectionFan,PolyhedralFan::bergmanOfPrincipalIdeal(temp),linealitySpaceDimension,true);
70
 		  break;
71
@@ -207,7 +207,7 @@ restart:
72
 		  if(i->dimension()<=1+homog)
73
 		    //if(!containsMonomial(wall) && i->dimension()<=1+homog)//line for testing perturbation code
74
 		    {
75
-		      log2 fprintf(Stderr,"Initial ideal contains no monomial... caching weight vector.\n");
76
+		      gfan_log2 fprintf(Stderr,"Initial ideal contains no monomial... caching weight vector.\n");
77
 		      containsNoMonomialCache.insert(relativeInteriorPoint);
78
 		    }
79
 		  else
80
@@ -227,10 +227,10 @@ restart:
81
 		      dual.canonicalize();
82
 		      IntegerVectorList basis=dual.getEquations();
83
 		      PolynomialSet witnessLiftBasis=h2;//basis with respect to relativeInteriorPoint
84
-		      log2 debug<<"basis"<<basis<<"\n";
85
+		      gfan_log2 debug<<"basis"<<basis<<"\n";
86
 		      for(IntegerVectorList::const_iterator j=basis.begin();j!=basis.end();j++)
87
 			{
88
-			  log2 debug<<"wall"<<wall<<"\n";
89
+			  gfan_log2 debug<<"wall"<<wall<<"\n";
90
 			  WeightReverseLexicographicTermOrder t(*j);
91
 			  PolynomialSet h3=wall;
92
 //			  buchberger(&h3,t);
93
@@ -238,7 +238,7 @@ restart:
94
 			  wall=initialFormsAssumeMarked(h3,*j);
95
 			  witnessLiftBasis=liftBasis(h3,witnessLiftBasis);
96
 			}
97
-                      log2 debug<<"wall"<<wall<<"\n";
98
+                      gfan_log2 debug<<"wall"<<wall<<"\n";
99
 		      if(containsMonomial(wall))
100
 			{
101
 			  Polynomial m(computeTermInIdeal(wall));
102
@@ -259,8 +259,8 @@ restart:
103
       if(i==intersectionFan->conesEnd())break;
104
     }
105
 
106
-  log2 debug<<"TropicalBasis end\n";
107
-  log2 cerr <<"RETURNING";
108
+  gfan_log2 debug<<"TropicalBasis end\n";
109
+  gfan_log2 cerr <<"RETURNING";
110
   return g;
111
 }
112
 
(-)math/gfan/files/patch-src_tropicalcurve.cpp (+188 lines)
Line 0 Link Here
1
--- src/tropicalcurve.cpp.orig	2017-06-20 14:47:37 UTC
2
+++ src/tropicalcurve.cpp
3
@@ -48,7 +48,7 @@ IntegerVectorList tropicalCurve(PolynomialSet const &I
4
 	int stat_isInTropicalVariety=0;
5
 	int stat_finiteLiftEasy=0;
6
 	int stat_finiteLiftHard=0;
7
-	log2 debug<<"tropicalCurve on:"<<I.getRing()<<I<<"\n";
8
+	gfan_log2 debug<<"tropicalCurve on:"<<I.getRing()<<I<<"\n";
9
 
10
 
11
 
12
@@ -76,8 +76,8 @@ IntegerVectorList tropicalCurve(PolynomialSet const &I
13
 //#if 0
14
 //	for(i=0;i<n;i++)
15
 	{
16
-		log2 debug<<"Doing elimination\n";
17
-		log2 debug<<I<<"\n";
18
+		gfan_log2 debug<<"Doing elimination\n";
19
+		gfan_log2 debug<<I<<"\n";
20
 		list<int> chosenVariables;
21
 		for(int j=0;j<n;j++)if(j!=i)chosenVariables.push_back(j);
22
 
23
@@ -105,7 +105,7 @@ IntegerVectorList tropicalCurve(PolynomialSet const &I
24
 #endif
25
 
26
 
27
-		log2 debug<<"Done doing elimination\n";
28
+		gfan_log2 debug<<"Done doing elimination\n";
29
 //		break;
30
 		/*
31
 		 * At this point we need to be careful with whether we are projecting in the torus or in affine space
32
@@ -148,14 +148,14 @@ IntegerVectorList tropicalCurve(PolynomialSet const &I
33
 	for(int s=-1;s<=1;s+=2)
34
 	{
35
 		IntegerVector v=s*IntegerVector::standardVector(n,i);
36
-		log2 debug<<"Tropical variety membership test of ray:"<<v<<"\n";
37
+		gfan_log2 debug<<"Tropical variety membership test of ray:"<<v<<"\n";
38
 		stat_isInTropicalVariety++;
39
 		if(isInTropicalVariety(I,v,false))
40
 		{
41
 			ret.push_back(s*IntegerVector::standardVector(n,i));
42
 			if(earlyExit)return ret;
43
 		}
44
-		log2 debug<<"Done membership test.\n";
45
+		gfan_log2 debug<<"Done membership test.\n";
46
 	}
47
 
48
 	IntegerVectorList lowerDimList=tropicalCurve(J2,earlyExit);
49
@@ -175,7 +175,7 @@ IntegerVectorList tropicalCurve(PolynomialSet const &I
50
 
51
 	for(IntegerVectorList::const_iterator k=lowerDimList.begin();k!=lowerDimList.end();k++)
52
 	{
53
-		log2 debug<<"Doing polyhedral computations1\n";
54
+		gfan_log2 debug<<"Doing polyhedral computations1\n";
55
 #if 1
56
 		IntegerVectorList generators;generators.push_back((concatenation(IntegerVector(1),*k)));
57
 		IntegerVectorList lin;lin.push_back((IntegerVector::standardVector(n,i)));
58
@@ -267,9 +267,9 @@ IntegerVectorList tropicalCurve(PolynomialSet const &I
59
 			}
60
 		}*/
61
 
62
-		log2 debug<<"Done with polyhedral computations\n";
63
+		gfan_log2 debug<<"Done with polyhedral computations\n";
64
 
65
-		log2 debug<<"Intersection fan dim "<<fanDim<<"\n";
66
+		gfan_log2 debug<<"Intersection fan dim "<<fanDim<<"\n";
67
 
68
 		assert(fanDim!=0);
69
 		if(fanDim==1)
70
@@ -281,7 +281,7 @@ IntegerVectorList tropicalCurve(PolynomialSet const &I
71
 				if(!j->subvector(1,n).isZero())
72
 					candidates.push_back(*j);
73
 
74
-			log2 debug<<"Number of candidates "<<(int)candidates.size()<<"\n";
75
+			gfan_log2 debug<<"Number of candidates "<<(int)candidates.size()<<"\n";
76
 
77
 			if(candidates.size()==1)
78
 			{
79
@@ -303,8 +303,8 @@ IntegerVectorList tropicalCurve(PolynomialSet const &I
80
 
81
 
82
 
83
-	log2 debug<<"Checking complicated list:\n";
84
-	log2 debug<<complicatedList<<"\n";
85
+	gfan_log2 debug<<"Checking complicated list:\n";
86
+	gfan_log2 debug<<complicatedList<<"\n";
87
 
88
 	PolynomialSet additionalPolys=I.getRing();
89
 
90
@@ -314,7 +314,7 @@ IntegerVectorList tropicalCurve(PolynomialSet const &I
91
 		for(IntegerVectorList::const_iterator k=complicatedList.begin();k!=complicatedList.end();k++)
92
 			supportSum+=k->supportAsZeroOneVector();
93
 
94
-		log2 debug<<"Support sum:"<<supportSum<<"\n";
95
+		gfan_log2 debug<<"Support sum:"<<supportSum<<"\n";
96
 		int j=supportSum.argMax();
97
 
98
 
99
@@ -341,18 +341,18 @@ IntegerVectorList tropicalCurve(PolynomialSet const &I
100
 
101
 		PolynomialRing newRing3=I.getRing().withVariablesAppended("H");
102
 		PolynomialSet J=I.homogenization(newRing3);
103
-		log2 debug<<"Doing elimination\n";
104
+		gfan_log2 debug<<"Doing elimination\n";
105
 		buchberger(&J,T,true);
106
 		J.changeNumberOfVariables(I.getRing());
107
 		PolynomialRing newRing2(newRing.getField(),2);
108
 		PolynomialSet P=J.polynomialRingIntersection(newRing2,&chosenVariables);
109
 #endif
110
 		additionalPolys.splice(additionalPolys.end(),J);
111
-		log2 debug<<"Done eliminating\n";
112
-		log2 debug<<P<<"\n";
113
+		gfan_log2 debug<<"Done eliminating\n";
114
+		gfan_log2 debug<<P<<"\n";
115
 		assert(P.size()==1);
116
 
117
-		log2 debug<<"Doing polyhedral computation\n";
118
+		gfan_log2 debug<<"Doing polyhedral computation\n";
119
 		//		debug<<"PFRONT:"<<P.front()<<P.front().exponents()<<"\n";
120
 				//		PolyhedralFan FF=PolyhedralFan::normalFanOfNewtonPolytope(P.front());
121
 		PolyhedralFan FF=PolyhedralFan::bergmanOfPrincipalIdeal(P.front());
122
@@ -372,14 +372,14 @@ IntegerVectorList tropicalCurve(PolynomialSet const &I
123
 			F=FF.getRays();
124
 		}
125
 
126
-		log2 debug<<"Potential lifts"<<F<<"\n";
127
+		gfan_log2 debug<<"Potential lifts"<<F<<"\n";
128
 
129
 
130
 		for(IntegerVectorList::iterator k=complicatedList.begin();k!=complicatedList.end();)
131
 			if((*k)[j]!=0)
132
 		{
133
 	//		debug<<I.getRing()<<"\n"<<I;
134
-			log2 debug<<"Checking:"<<*k<<" with chosen coordinate:"<<j<<"\n";
135
+			gfan_log2 debug<<"Checking:"<<*k<<" with chosen coordinate:"<<j<<"\n";
136
 			assert(j!=n);
137
 
138
 			IntegerVectorList preCheck;
139
@@ -396,7 +396,7 @@ IntegerVectorList tropicalCurve(PolynomialSet const &I
140
 					IntegerVector v=s1*concatenation(concatenation(k->subvector(0,i),IntegerVector(1)),k->subvector(i,n-1))+s2*(*l)[0]*IntegerVector::standardVector(n,i);
141
 					preCheck.push_back(v);
142
 				}
143
-			log2 debug<<"Combined:\n"<<preCheck<<"\n";
144
+			gfan_log2 debug<<"Combined:\n"<<preCheck<<"\n";
145
 
146
 			IntegerVectorList preCheck2;
147
 			for(IntegerVectorList::const_iterator i=preCheck.begin();i!=preCheck.end();i++)
148
@@ -406,7 +406,7 @@ IntegerVectorList tropicalCurve(PolynomialSet const &I
149
 					preCheck2.push_back(*i);
150
 			}
151
 
152
-			log2 debug<<"Combined2:\n"<<preCheck2<<"\n";
153
+			gfan_log2 debug<<"Combined2:\n"<<preCheck2<<"\n";
154
 			if(preCheck2.size()==1)
155
 				ret.splice(ret.end(),preCheck2);
156
 			else
157
@@ -503,7 +503,7 @@ IntegerVectorList tropicalCurve(PolynomialSet const &I
158
 #endif
159
 
160
 
161
-	log2 debug<<"OldtoCheck:"<<toCheck;
162
+	gfan_log2 debug<<"OldtoCheck:"<<toCheck;
163
 	{
164
 		IntegerVectorList toCheck2;
165
 		for(IntegerVectorList::const_iterator i=toCheck.begin();i!=toCheck.end();i++)
166
@@ -516,10 +516,10 @@ IntegerVectorList tropicalCurve(PolynomialSet const &I
167
 	}
168
 
169
 
170
-	log2 debug<<"Checking to check list\n";
171
+	gfan_log2 debug<<"Checking to check list\n";
172
 
173
-	log2 debug<<"Already produced:"<<ret;
174
-	log2 debug<<"toCheck:"<<toCheck;
175
+	gfan_log2 debug<<"Already produced:"<<ret;
176
+	gfan_log2 debug<<"toCheck:"<<toCheck;
177
 
178
 	for(IntegerVectorList::const_iterator i=toCheck.begin();i!=toCheck.end();i++)
179
 	{
180
@@ -542,7 +542,7 @@ IntegerVectorList tropicalCurve(PolynomialSet const &I
181
 		debug<<"*k"<<*k<<"\n";
182
 		//FF.printWithIndices(&debug);
183
 */
184
-	log2
185
+	gfan_log2
186
 	{
187
 		debug<<"At dimension "<<n<<"\n";
188
 		debug<<"To Check\n"<<toCheck;
(-)math/gfan/files/patch-src_tropicaltraverse.cpp (+56 lines)
Line 0 Link Here
1
--- src/tropicaltraverse.cpp.orig	2017-06-20 14:47:37 UTC
2
+++ src/tropicaltraverse.cpp
3
@@ -199,7 +199,7 @@ static void printMarkedTermIdeal(PolynomialSet const &
4
 static void changeCone(PolynomialSet &coneGroebnerBasis, PolynomialSet &idealGroebnerBasis, IntegerVector const &ridgeVector, IntegerVector const &rayVector)
5
 {
6
   assert(idealGroebnerBasis.containsInClosedGroebnerCone(ridgeVector));
7
-  log2 cerr<<endl<<"Changing cone"<<endl;
8
+  gfan_log2 cerr<<endl<<"Changing cone"<<endl;
9
 
10
   assert(!containsMonomial(coneGroebnerBasis));
11
 
12
@@ -213,7 +213,7 @@ static void changeCone(PolynomialSet &coneGroebnerBasi
13
   WeightReverseLexicographicTermOrder T(rayVector);
14
 
15
   //  P<<ridgeIdeal;
16
-  log2 cerr<<"Computing initial Groebner basis"<<endl;
17
+  gfan_log2 cerr<<"Computing initial Groebner basis"<<endl;
18
   //  buchberger(&ridgeIdeal,T);
19
 
20
   ridgeIdeal=GE_groebnerBasis(ridgeIdeal,T,true,false);//Set to true?
21
@@ -224,7 +224,7 @@ static void changeCone(PolynomialSet &coneGroebnerBasi
22
   //  WeightTermOrder termOrder(termorderWeight(ridgeIdeal));
23
   WeightTermOrder termOrder(termorderWeight(ridgeIdealOld));
24
 
25
-  log2 cerr<<"Lifting"<<endl;
26
+  gfan_log2 cerr<<"Lifting"<<endl;
27
   PolynomialSet temp=ridgeIdealOld;
28
   temp.markAndScale(T);
29
   temp=temp.markedTermIdeal();
30
@@ -244,7 +244,7 @@ static void changeCone(PolynomialSet &coneGroebnerBasi
31
     }
32
   assert(g2.isMarked());
33
   //printMarkedTermIdeal(g2,"g2");
34
-  log2 cerr<<"Autoreducing"<<endl;
35
+  gfan_log2 cerr<<"Autoreducing"<<endl;
36
 
37
   //  autoReduce(&g2,LexicographicTermOrder());
38
   //PolynomialSet g2Old=g2;
39
@@ -260,7 +260,7 @@ static void changeCone(PolynomialSet &coneGroebnerBasi
40
   assert(idealGroebnerBasis.size()==oldSize);
41
   //  idealGroebnerBasis=g2;
42
   assert(!containsMonomial(coneGroebnerBasis));
43
-  log2 cerr<<"Done changing cone"<<endl<<endl;
44
+  gfan_log2 cerr<<"Done changing cone"<<endl<<endl;
45
 
46
   //  P<<coneGroebnerBasis;
47
   //  P<<idealGroebnerBasis;
48
@@ -279,7 +279,7 @@ static void changeCone(PolynomialSet &coneGroebnerBasi
49
     P<<coneGroebnerBasis;
50
     }*/
51
 
52
-  log2 cerr << "Number of terms in new basis: "<< g2.totalNumberOfTerms()<<endl;
53
+  gfan_log2 cerr << "Number of terms in new basis: "<< g2.totalNumberOfTerms()<<endl;
54
 }
55
 
56
 void printStack(list<pathStepFacet> const &facetStack, list<pathStepRidge> const &ridgeStack)
(-)math/gfan/files/patch-src_wallideal.cpp (+11 lines)
Line 0 Link Here
1
--- src/wallideal.cpp.orig	2017-06-20 14:47:37 UTC
2
+++ src/wallideal.cpp
3
@@ -1055,7 +1055,7 @@ IntegerVectorList fastNormals(IntegerVectorList const 
4
   //  log0 fprintf(Stderr,"Number of inequalities:%i\n",normals.size());
5
 
6
   //  log0 fprintf(Stderr,"G");
7
-  //log2 cerr << "Fast normals end" << endl;
8
+  //gfan_log2 cerr << "Fast normals end" << endl;
9
   return normals;
10
 }
11
 
(-)math/gfan/pkg-descr (-15 / +2 lines)
Lines 1-17 Link Here
1
Gfan is a software package for computing Groebner fans and tropical
1
Gfan is a software package for computing Groebner fans and tropical
2
varieties. These are polyhedral fans associated to polynomial ideals.
2
varieties.
3
The maximal cones of a Groebner fan are in bijection with the marked
4
reduced Groebner bases of its defining ideal. The software computes
5
all marked reduced Groebner bases of an ideal. Their union is a
6
universal Greobner basis. The tropical variety of a polynomial ideal
7
is a certain subcomplex of the Groebner fan. Gfan contains algorithms
8
for computing this complex for general ideals and specialized
9
algorithms for tropical curves, tropical hypersurfaces and tropical
10
varieties of prime ideals.  In addition to the above core functions
11
the package contains many tools which are useful in the study of
12
Groebner bases, initial ideals and tropical geometry.
13
3
14
This port provides gfan together with some handy symlinks. The static
4
WWW: https://users-math.au.dk/jensen/software/gfan/gfan.html
15
library libgfan.a is provided by the port math/gfanlib.
16
17
WWW: http://home.math.au.dk/jensen/software/gfan/gfan.html
(-)math/gfan/pkg-message (-16 lines)
Lines 1-16 Link Here
1
[
2
{ type: install
3
  message: <<EOM
4
Gfan can also be linked to Sage, Singular or Soplex. I refrain to
5
include those optional dependencies because Sage and Singular support
6
is not documented in gfan's manual and Soplex has a very restrictive
7
license (you can use or distribute it only if you are a member of a
8
noncommercial and academic institution).
9
10
If you feel you need any of those optional dependencies, please let
11
me know and I will do my best to provide it as fast as possible.
12
13
The mantainer.
14
EOM
15
}
16
]
(-)math/gfan/pkg-plist (-37 / +37 lines)
Lines 1-3 Link Here
1
%%PORTDOCS%%%%DOCSDIR%%/gfan.eps
2
%%PORTDOCS%%%%DOCSDIR%%/manual.dvi
3
%%PORTDOCS%%%%DOCSDIR%%/nonconst.eps
4
%%PORTDOCS%%%%DOCSDIR%%/polyformat.eps
5
%%PORTDOCS%%%%DOCSDIR%%/staircase.eps
6
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/2x2of2x3
7
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/2x2of2x4
8
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/2x2of3x3
9
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/2x2of4x4
10
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/3x3of3x4
11
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/3x3of3x5
12
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/3x3of3x5.cone
13
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/3x3of4x4
14
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/3x3of4x4sym.cone
15
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/4x4of4x5
16
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/4x4of5x5
17
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/6x6-subPfaffians
18
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/commat2x2
19
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/commat2x2.cone
20
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cyclic4
21
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cyclic5
22
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/examplePaper
23
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/grassmann2_5
24
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/grassmann2_5.cone
25
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/grassmann2_6
26
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/grassmann2_6.cone
27
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/grassmann3_6
28
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/grassmann3_6.cone
29
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/hankel3x3of4x4
30
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/hankel3x3of4x4.cone
31
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/hankel3x3of4x5
32
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/hankel3x3of4x5.cone
33
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/linhyper5_2
34
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/linhyper5_2.cone
35
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/pablo
36
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/sturmfels3.9
37
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/symmetryTest
1
bin/gfan
38
bin/gfan
2
bin/gfan_bases
39
bin/gfan_bases
3
bin/gfan_buchberger
40
bin/gfan_buchberger
Lines 53-92 Link Here
53
bin/gfan_tropicaltraverse
90
bin/gfan_tropicaltraverse
54
bin/gfan_tropicalweildivisor
91
bin/gfan_tropicalweildivisor
55
bin/gfan_version
92
bin/gfan_version
56
%%PORTDOCS%%%%DOCSDIR%%/manual.dvi
57
%%PORTDOCS%%%%DOCSDIR%%/gfan.eps
58
%%PORTDOCS%%%%DOCSDIR%%/nonconst.eps
59
%%PORTDOCS%%%%DOCSDIR%%/polyformat.eps
60
%%PORTDOCS%%%%DOCSDIR%%/staircase.eps
61
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/2x2of2x3
62
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/2x2of2x4
63
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/2x2of3x3
64
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/2x2of4x4
65
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/3x3of3x4
66
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/3x3of3x5
67
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/3x3of3x5.cone
68
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/3x3of4x4
69
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/3x3of4x4sym.cone
70
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/4x4of4x5
71
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/4x4of5x5
72
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/6x6-subPfaffians
73
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/commat2x2
74
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/commat2x2.cone
75
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cyclic4
76
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cyclic5
77
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/examplePaper
78
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/grassmann2_5
79
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/grassmann2_5.cone
80
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/grassmann2_6
81
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/grassmann2_6.cone
82
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/grassmann3_6
83
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/grassmann3_6.cone
84
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/hankel3x3of4x4
85
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/hankel3x3of4x4.cone
86
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/hankel3x3of4x5
87
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/hankel3x3of4x5.cone
88
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/linhyper5_2
89
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/linhyper5_2.cone
90
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/pablo
91
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/sturmfels3.9
92
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/symmetryTest

Return to bug 250879