Changeset 2453:2800d9efb01d in lemon-0.x
- Timestamp:
- 06/07/07 22:07:29 (17 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@3290
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/lgf-gen.cc
r2448 r2453 282 282 std::set<std::pair<int, int> > edges; 283 283 284 beach.insert(std::make_pair(Part(-1, siteheap[0].second, -1), 285 spikeheap.end())); 286 int siteindex = 1; 284 int siteindex = 0; 285 { 286 SiteHeap front; 287 288 while (siteindex < int(siteheap.size()) && 289 siteheap[0].first == siteheap[siteindex].first) { 290 front.push_back(std::make_pair(points[siteheap[siteindex].second].y, 291 siteheap[siteindex].second)); 292 ++siteindex; 293 } 294 295 std::sort(front.begin(), front.end()); 296 297 for (int i = 0; i < int(front.size()); ++i) { 298 int prev = (i == 0 ? -1 : front[i - 1].second); 299 int curr = front[i].second; 300 int next = (i + 1 == int(front.size()) ? -1 : front[i + 1].second); 301 302 beach.insert(std::make_pair(Part(prev, curr, next), 303 spikeheap.end())); 304 } 305 } 287 306 288 307 while (siteindex < int(points.size()) || !spikeheap.empty()) { … … 785 804 786 805 if(ap["eps"]) 787 graphToEps(g,prefix+".eps"). 806 graphToEps(g,prefix+".eps").scaleToA4(). 788 807 scale(600).nodeScale(.2).edgeWidthScale(.001).preScale(false). 789 808 coords(coords).run();
Note: See TracChangeset
for help on using the changeset viewer.