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 |
|