Changeset 1158:8d2e55fac752 in lemon for lemon/concepts
- Timestamp:
- 09/13/12 11:52:50 (12 years ago)
- Branch:
- 1.1
- Parents:
- 1156:939d747055cd (diff), 1157:761fe0846f49 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - Phase:
- public
- Location:
- lemon/concepts
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/concepts/graph_components.h
r1126 r1158 495 495 _GraphItemIt it3 = it1; 496 496 _GraphItemIt it4 = INVALID; 497 ignore_unused_variable_warning(it3); 498 ignore_unused_variable_warning(it4); 497 499 498 500 it2 = ++it1; … … 584 586 _GraphIncIt it3 = it1; 585 587 _GraphIncIt it4 = INVALID; 588 ignore_unused_variable_warning(it3); 589 ignore_unused_variable_warning(it4); 586 590 587 591 it2 = ++it1; -
lemon/concepts/graph_components.h
r1157 r1158 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-20 095 * Copyright (C) 2003-2011 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 39 39 /// \note This class is a template class so that we can use it to 40 40 /// create graph skeleton classes. The reason for this is that \c Node 41 /// and \c Arc (or \c Edge) types should \e not derive from the same 41 /// and \c Arc (or \c Edge) types should \e not derive from the same 42 42 /// base class. For \c Node you should instantiate it with character 43 43 /// \c 'n', for \c Arc with \c 'a' and for \c Edge with \c 'e'. … … 90 90 /// 91 91 /// This operator defines an ordering of the items. 92 /// It makes possible to use graph item types as key types in 92 /// It makes possible to use graph item types as key types in 93 93 /// associative containers (e.g. \c std::map). 94 94 /// … … 124 124 /// This class describes the base interface of directed graph types. 125 125 /// All digraph %concepts have to conform to this class. 126 /// It just provides types for nodes and arcs and functions 126 /// It just provides types for nodes and arcs and functions 127 127 /// to get the source and the target nodes of arcs. 128 128 class BaseDigraphComponent { … … 432 432 /// \brief Concept class for \c NodeIt, \c ArcIt and \c EdgeIt types. 433 433 /// 434 /// This class describes the concept of \c NodeIt, \c ArcIt and 434 /// This class describes the concept of \c NodeIt, \c ArcIt and 435 435 /// \c EdgeIt subtypes of digraph and graph types. 436 436 template <typename GR, typename Item> … … 472 472 /// next item. 473 473 GraphItemIt& operator++() { return *this; } 474 474 475 475 /// \brief Equality operator 476 476 /// … … 510 510 }; 511 511 512 /// \brief Concept class for \c InArcIt, \c OutArcIt and 512 /// \brief Concept class for \c InArcIt, \c OutArcIt and 513 513 /// \c IncEdgeIt types. 514 514 /// 515 /// This class describes the concept of \c InArcIt, \c OutArcIt 515 /// This class describes the concept of \c InArcIt, \c OutArcIt 516 516 /// and \c IncEdgeIt subtypes of digraph and graph types. 517 517 /// 518 518 /// \note Since these iterator classes do not inherit from the same 519 519 /// base class, there is an additional template parameter (selector) 520 /// \c sel. For \c InArcIt you should instantiate it with character 520 /// \c sel. For \c InArcIt you should instantiate it with character 521 521 /// \c 'i', for \c OutArcIt with \c 'o' and for \c IncEdgeIt with \c 'e'. 522 522 template <typename GR, … … 539 539 GraphIncIt(const GraphIncIt& it) : Item(it) {} 540 540 541 /// \brief Constructor that sets the iterator to the first 541 /// \brief Constructor that sets the iterator to the first 542 542 /// incoming or outgoing arc. 543 543 /// 544 /// Constructor that sets the iterator to the first arc 544 /// Constructor that sets the iterator to the first arc 545 545 /// incoming to or outgoing from the given node. 546 546 explicit GraphIncIt(const GR&, const Base&) {} … … 817 817 /// \brief Return the first edge incident to the given node. 818 818 /// 819 /// This function gives back the first edge incident to the given 819 /// This function gives back the first edge incident to the given 820 820 /// node. The bool parameter gives back the direction for which the 821 /// source node of the directed arc representing the edge is the 821 /// source node of the directed arc representing the edge is the 822 822 /// given node. 823 823 void firstInc(Edge&, bool&, const Node&) const {} … … 826 826 /// given node. 827 827 /// 828 /// This function gives back the next edge incident to the given 828 /// This function gives back the next edge incident to the given 829 829 /// node. The bool parameter should be used as \c firstInc() use it. 830 830 void nextInc(Edge&, bool&) const {} … … 1006 1006 /// 1007 1007 /// This class describes the concept of standard graph maps, i.e. 1008 /// the \c NodeMap, \c ArcMap and \c EdgeMap subtypes of digraph and 1008 /// the \c NodeMap, \c ArcMap and \c EdgeMap subtypes of digraph and 1009 1009 /// graph types, which can be used for associating data to graph items. 1010 1010 /// The standard graph maps must conform to the ReferenceMap concept. … … 1061 1061 _Map m1(g); 1062 1062 _Map m2(g,t); 1063 1063 1064 1064 // Copy constructor 1065 1065 // _Map m3(m); … … 1085 1085 /// 1086 1086 /// This class describes the interface of mappable directed graphs. 1087 /// It extends \ref BaseDigraphComponent with the standard digraph 1087 /// It extends \ref BaseDigraphComponent with the standard digraph 1088 1088 /// map classes, namely \c NodeMap and \c ArcMap. 1089 1089 /// This concept is part of the Digraph concept. … … 1223 1223 /// 1224 1224 /// This class describes the interface of mappable undirected graphs. 1225 /// It extends \ref MappableDigraphComponent with the standard graph 1225 /// It extends \ref MappableDigraphComponent with the standard graph 1226 1226 /// map class for edges (\c EdgeMap). 1227 1227 /// This concept is part of the Graph concept. … … 1309 1309 /// 1310 1310 /// This class describes the interface of extendable directed graphs. 1311 /// It extends \ref BaseDigraphComponent with functions for adding 1311 /// It extends \ref BaseDigraphComponent with functions for adding 1312 1312 /// nodes and arcs to the digraph. 1313 1313 /// This concept requires \ref AlterableDigraphComponent. … … 1354 1354 /// 1355 1355 /// This class describes the interface of extendable undirected graphs. 1356 /// It extends \ref BaseGraphComponent with functions for adding 1356 /// It extends \ref BaseGraphComponent with functions for adding 1357 1357 /// nodes and edges to the graph. 1358 1358 /// This concept requires \ref AlterableGraphComponent. … … 1399 1399 /// 1400 1400 /// This class describes the interface of erasable directed graphs. 1401 /// It extends \ref BaseDigraphComponent with functions for removing 1401 /// It extends \ref BaseDigraphComponent with functions for removing 1402 1402 /// nodes and arcs from the digraph. 1403 1403 /// This concept requires \ref AlterableDigraphComponent. … … 1412 1412 /// \brief Erase a node from the digraph. 1413 1413 /// 1414 /// This function erases the given node from the digraph and all arcs 1414 /// This function erases the given node from the digraph and all arcs 1415 1415 /// connected to the node. 1416 1416 void erase(const Node&) {} … … 1439 1439 /// 1440 1440 /// This class describes the interface of erasable undirected graphs. 1441 /// It extends \ref BaseGraphComponent with functions for removing 1441 /// It extends \ref BaseGraphComponent with functions for removing 1442 1442 /// nodes and edges from the graph. 1443 1443 /// This concept requires \ref AlterableGraphComponent. -
lemon/concepts/maps.h
r1126 r1158 50 50 /// Returns the value associated with the given key. 51 51 Value operator[](const Key &) const { 52 return * static_cast<Value *>(0);52 return *(static_cast<Value *>(0)+1); 53 53 } 54 54 -
lemon/concepts/maps.h
r1157 r1158 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-20 095 * Copyright (C) 2003-2011 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES).
Note: See TracChangeset
for help on using the changeset viewer.