Changeset 1234:49d018060749 in lemon-0.x
- Timestamp:
- 03/21/05 12:46:13 (20 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1661
- Location:
- src/lemon
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/lemon/graph_to_eps.h
r1202 r1234 27 27 #include<vector> 28 28 29 #include<lemon/invalid.h> 29 30 #include<lemon/xy.h> 30 31 #include<lemon/maps.h> … … 192 193 ConstMap<typename Graph::Edge,double > _edgeWidths; 193 194 194 static const double A4HEIGHT = 841.8897637795276;195 static const double A4WIDTH = 595.275590551181;196 static const double A4BORDER = 15;197 198 199 195 double _edgeWidthScale; 200 196 … … 272 268 template<class T> class GraphToEps : public T 273 269 { 270 // Can't believe it is required by the C++ standard 271 using T::g; 272 using T::os; 273 274 using T::_coords; 275 using T::_nodeSizes; 276 using T::_nodeShapes; 277 using T::_nodeColors; 278 using T::_edgeColors; 279 using T::_edgeWidths; 280 281 using T::_edgeWidthScale; 282 using T::_nodeScale; 283 using T::_xBorder; 284 using T::_yBorder; 285 using T::_scale; 286 using T::_nodeBorderQuotient; 287 288 using T::_drawArrows; 289 using T::_arrowLength; 290 using T::_arrowWidth; 291 292 using T::_showNodes; 293 using T::_showEdges; 294 295 using T::_enableParallel; 296 using T::_parEdgeDist; 297 298 using T::_showNodeText; 299 using T::_nodeTexts; 300 using T::_nodeTextSize; 301 302 using T::_showNodePsText; 303 using T::_nodePsTexts; 304 using T::_nodePsTextsPreamble; 305 306 using T::_undir; 307 using T::_pleaseRemoveOsStream; 308 309 using T::_scaleToA4; 310 311 using T::_title; 312 using T::_copyright; 313 314 using T::NodeTextColorType; 315 using T::CUST_COL; 316 using T::DIST_COL; 317 using T::DIST_BW; 318 using T::_nodeTextColorType; 319 using T::_nodeTextColors; 320 // dradnats ++C eht yb deriuqer si ti eveileb t'naC 321 274 322 typedef typename T::Graph Graph; 275 323 typedef typename Graph::Node Node; … … 281 329 282 330 static const int INTERPOL_PREC=20; 331 static const double A4HEIGHT = 841.8897637795276; 332 static const double A4WIDTH = 595.275590551181; 333 static const double A4BORDER = 15; 283 334 284 335 bool dontPrint; … … 324 375 bool isParallel(Edge e,Edge f) const 325 376 { 326 return (g.source(e)==g.source(f)&&g.target(e)==g.target(f))|| 327 (g.source(e)==g.target(f)&&g.target(e)==g.source(f)); 377 return (g.source(e)==g.source(f)&& 378 g.target(e)==g.target(f)) || 379 (g.source(e)==g.target(f)&& 380 g.target(e)==g.source(f)); 328 381 } 329 382 template<class TT> … … 584 637 ///\sa nodePsTexts() 585 638 GraphToEps<T> & nodePsTextsPreamble(const char *str) { 586 _nodePsTextsPreamble=s ;return *this;639 _nodePsTextsPreamble=str ;return *this; 587 640 } 588 641 ///Sets whether the the graph is undirected -
src/lemon/max_matching.h
r1177 r1234 263 263 UFE& blossom, UFE& tree); 264 264 265 void normShrink(Node v, typename Graph:: NodeMap<Node>& ear,265 void normShrink(Node v, typename Graph::template NodeMap<Node>& ear, 266 266 UFE& blossom, UFE& tree); 267 267 268 bool noShrinkStep(Node x, typename Graph:: NodeMap<Node>& ear,268 bool noShrinkStep(Node x, typename Graph::template NodeMap<Node>& ear, 269 269 UFE& blossom, UFE& tree, std::queue<Node>& Q); 270 270 271 void shrinkStep(Node& top, Node& middle, Node& bottom, typename Graph::NodeMap<Node>& ear, 271 void shrinkStep(Node& top, Node& middle, Node& bottom, 272 typename Graph::template NodeMap<Node>& ear, 272 273 UFE& blossom, UFE& tree, std::queue<Node>& Q); 273 274 274 void augment(Node x, typename Graph:: NodeMap<Node>& ear,275 void augment(Node x, typename Graph::template NodeMap<Node>& ear, 275 276 UFE& blossom, UFE& tree); 276 277 … … 387 388 388 389 template <typename Graph> 389 void MaxMatching<Graph>::normShrink(Node v, typename Graph::NodeMap<Node>& ear, 390 void MaxMatching<Graph>::normShrink(Node v, 391 typename Graph::template 392 NodeMap<Node>& ear, 390 393 UFE& blossom, UFE& tree) { 391 392 394 std::queue<Node> Q; //queue of the unscanned nodes 393 395 Q.push(v); … … 491 493 492 494 template <typename Graph> 493 bool MaxMatching<Graph>::noShrinkStep(Node x, typename Graph::NodeMap<Node>& ear, 494 UFE& blossom, UFE& tree, std::queue<Node>& Q) { 495 bool MaxMatching<Graph>::noShrinkStep(Node x, 496 typename Graph::template 497 NodeMap<Node>& ear, 498 UFE& blossom, UFE& tree, 499 std::queue<Node>& Q) { 495 500 for( IncEdgeIt e(g,x); e!= INVALID; ++e ) { 496 501 Node y=g.runningNode(e); … … 520 525 521 526 template <typename Graph> 522 void MaxMatching<Graph>::shrinkStep(Node& top, Node& middle, Node& bottom, typename Graph::NodeMap<Node>& ear, 523 UFE& blossom, UFE& tree, std::queue<Node>& Q) { 527 void MaxMatching<Graph>::shrinkStep(Node& top, Node& middle, Node& bottom, 528 typename Graph::template 529 NodeMap<Node>& ear, 530 UFE& blossom, UFE& tree, 531 std::queue<Node>& Q) { 524 532 ear.set(top,bottom); 525 533 Node t=top; … … 543 551 544 552 template <typename Graph> 545 void MaxMatching<Graph>::augment(Node x, typename Graph::NodeMap<Node>& ear, 553 void MaxMatching<Graph>::augment(Node x, 554 typename Graph::template NodeMap<Node>& ear, 546 555 UFE& blossom, UFE& tree) { 547 556 Node v=_mate[x];
Note: See TracChangeset
for help on using the changeset viewer.