# HG changeset patch # User alpar # Date 1111405573 0 # Node ID 49d018060749899b71e6a09d8655398ba89d480e # Parent f3d856bf1ebfd5675df27731b6975a264b78b575 Several changes in order to compile with gcc-3.4 diff -r f3d856bf1ebf -r 49d018060749 src/lemon/graph_to_eps.h --- a/src/lemon/graph_to_eps.h Mon Mar 21 11:40:08 2005 +0000 +++ b/src/lemon/graph_to_eps.h Mon Mar 21 11:46:13 2005 +0000 @@ -26,6 +26,7 @@ #include #include +#include #include #include #include @@ -191,11 +192,6 @@ ConstMap _edgeWidths; - static const double A4HEIGHT = 841.8897637795276; - static const double A4WIDTH = 595.275590551181; - static const double A4BORDER = 15; - - double _edgeWidthScale; double _nodeScale; @@ -271,6 +267,58 @@ /// - A second color and percent value for the lines. template class GraphToEps : public T { + // Can't believe it is required by the C++ standard + using T::g; + using T::os; + + using T::_coords; + using T::_nodeSizes; + using T::_nodeShapes; + using T::_nodeColors; + using T::_edgeColors; + using T::_edgeWidths; + + using T::_edgeWidthScale; + using T::_nodeScale; + using T::_xBorder; + using T::_yBorder; + using T::_scale; + using T::_nodeBorderQuotient; + + using T::_drawArrows; + using T::_arrowLength; + using T::_arrowWidth; + + using T::_showNodes; + using T::_showEdges; + + using T::_enableParallel; + using T::_parEdgeDist; + + using T::_showNodeText; + using T::_nodeTexts; + using T::_nodeTextSize; + + using T::_showNodePsText; + using T::_nodePsTexts; + using T::_nodePsTextsPreamble; + + using T::_undir; + using T::_pleaseRemoveOsStream; + + using T::_scaleToA4; + + using T::_title; + using T::_copyright; + + using T::NodeTextColorType; + using T::CUST_COL; + using T::DIST_COL; + using T::DIST_BW; + using T::_nodeTextColorType; + using T::_nodeTextColors; + // dradnats ++C eht yb deriuqer si ti eveileb t'naC + typedef typename T::Graph Graph; typedef typename Graph::Node Node; typedef typename Graph::NodeIt NodeIt; @@ -280,6 +328,9 @@ typedef typename Graph::OutEdgeIt OutEdgeIt; static const int INTERPOL_PREC=20; + static const double A4HEIGHT = 841.8897637795276; + static const double A4WIDTH = 595.275590551181; + static const double A4BORDER = 15; bool dontPrint; @@ -323,8 +374,10 @@ }; bool isParallel(Edge e,Edge f) const { - return (g.source(e)==g.source(f)&&g.target(e)==g.target(f))|| - (g.source(e)==g.target(f)&&g.target(e)==g.source(f)); + return (g.source(e)==g.source(f)&& + g.target(e)==g.target(f)) || + (g.source(e)==g.target(f)&& + g.target(e)==g.source(f)); } template static std::string psOut(const xy &p) @@ -583,7 +636,7 @@ /// ///\sa nodePsTexts() GraphToEps & nodePsTextsPreamble(const char *str) { - _nodePsTextsPreamble=s ;return *this; + _nodePsTextsPreamble=str ;return *this; } ///Sets whether the the graph is undirected diff -r f3d856bf1ebf -r 49d018060749 src/lemon/max_matching.h --- a/src/lemon/max_matching.h Mon Mar 21 11:40:08 2005 +0000 +++ b/src/lemon/max_matching.h Mon Mar 21 11:46:13 2005 +0000 @@ -262,16 +262,17 @@ void lateShrink(Node v, typename Graph::template NodeMap& ear, UFE& blossom, UFE& tree); - void normShrink(Node v, typename Graph::NodeMap& ear, + void normShrink(Node v, typename Graph::template NodeMap& ear, UFE& blossom, UFE& tree); - bool noShrinkStep(Node x, typename Graph::NodeMap& ear, + bool noShrinkStep(Node x, typename Graph::template NodeMap& ear, UFE& blossom, UFE& tree, std::queue& Q); - void shrinkStep(Node& top, Node& middle, Node& bottom, typename Graph::NodeMap& ear, + void shrinkStep(Node& top, Node& middle, Node& bottom, + typename Graph::template NodeMap& ear, UFE& blossom, UFE& tree, std::queue& Q); - void augment(Node x, typename Graph::NodeMap& ear, + void augment(Node x, typename Graph::template NodeMap& ear, UFE& blossom, UFE& tree); }; @@ -386,9 +387,10 @@ template - void MaxMatching::normShrink(Node v, typename Graph::NodeMap& ear, + void MaxMatching::normShrink(Node v, + typename Graph::template + NodeMap& ear, UFE& blossom, UFE& tree) { - std::queue Q; //queue of the unscanned nodes Q.push(v); while ( !Q.empty() ) { @@ -490,8 +492,11 @@ } template - bool MaxMatching::noShrinkStep(Node x, typename Graph::NodeMap& ear, - UFE& blossom, UFE& tree, std::queue& Q) { + bool MaxMatching::noShrinkStep(Node x, + typename Graph::template + NodeMap& ear, + UFE& blossom, UFE& tree, + std::queue& Q) { for( IncEdgeIt e(g,x); e!= INVALID; ++e ) { Node y=g.runningNode(e); @@ -519,8 +524,11 @@ } template - void MaxMatching::shrinkStep(Node& top, Node& middle, Node& bottom, typename Graph::NodeMap& ear, - UFE& blossom, UFE& tree, std::queue& Q) { + void MaxMatching::shrinkStep(Node& top, Node& middle, Node& bottom, + typename Graph::template + NodeMap& ear, + UFE& blossom, UFE& tree, + std::queue& Q) { ear.set(top,bottom); Node t=top; while ( t!=middle ) { @@ -542,7 +550,8 @@ } template - void MaxMatching::augment(Node x, typename Graph::NodeMap& ear, + void MaxMatching::augment(Node x, + typename Graph::template NodeMap& ear, UFE& blossom, UFE& tree) { Node v=_mate[x]; while ( v!=INVALID ) {