COIN-OR::LEMON - Graph Library

Changeset 1367:a490662291b9 in lemon-0.x for src


Ignore:
Timestamp:
04/18/05 16:59:24 (19 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1812
Message:

More steps toward gcc-3.4 compatibility

Location:
src
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • src/lemon/bfs.h

    r1359 r1367  
    8787    ///\param G is the graph, to which
    8888    ///we would like to define the \ref ProcessedMap
    89     static ProcessedMap *createProcessedMap(const GR &G)
     89    static ProcessedMap *createProcessedMap(const GR &)
    9090    {
    9191      return new ProcessedMap();
     
    770770    ///\param G is the graph, to which we would like to define the PredMap.
    771771    ///\todo The graph alone may be insufficient to initialize
    772     static PredMap *createPredMap(const GR &G)
     772    static PredMap *createPredMap(const GR &)
    773773    {
    774774      return new PredMap();
     
    803803    ///\param G is the graph, to which
    804804    ///we would like to define the \ref ProcessedMap
    805     static ProcessedMap *createProcessedMap(const GR &G)
     805    static ProcessedMap *createProcessedMap(const GR &)
    806806    {
    807807      return new ProcessedMap();
     
    832832    ///This function instantiates a \ref DistMap.
    833833    ///\param G is the graph, to which we would like to define the \ref DistMap
    834     static DistMap *createDistMap(const GR &G)
     834    static DistMap *createDistMap(const GR &)
    835835    {
    836836      return new DistMap();
     
    989989    struct DefPredMapBase : public Base {
    990990      typedef T PredMap;
    991       static PredMap *createPredMap(const Graph &G) { return 0; };
     991      static PredMap *createPredMap(const Graph &) { return 0; };
    992992      DefPredMapBase(const TR &b) : TR(b) {}
    993993    };
     
    10101010    struct DefReachedMapBase : public Base {
    10111011      typedef T ReachedMap;
    1012       static ReachedMap *createReachedMap(const Graph &G) { return 0; };
     1012      static ReachedMap *createReachedMap(const Graph &) { return 0; };
    10131013      DefReachedMapBase(const TR &b) : TR(b) {}
    10141014    };
     
    10311031    struct DefProcessedMapBase : public Base {
    10321032      typedef T ProcessedMap;
    1033       static ProcessedMap *createProcessedMap(const Graph &G) { return 0; };
     1033      static ProcessedMap *createProcessedMap(const Graph &) { return 0; };
    10341034      DefProcessedMapBase(const TR &b) : TR(b) {}
    10351035    };
     
    10721072    struct DefDistMapBase : public Base {
    10731073      typedef T DistMap;
    1074       static DistMap *createDistMap(const Graph &G) { return 0; };
     1074      static DistMap *createDistMap(const Graph &) { return 0; };
    10751075      DefDistMapBase(const TR &b) : TR(b) {}
    10761076    };
  • src/lemon/concept/graph.h

    r1359 r1367  
    186186        /// Copy constructor.
    187187        ///
    188         NodeIt(const NodeIt&) { }
     188        NodeIt(const NodeIt& n) : Node(n) { }
    189189        /// Invalid constructor \& conversion.
    190190
     
    196196        /// Sets the iterator to the first node of \c g.
    197197        ///
    198         NodeIt(const StaticGraph& g) { }
     198        NodeIt(const StaticGraph&) { }
    199199        /// Node -> NodeIt conversion.
    200200
     
    268268        /// Copy constructor.
    269269        ///
    270         OutEdgeIt(const OutEdgeIt&) { }
     270        OutEdgeIt(const OutEdgeIt& e) : Edge(e) { }
    271271        /// Initialize the iterator to be invalid.
    272272
     
    280280        ///@param n the node
    281281        ///@param g the graph
    282         OutEdgeIt(const StaticGraph& g, const Node& n) { }
     282        OutEdgeIt(const StaticGraph&, const Node&) { }
    283283        /// Edge -> OutEdgeIt conversion
    284284
     
    317317        /// Copy constructor.
    318318        ///
    319         InEdgeIt(const InEdgeIt&) { }
     319        InEdgeIt(const InEdgeIt& e) : Edge(e) { }
    320320        /// Initialize the iterator to be invalid.
    321321
     
    329329        ///@param n the node
    330330        ///@param g the graph
    331         InEdgeIt(const StaticGraph& g, const Node& n) { }
     331        InEdgeIt(const StaticGraph&, const Node&) { }
    332332        /// Edge -> InEdgeIt conversion
    333333
     
    335335        /// This feature necessitates that each time we
    336336        /// iterate the edge-set, the iteration order is the same.
    337         InEdgeIt(const StaticGraph& g, const Edge& n) { }
     337        InEdgeIt(const StaticGraph&, const Edge&) { }
    338338        /// Next incoming edge
    339339
     
    362362        /// Copy constructor.
    363363        ///
    364         EdgeIt(const EdgeIt&) { }
     364        EdgeIt(const EdgeIt& e) : Edge(e) { }
    365365        /// Initialize the iterator to be invalid.
    366366
     
    373373        /// node
    374374        ///@param g the graph
    375         EdgeIt(const StaticGraph& g) { }
     375        EdgeIt(const StaticGraph&) { }
    376376        /// Edge -> EdgeIt conversion
    377377
     
    414414
    415415        ///Copy constructor
    416         NodeMap(const NodeMap&) { }
     416        NodeMap(const NodeMap& nm) : ReadWriteMap< Node, T >(nm) { }
    417417        ///Assignment operator
    418418        NodeMap& operator=(const NodeMap&) { return *this; }
     
    437437        EdgeMap(const StaticGraph&, T) { }
    438438        ///Copy constructor
    439         EdgeMap(const EdgeMap&) { }
     439        EdgeMap(const EdgeMap& em) : ReadWriteMap<Edge,T>(em) { }
    440440        ///Assignment operator
    441441        EdgeMap& operator=(const EdgeMap&) { return *this; }
     
    471471      ///and target node \c t.
    472472      ///\return the new edge.
    473       Edge addEdge(Node s, Node t) { return INVALID; }
     473      Edge addEdge(Node, Node) { return INVALID; }
    474474   
    475475      /// Resets the graph.
     
    501501      /// Deletes node \c n node.
    502502      ///
    503       void erase(Node n) { }
     503      void erase(Node) { }
    504504      /// Deletes an edge.
    505505
    506506      /// Deletes edge \c e edge.
    507507      ///
    508       void erase(Edge e) { }
     508      void erase(Edge) { }
    509509
    510510      template <typename _Graph>
  • src/lemon/concept/graph_component.h

    r1359 r1367  
    305305      /// If the graph does not contain node with the given id
    306306      /// then the result of the function is undetermined.
    307       Node fromId(int id, Node) const { return INVALID;}
     307      Node fromId(int , Node) const { return INVALID;}
    308308
    309309      /// \brief Gives back an unique integer id for the Edge.
     
    318318      /// If the graph does not contain edge with the given id
    319319      /// then the result of the function is undetermined.
    320       Edge fromId(int id, Edge) const { return INVALID;}
     320      Edge fromId(int, Edge) const { return INVALID;}
    321321
    322322      template <typename _Graph>
     
    399399      /// Adds a new Edge connects the two Nodes to the graph.
    400400      ///
    401       Edge addEdge(const Node& from, const Node& to) {
     401      Edge addEdge(const Node&, const Node&) {
    402402        return INVALID;
    403403      }
     
    746746      ///
    747747      /// Copy Constructor.
    748       GraphMap(const GraphMap&) {}
     748      GraphMap(const GraphMap& gm) :ReadWriteMap<Item, _Value>(gm) {}
    749749     
    750750      /// \brief Assign operator.
     
    810810        ///
    811811        /// Copy Constructor.
    812         NodeMap(const NodeMap&) {}
     812        NodeMap(const NodeMap& nm) : GraphMap<Graph, Node, _Value>(nm) {}
    813813
    814814        /// \brief Assign operator.
     
    840840        ///
    841841        /// Copy Constructor.
    842         EdgeMap(const EdgeMap&) {}
     842        EdgeMap(const EdgeMap& em) :GraphMap<Graph, Edge, _Value>(em) {}
    843843
    844844        /// \brief Assign operator.
     
    918918      ///
    919919      /// Add an edge to the graph and notify the observers.
    920       Edge addEdge(const Node& from, const Node& to) {
     920      Edge addEdge(const Node&, const Node&) {
    921921        return INVALID;
    922922      }
  • src/lemon/concept/maps.h

    r1359 r1367  
    7777
    7878      /// Sets the value associated with a key.
    79       void set(const Key &k,const Value &t) {}
     79      void set(const Key &,const Value &) {}
    8080
    8181      ///Default constructor
     
    115115
    116116      /// Returns the value associated with a key.
    117       Value operator[](const Key &k) const {return Value();}
     117      Value operator[](const Key &) const {return Value();}
    118118      /// Sets the value associated with a key.
    119       void set(const Key &k,const Value &t) {}
     119      void set(const Key & ,const Value &) {}
    120120
    121121      template<typename _ReadWriteMap>
  • src/lemon/concept/path.h

    r1359 r1367  
    5555      /// \param _G The graph in which the path is.
    5656      ///
    57       Path(const Graph &_G) {}
     57      Path(const Graph &) {}
    5858
    5959      /// Length of the path.
     
    8787      /// Returns node iterator pointing to the target node of the
    8888      /// given edge iterator.
    89       NodeIt target(const EdgeIt& e) const {return INVALID;}
     89      NodeIt target(const EdgeIt&) const {return INVALID;}
    9090
    9191      /// \brief The source of an edge.
     
    9393      /// Returns node iterator pointing to the source node of the
    9494      /// given edge iterator.
    95       NodeIt source(const EdgeIt& e) const {return INVALID;}
     95      NodeIt source(const EdgeIt&) const {return INVALID;}
    9696
    9797
     
    113113        EdgeIt(Invalid) {}
    114114        /// Constructor with starting point
    115         EdgeIt(const Path &_p) {}
     115        EdgeIt(const Path &) {}
    116116
    117117        operator GraphEdge () const {}
     
    121121
    122122        /// Comparison operator
    123         bool operator==(const EdgeIt& e) const {return true;}
    124         /// Comparison operator
    125         bool operator!=(const EdgeIt& e) const {return true;}
     123        bool operator==(const EdgeIt&) const {return true;}
     124        /// Comparison operator
     125        bool operator!=(const EdgeIt&) const {return true;}
    126126//      /// Comparison operator
    127127//      /// \todo It is not clear what is the "natural" ordering.
     
    145145        NodeIt(Invalid) {}
    146146        /// Constructor with starting point
    147         NodeIt(const Path &_p) {}
     147        NodeIt(const Path &) {}
    148148
    149149        ///Conversion to Graph::Node
     
    153153
    154154        /// Comparison operator
    155         bool operator==(const NodeIt& e) const {return true;}
    156         /// Comparison operator
    157         bool operator!=(const NodeIt& e) const {return true;}
     155        bool operator==(const NodeIt&) const {return true;}
     156        /// Comparison operator
     157        bool operator!=(const NodeIt&) const {return true;}
    158158//      /// Comparison operator
    159159//      /// \todo It is not clear what is the "natural" ordering.
     
    202202        ///If the path is empty, you \em must call \ref setStartNode() before
    203203        ///the first use of \ref pushFront().
    204         void pushFront(const GraphEdge& e) {}
     204        void pushFront(const GraphEdge&) {}
    205205
    206206        ///Push a new edge to the back of the path
     
    209209        ///If the path is empty, you \em must call \ref setStartNode() before
    210210        ///the first use of \ref pushBack().
    211         void pushBack(const GraphEdge& e) {}
     211        void pushBack(const GraphEdge&) {}
    212212
    213213        ///Commit the changes to the path.
     
    219219        ///to add to the front of the path,
    220220        ///using this function you may speed up the building.
    221         void reserveFront(size_t r) {}
     221        void reserveFront(size_t) {}
    222222        ///Reserve (back) storage for the builder in advance.
    223223
     
    225225        ///to add to the back of the path,
    226226        ///using this function you may speed up the building.
    227         void reserveBack(size_t r) {}
     227        void reserveBack(size_t) {}
    228228      };
    229229    };
  • src/lemon/concept/undir_graph.h

    r1359 r1367  
    4747
    4848      /// \e
    49       UndirGraphEdge(const UndirGraphEdge&) {}
     49      UndirGraphEdge(const UndirGraphEdge& e) : UndirGraph::UndirEdge(e) {}
    5050
    5151      /// \e
     
    470470      ///
    471471      /// Returns the base node of the iterator
    472       Node baseNode(IncEdgeIt e) const {
     472      Node baseNode(IncEdgeIt) const {
    473473        return INVALID;
    474474      }
     
    476476      ///
    477477      /// Returns the running node of the iterator
    478       Node runningNode(IncEdgeIt e) const {
     478      Node runningNode(IncEdgeIt) const {
    479479        return INVALID;
    480480      }
  • src/lemon/dfs.h

    r1359 r1367  
    8787    ///\param G is the graph, to which
    8888    ///we would like to define the \ref ProcessedMap
    89     static ProcessedMap *createProcessedMap(const GR &G)
     89    static ProcessedMap *createProcessedMap(const GR &)
    9090    {
    9191      return new ProcessedMap();
     
    777777    ///\param G is the graph, to which we would like to define the PredMap.
    778778    ///\todo The graph alone may be insufficient to initialize
    779     static PredMap *createPredMap(const GR &G)
     779    static PredMap *createPredMap(const GR &)
    780780    {
    781781      return new PredMap();
     
    810810    ///\param G is the graph, to which
    811811    ///we would like to define the \ref ProcessedMap
    812     static ProcessedMap *createProcessedMap(const GR &G)
     812    static ProcessedMap *createProcessedMap(const GR &)
    813813    {
    814814      return new ProcessedMap();
     
    839839    ///This function instantiates a \ref DistMap.
    840840    ///\param G is the graph, to which we would like to define the \ref DistMap
    841     static DistMap *createDistMap(const GR &G)
     841    static DistMap *createDistMap(const GR &)
    842842    {
    843843      return new DistMap();
     
    995995    struct DefPredMapBase : public Base {
    996996      typedef T PredMap;
    997       static PredMap *createPredMap(const Graph &G) { return 0; };
     997      static PredMap *createPredMap(const Graph &) { return 0; };
    998998      DefPredMapBase(const TR &b) : TR(b) {}
    999999    };
     
    10161016    struct DefReachedMapBase : public Base {
    10171017      typedef T ReachedMap;
    1018       static ReachedMap *createReachedMap(const Graph &G) { return 0; };
     1018      static ReachedMap *createReachedMap(const Graph &) { return 0; };
    10191019      DefReachedMapBase(const TR &b) : TR(b) {}
    10201020    };
     
    10371037    struct DefProcessedMapBase : public Base {
    10381038      typedef T ProcessedMap;
    1039       static ProcessedMap *createProcessedMap(const Graph &G) { return 0; };
     1039      static ProcessedMap *createProcessedMap(const Graph &) { return 0; };
    10401040      DefProcessedMapBase(const TR &b) : TR(b) {}
    10411041    };
     
    10781078    struct DefDistMapBase : public Base {
    10791079      typedef T DistMap;
    1080       static DistMap *createDistMap(const Graph &G) { return 0; };
     1080      static DistMap *createDistMap(const Graph &) { return 0; };
    10811081      DefDistMapBase(const TR &b) : TR(b) {}
    10821082    };
  • src/lemon/dijkstra.h

    r1366 r1367  
    788788    ///\param G is the graph, to which we would like to define the PredMap.
    789789    ///\todo The graph alone may be insufficient for the initialization
    790     static PredMap *createPredMap(const GR &G)
     790    static PredMap *createPredMap(const GR &)
    791791    {
    792792      return new PredMap();
     
    806806    ///\param G is the graph, to which
    807807    ///we would like to define the \ref ProcessedMap
    808     static ProcessedMap *createProcessedMap(const GR &G)
     808    static ProcessedMap *createProcessedMap(const GR &)
    809809    {
    810810      return new ProcessedMap();
     
    820820    ///This function instantiates a \ref DistMap.
    821821    ///\param G is the graph, to which we would like to define the \ref DistMap
    822     static DistMap *createDistMap(const GR &G)
     822    static DistMap *createDistMap(const GR &)
    823823    {
    824824      return new DistMap();
     
    975975    struct DefPredMapBase : public Base {
    976976      typedef T PredMap;
    977       static PredMap *createPredMap(const Graph &G) { return 0; };
     977      static PredMap *createPredMap(const Graph &) { return 0; };
    978978      DefPredMapBase(const TR &b) : TR(b) {}
    979979    };
     
    10161016    struct DefDistMapBase : public Base {
    10171017      typedef T DistMap;
    1018       static DistMap *createDistMap(const Graph &G) { return 0; };
     1018      static DistMap *createDistMap(const Graph &) { return 0; };
    10191019      DefDistMapBase(const TR &b) : TR(b) {}
    10201020    };
  • src/lemon/graph_to_eps.h

    r1366 r1367  
    364364    bool operator()(Edge a,Edge b) const
    365365    {
    366       Node ai=min(g.source(a),g.target(a));
    367       Node aa=max(g.source(a),g.target(a));
    368       Node bi=min(g.source(b),g.target(b));
    369       Node ba=max(g.source(b),g.target(b));
     366      Node ai=std::min(g.source(a),g.target(a));
     367      Node aa=std::max(g.source(a),g.target(a));
     368      Node bi=std::min(g.source(b),g.target(b));
     369      Node ba=std::max(g.source(b),g.target(b));
    370370      return ai<bi ||
    371371        (ai==bi && (aa < ba ||
  • src/test/undir_graph_test.cc

    r1307 r1367  
    5757  typedef typename Graph::EdgeIt EdgeIt;
    5858
    59   cout << "Nodes" << endl;
     59  std::cout << "Nodes" << std::endl;
    6060  int i=0;
    6161  for(NodeIt it(g); it!=INVALID; ++it, ++i) {
    62     cout << "  " << i << ": " << g.id(it) << endl;
     62    std::cout << "  " << i << ": " << g.id(it) << std::endl;
    6363  }
    6464
    65   cout << "UndirEdge" << endl;
     65  std::cout << "UndirEdge" << std::endl;
    6666  i=0;
    6767  for(UEdgeIt it(g); it!=INVALID; ++it, ++i) {
    68     cout << "  " << i << ": " << g.id(it)
     68    std::cout << "  " << i << ": " << g.id(it)
    6969         << " (" << g.id(g.source(it)) << ", " << g.id(g.target(it))
    70          << ")" << endl;
     70         << ")" << std::endl;
    7171  }
    7272
    73   cout << "Edge" << endl;
     73  std::cout << "Edge" << std::endl;
    7474  i=0;
    7575  for(EdgeIt it(g); it!=INVALID; ++it, ++i) {
    76     cout << "  " << i << ": " << g.id(it)
     76    std::cout << "  " << i << ": " << g.id(it)
    7777         << " (" << g.id(g.source(it)) << ", " << g.id(g.target(it))
    78          << ")" << endl;
     78         << ")" << std::endl;
    7979  }
    8080
Note: See TracChangeset for help on using the changeset viewer.