COIN-OR::LEMON - Graph Library

Changeset 1234:49d018060749 in lemon-0.x for src/lemon


Ignore:
Timestamp:
03/21/05 12:46:13 (19 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1661
Message:

Several changes in order to compile with gcc-3.4

Location:
src/lemon
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/lemon/graph_to_eps.h

    r1202 r1234  
    2727#include<vector>
    2828
     29#include<lemon/invalid.h>
    2930#include<lemon/xy.h>
    3031#include<lemon/maps.h>
     
    192193  ConstMap<typename Graph::Edge,double > _edgeWidths;
    193194
    194   static const double A4HEIGHT = 841.8897637795276;
    195   static const double A4WIDTH  = 595.275590551181;
    196   static const double A4BORDER = 15;
    197 
    198  
    199195  double _edgeWidthScale;
    200196 
     
    272268template<class T> class GraphToEps : public T
    273269{
     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
    274322  typedef typename T::Graph Graph;
    275323  typedef typename Graph::Node Node;
     
    281329
    282330  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;
    283334
    284335  bool dontPrint;
     
    324375  bool isParallel(Edge e,Edge f) const
    325376  {
    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));
    328381  }
    329382  template<class TT>
     
    584637  ///\sa nodePsTexts()
    585638  GraphToEps<T> & nodePsTextsPreamble(const char *str) {
    586     _nodePsTextsPreamble=s ;return *this;
     639    _nodePsTextsPreamble=str ;return *this;
    587640  }
    588641  ///Sets whether the the graph is undirected
  • src/lemon/max_matching.h

    r1177 r1234  
    263263                    UFE& blossom, UFE& tree);
    264264
    265     void normShrink(Node v, typename Graph::NodeMap<Node>& ear, 
     265    void normShrink(Node v, typename Graph::template NodeMap<Node>& ear, 
    266266                    UFE& blossom, UFE& tree);
    267267
    268     bool noShrinkStep(Node x, typename Graph::NodeMap<Node>& ear, 
     268    bool noShrinkStep(Node x, typename Graph::template NodeMap<Node>& ear, 
    269269                      UFE& blossom, UFE& tree, std::queue<Node>& Q);
    270270
    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, 
    272273                    UFE& blossom, UFE& tree, std::queue<Node>& Q);
    273274
    274     void augment(Node x, typename Graph::NodeMap<Node>& ear, 
     275    void augment(Node x, typename Graph::template NodeMap<Node>& ear, 
    275276                 UFE& blossom, UFE& tree);
    276277
     
    387388
    388389  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, 
    390393                                      UFE& blossom, UFE& tree) {
    391 
    392394    std::queue<Node> Q;   //queue of the unscanned nodes
    393395    Q.push(v); 
     
    491493
    492494  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) {
    495500    for( IncEdgeIt e(g,x); e!= INVALID; ++e ) {
    496501      Node y=g.runningNode(e);
     
    520525
    521526  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) {
    524532    ear.set(top,bottom);
    525533    Node t=top;
     
    543551
    544552  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, 
    546555                                   UFE& blossom, UFE& tree) {
    547556    Node v=_mate[x];
Note: See TracChangeset for help on using the changeset viewer.