Changeset 1367:a490662291b9 in lemon-0.x
- Timestamp:
- 04/18/05 16:59:24 (20 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1812
- Location:
- src
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
src/lemon/bfs.h
r1359 r1367 87 87 ///\param G is the graph, to which 88 88 ///we would like to define the \ref ProcessedMap 89 static ProcessedMap *createProcessedMap(const GR & G)89 static ProcessedMap *createProcessedMap(const GR &) 90 90 { 91 91 return new ProcessedMap(); … … 770 770 ///\param G is the graph, to which we would like to define the PredMap. 771 771 ///\todo The graph alone may be insufficient to initialize 772 static PredMap *createPredMap(const GR & G)772 static PredMap *createPredMap(const GR &) 773 773 { 774 774 return new PredMap(); … … 803 803 ///\param G is the graph, to which 804 804 ///we would like to define the \ref ProcessedMap 805 static ProcessedMap *createProcessedMap(const GR & G)805 static ProcessedMap *createProcessedMap(const GR &) 806 806 { 807 807 return new ProcessedMap(); … … 832 832 ///This function instantiates a \ref DistMap. 833 833 ///\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 &) 835 835 { 836 836 return new DistMap(); … … 989 989 struct DefPredMapBase : public Base { 990 990 typedef T PredMap; 991 static PredMap *createPredMap(const Graph & G) { return 0; };991 static PredMap *createPredMap(const Graph &) { return 0; }; 992 992 DefPredMapBase(const TR &b) : TR(b) {} 993 993 }; … … 1010 1010 struct DefReachedMapBase : public Base { 1011 1011 typedef T ReachedMap; 1012 static ReachedMap *createReachedMap(const Graph & G) { return 0; };1012 static ReachedMap *createReachedMap(const Graph &) { return 0; }; 1013 1013 DefReachedMapBase(const TR &b) : TR(b) {} 1014 1014 }; … … 1031 1031 struct DefProcessedMapBase : public Base { 1032 1032 typedef T ProcessedMap; 1033 static ProcessedMap *createProcessedMap(const Graph & G) { return 0; };1033 static ProcessedMap *createProcessedMap(const Graph &) { return 0; }; 1034 1034 DefProcessedMapBase(const TR &b) : TR(b) {} 1035 1035 }; … … 1072 1072 struct DefDistMapBase : public Base { 1073 1073 typedef T DistMap; 1074 static DistMap *createDistMap(const Graph & G) { return 0; };1074 static DistMap *createDistMap(const Graph &) { return 0; }; 1075 1075 DefDistMapBase(const TR &b) : TR(b) {} 1076 1076 }; -
src/lemon/concept/graph.h
r1359 r1367 186 186 /// Copy constructor. 187 187 /// 188 NodeIt(const NodeIt& ) { }188 NodeIt(const NodeIt& n) : Node(n) { } 189 189 /// Invalid constructor \& conversion. 190 190 … … 196 196 /// Sets the iterator to the first node of \c g. 197 197 /// 198 NodeIt(const StaticGraph& g) { }198 NodeIt(const StaticGraph&) { } 199 199 /// Node -> NodeIt conversion. 200 200 … … 268 268 /// Copy constructor. 269 269 /// 270 OutEdgeIt(const OutEdgeIt& ) { }270 OutEdgeIt(const OutEdgeIt& e) : Edge(e) { } 271 271 /// Initialize the iterator to be invalid. 272 272 … … 280 280 ///@param n the node 281 281 ///@param g the graph 282 OutEdgeIt(const StaticGraph& g, const Node& n) { }282 OutEdgeIt(const StaticGraph&, const Node&) { } 283 283 /// Edge -> OutEdgeIt conversion 284 284 … … 317 317 /// Copy constructor. 318 318 /// 319 InEdgeIt(const InEdgeIt& ) { }319 InEdgeIt(const InEdgeIt& e) : Edge(e) { } 320 320 /// Initialize the iterator to be invalid. 321 321 … … 329 329 ///@param n the node 330 330 ///@param g the graph 331 InEdgeIt(const StaticGraph& g, const Node& n) { }331 InEdgeIt(const StaticGraph&, const Node&) { } 332 332 /// Edge -> InEdgeIt conversion 333 333 … … 335 335 /// This feature necessitates that each time we 336 336 /// iterate the edge-set, the iteration order is the same. 337 InEdgeIt(const StaticGraph& g, const Edge& n) { }337 InEdgeIt(const StaticGraph&, const Edge&) { } 338 338 /// Next incoming edge 339 339 … … 362 362 /// Copy constructor. 363 363 /// 364 EdgeIt(const EdgeIt& ) { }364 EdgeIt(const EdgeIt& e) : Edge(e) { } 365 365 /// Initialize the iterator to be invalid. 366 366 … … 373 373 /// node 374 374 ///@param g the graph 375 EdgeIt(const StaticGraph& g) { }375 EdgeIt(const StaticGraph&) { } 376 376 /// Edge -> EdgeIt conversion 377 377 … … 414 414 415 415 ///Copy constructor 416 NodeMap(const NodeMap& ) { }416 NodeMap(const NodeMap& nm) : ReadWriteMap< Node, T >(nm) { } 417 417 ///Assignment operator 418 418 NodeMap& operator=(const NodeMap&) { return *this; } … … 437 437 EdgeMap(const StaticGraph&, T) { } 438 438 ///Copy constructor 439 EdgeMap(const EdgeMap& ) { }439 EdgeMap(const EdgeMap& em) : ReadWriteMap<Edge,T>(em) { } 440 440 ///Assignment operator 441 441 EdgeMap& operator=(const EdgeMap&) { return *this; } … … 471 471 ///and target node \c t. 472 472 ///\return the new edge. 473 Edge addEdge(Node s, Node t) { return INVALID; }473 Edge addEdge(Node, Node) { return INVALID; } 474 474 475 475 /// Resets the graph. … … 501 501 /// Deletes node \c n node. 502 502 /// 503 void erase(Node n) { }503 void erase(Node) { } 504 504 /// Deletes an edge. 505 505 506 506 /// Deletes edge \c e edge. 507 507 /// 508 void erase(Edge e) { }508 void erase(Edge) { } 509 509 510 510 template <typename _Graph> -
src/lemon/concept/graph_component.h
r1359 r1367 305 305 /// If the graph does not contain node with the given id 306 306 /// 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;} 308 308 309 309 /// \brief Gives back an unique integer id for the Edge. … … 318 318 /// If the graph does not contain edge with the given id 319 319 /// 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;} 321 321 322 322 template <typename _Graph> … … 399 399 /// Adds a new Edge connects the two Nodes to the graph. 400 400 /// 401 Edge addEdge(const Node& from, const Node& to) {401 Edge addEdge(const Node&, const Node&) { 402 402 return INVALID; 403 403 } … … 746 746 /// 747 747 /// Copy Constructor. 748 GraphMap(const GraphMap& ) {}748 GraphMap(const GraphMap& gm) :ReadWriteMap<Item, _Value>(gm) {} 749 749 750 750 /// \brief Assign operator. … … 810 810 /// 811 811 /// Copy Constructor. 812 NodeMap(const NodeMap& ) {}812 NodeMap(const NodeMap& nm) : GraphMap<Graph, Node, _Value>(nm) {} 813 813 814 814 /// \brief Assign operator. … … 840 840 /// 841 841 /// Copy Constructor. 842 EdgeMap(const EdgeMap& ) {}842 EdgeMap(const EdgeMap& em) :GraphMap<Graph, Edge, _Value>(em) {} 843 843 844 844 /// \brief Assign operator. … … 918 918 /// 919 919 /// 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&) { 921 921 return INVALID; 922 922 } -
src/lemon/concept/maps.h
r1359 r1367 77 77 78 78 /// Sets the value associated with a key. 79 void set(const Key & k,const Value &t) {}79 void set(const Key &,const Value &) {} 80 80 81 81 ///Default constructor … … 115 115 116 116 /// Returns the value associated with a key. 117 Value operator[](const Key & k) const {return Value();}117 Value operator[](const Key &) const {return Value();} 118 118 /// Sets the value associated with a key. 119 void set(const Key & k,const Value &t) {}119 void set(const Key & ,const Value &) {} 120 120 121 121 template<typename _ReadWriteMap> -
src/lemon/concept/path.h
r1359 r1367 55 55 /// \param _G The graph in which the path is. 56 56 /// 57 Path(const Graph & _G) {}57 Path(const Graph &) {} 58 58 59 59 /// Length of the path. … … 87 87 /// Returns node iterator pointing to the target node of the 88 88 /// given edge iterator. 89 NodeIt target(const EdgeIt& e) const {return INVALID;}89 NodeIt target(const EdgeIt&) const {return INVALID;} 90 90 91 91 /// \brief The source of an edge. … … 93 93 /// Returns node iterator pointing to the source node of the 94 94 /// given edge iterator. 95 NodeIt source(const EdgeIt& e) const {return INVALID;}95 NodeIt source(const EdgeIt&) const {return INVALID;} 96 96 97 97 … … 113 113 EdgeIt(Invalid) {} 114 114 /// Constructor with starting point 115 EdgeIt(const Path & _p) {}115 EdgeIt(const Path &) {} 116 116 117 117 operator GraphEdge () const {} … … 121 121 122 122 /// 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;} 126 126 // /// Comparison operator 127 127 // /// \todo It is not clear what is the "natural" ordering. … … 145 145 NodeIt(Invalid) {} 146 146 /// Constructor with starting point 147 NodeIt(const Path & _p) {}147 NodeIt(const Path &) {} 148 148 149 149 ///Conversion to Graph::Node … … 153 153 154 154 /// 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;} 158 158 // /// Comparison operator 159 159 // /// \todo It is not clear what is the "natural" ordering. … … 202 202 ///If the path is empty, you \em must call \ref setStartNode() before 203 203 ///the first use of \ref pushFront(). 204 void pushFront(const GraphEdge& e) {}204 void pushFront(const GraphEdge&) {} 205 205 206 206 ///Push a new edge to the back of the path … … 209 209 ///If the path is empty, you \em must call \ref setStartNode() before 210 210 ///the first use of \ref pushBack(). 211 void pushBack(const GraphEdge& e) {}211 void pushBack(const GraphEdge&) {} 212 212 213 213 ///Commit the changes to the path. … … 219 219 ///to add to the front of the path, 220 220 ///using this function you may speed up the building. 221 void reserveFront(size_t r) {}221 void reserveFront(size_t) {} 222 222 ///Reserve (back) storage for the builder in advance. 223 223 … … 225 225 ///to add to the back of the path, 226 226 ///using this function you may speed up the building. 227 void reserveBack(size_t r) {}227 void reserveBack(size_t) {} 228 228 }; 229 229 }; -
src/lemon/concept/undir_graph.h
r1359 r1367 47 47 48 48 /// \e 49 UndirGraphEdge(const UndirGraphEdge& ) {}49 UndirGraphEdge(const UndirGraphEdge& e) : UndirGraph::UndirEdge(e) {} 50 50 51 51 /// \e … … 470 470 /// 471 471 /// Returns the base node of the iterator 472 Node baseNode(IncEdgeIt e) const {472 Node baseNode(IncEdgeIt) const { 473 473 return INVALID; 474 474 } … … 476 476 /// 477 477 /// Returns the running node of the iterator 478 Node runningNode(IncEdgeIt e) const {478 Node runningNode(IncEdgeIt) const { 479 479 return INVALID; 480 480 } -
src/lemon/dfs.h
r1359 r1367 87 87 ///\param G is the graph, to which 88 88 ///we would like to define the \ref ProcessedMap 89 static ProcessedMap *createProcessedMap(const GR & G)89 static ProcessedMap *createProcessedMap(const GR &) 90 90 { 91 91 return new ProcessedMap(); … … 777 777 ///\param G is the graph, to which we would like to define the PredMap. 778 778 ///\todo The graph alone may be insufficient to initialize 779 static PredMap *createPredMap(const GR & G)779 static PredMap *createPredMap(const GR &) 780 780 { 781 781 return new PredMap(); … … 810 810 ///\param G is the graph, to which 811 811 ///we would like to define the \ref ProcessedMap 812 static ProcessedMap *createProcessedMap(const GR & G)812 static ProcessedMap *createProcessedMap(const GR &) 813 813 { 814 814 return new ProcessedMap(); … … 839 839 ///This function instantiates a \ref DistMap. 840 840 ///\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 &) 842 842 { 843 843 return new DistMap(); … … 995 995 struct DefPredMapBase : public Base { 996 996 typedef T PredMap; 997 static PredMap *createPredMap(const Graph & G) { return 0; };997 static PredMap *createPredMap(const Graph &) { return 0; }; 998 998 DefPredMapBase(const TR &b) : TR(b) {} 999 999 }; … … 1016 1016 struct DefReachedMapBase : public Base { 1017 1017 typedef T ReachedMap; 1018 static ReachedMap *createReachedMap(const Graph & G) { return 0; };1018 static ReachedMap *createReachedMap(const Graph &) { return 0; }; 1019 1019 DefReachedMapBase(const TR &b) : TR(b) {} 1020 1020 }; … … 1037 1037 struct DefProcessedMapBase : public Base { 1038 1038 typedef T ProcessedMap; 1039 static ProcessedMap *createProcessedMap(const Graph & G) { return 0; };1039 static ProcessedMap *createProcessedMap(const Graph &) { return 0; }; 1040 1040 DefProcessedMapBase(const TR &b) : TR(b) {} 1041 1041 }; … … 1078 1078 struct DefDistMapBase : public Base { 1079 1079 typedef T DistMap; 1080 static DistMap *createDistMap(const Graph & G) { return 0; };1080 static DistMap *createDistMap(const Graph &) { return 0; }; 1081 1081 DefDistMapBase(const TR &b) : TR(b) {} 1082 1082 }; -
src/lemon/dijkstra.h
r1366 r1367 788 788 ///\param G is the graph, to which we would like to define the PredMap. 789 789 ///\todo The graph alone may be insufficient for the initialization 790 static PredMap *createPredMap(const GR & G)790 static PredMap *createPredMap(const GR &) 791 791 { 792 792 return new PredMap(); … … 806 806 ///\param G is the graph, to which 807 807 ///we would like to define the \ref ProcessedMap 808 static ProcessedMap *createProcessedMap(const GR & G)808 static ProcessedMap *createProcessedMap(const GR &) 809 809 { 810 810 return new ProcessedMap(); … … 820 820 ///This function instantiates a \ref DistMap. 821 821 ///\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 &) 823 823 { 824 824 return new DistMap(); … … 975 975 struct DefPredMapBase : public Base { 976 976 typedef T PredMap; 977 static PredMap *createPredMap(const Graph & G) { return 0; };977 static PredMap *createPredMap(const Graph &) { return 0; }; 978 978 DefPredMapBase(const TR &b) : TR(b) {} 979 979 }; … … 1016 1016 struct DefDistMapBase : public Base { 1017 1017 typedef T DistMap; 1018 static DistMap *createDistMap(const Graph & G) { return 0; };1018 static DistMap *createDistMap(const Graph &) { return 0; }; 1019 1019 DefDistMapBase(const TR &b) : TR(b) {} 1020 1020 }; -
src/lemon/graph_to_eps.h
r1366 r1367 364 364 bool operator()(Edge a,Edge b) const 365 365 { 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)); 370 370 return ai<bi || 371 371 (ai==bi && (aa < ba || -
src/test/undir_graph_test.cc
r1307 r1367 57 57 typedef typename Graph::EdgeIt EdgeIt; 58 58 59 cout << "Nodes" <<endl;59 std::cout << "Nodes" << std::endl; 60 60 int i=0; 61 61 for(NodeIt it(g); it!=INVALID; ++it, ++i) { 62 cout << " " << i << ": " << g.id(it) <<endl;62 std::cout << " " << i << ": " << g.id(it) << std::endl; 63 63 } 64 64 65 cout << "UndirEdge" <<endl;65 std::cout << "UndirEdge" << std::endl; 66 66 i=0; 67 67 for(UEdgeIt it(g); it!=INVALID; ++it, ++i) { 68 cout << " " << i << ": " << g.id(it)68 std::cout << " " << i << ": " << g.id(it) 69 69 << " (" << g.id(g.source(it)) << ", " << g.id(g.target(it)) 70 << ")" << endl;70 << ")" << std::endl; 71 71 } 72 72 73 cout << "Edge" <<endl;73 std::cout << "Edge" << std::endl; 74 74 i=0; 75 75 for(EdgeIt it(g); it!=INVALID; ++it, ++i) { 76 cout << " " << i << ": " << g.id(it)76 std::cout << " " << i << ": " << g.id(it) 77 77 << " (" << g.id(g.source(it)) << ", " << g.id(g.target(it)) 78 << ")" << endl;78 << ")" << std::endl; 79 79 } 80 80
Note: See TracChangeset
for help on using the changeset viewer.