Changeset 664:4137ef9aacc6 in lemon for lemon/core.h
- Timestamp:
- 04/24/09 11:54:48 (16 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/core.h
r628 r664 1037 1037 template <typename GR> 1038 1038 class ConArcIt : public GR::Arc { 1039 typedef typename GR::Arc Parent; 1040 1039 1041 public: 1040 1042 1041 typedef GR Graph; 1042 typedef typename Graph::Arc Parent; 1043 1044 typedef typename Graph::Arc Arc; 1045 typedef typename Graph::Node Node; 1043 typedef typename GR::Arc Arc; 1044 typedef typename GR::Node Node; 1046 1045 1047 1046 /// \brief Constructor. … … 1049 1048 /// Construct a new ConArcIt iterating on the arcs that 1050 1049 /// connects nodes \c u and \c v. 1051 ConArcIt(const G raph& g, Node u, Node v) : _graph(g) {1050 ConArcIt(const GR& g, Node u, Node v) : _graph(g) { 1052 1051 Parent::operator=(findArc(_graph, u, v)); 1053 1052 } … … 1056 1055 /// 1057 1056 /// Construct a new ConArcIt that continues the iterating from arc \c a. 1058 ConArcIt(const G raph& g, Arc a) : Parent(a), _graph(g) {}1057 ConArcIt(const GR& g, Arc a) : Parent(a), _graph(g) {} 1059 1058 1060 1059 /// \brief Increment operator. … … 1067 1066 } 1068 1067 private: 1069 const G raph& _graph;1068 const GR& _graph; 1070 1069 }; 1071 1070 … … 1160 1159 template <typename GR> 1161 1160 class ConEdgeIt : public GR::Edge { 1161 typedef typename GR::Edge Parent; 1162 1162 1163 public: 1163 1164 1164 typedef GR Graph; 1165 typedef typename Graph::Edge Parent; 1166 1167 typedef typename Graph::Edge Edge; 1168 typedef typename Graph::Node Node; 1165 typedef typename GR::Edge Edge; 1166 typedef typename GR::Node Node; 1169 1167 1170 1168 /// \brief Constructor. … … 1172 1170 /// Construct a new ConEdgeIt iterating on the edges that 1173 1171 /// connects nodes \c u and \c v. 1174 ConEdgeIt(const G raph& g, Node u, Node v) : _graph(g), _u(u), _v(v) {1172 ConEdgeIt(const GR& g, Node u, Node v) : _graph(g), _u(u), _v(v) { 1175 1173 Parent::operator=(findEdge(_graph, _u, _v)); 1176 1174 } … … 1179 1177 /// 1180 1178 /// Construct a new ConEdgeIt that continues iterating from edge \c e. 1181 ConEdgeIt(const G raph& g, Edge e) : Parent(e), _graph(g) {}1179 ConEdgeIt(const GR& g, Edge e) : Parent(e), _graph(g) {} 1182 1180 1183 1181 /// \brief Increment operator. … … 1189 1187 } 1190 1188 private: 1191 const G raph& _graph;1189 const GR& _graph; 1192 1190 Node _u, _v; 1193 1191 }; … … 1220 1218 : protected ItemSetTraits<GR, typename GR::Arc>::ItemNotifier::ObserverBase 1221 1219 { 1222 public:1223 1220 typedef typename ItemSetTraits<GR, typename GR::Arc> 1224 1221 ::ItemNotifier::ObserverBase Parent; 1225 1222 1226 1223 TEMPLATE_DIGRAPH_TYPEDEFS(GR); 1224 1225 public: 1226 1227 /// The Digraph type 1227 1228 typedef GR Digraph; 1228 1229 … … 1230 1231 1231 1232 class AutoNodeMap : public ItemSetTraits<GR, Node>::template Map<Arc>::Type { 1233 typedef typename ItemSetTraits<GR, Node>::template Map<Arc>::Type Parent; 1234 1232 1235 public: 1233 1234 typedef typename ItemSetTraits<GR, Node>::template Map<Arc>::Type Parent;1235 1236 1236 1237 AutoNodeMap(const GR& digraph) : Parent(digraph, INVALID) {} … … 1257 1258 } 1258 1259 }; 1259 1260 const Digraph &_g;1261 AutoNodeMap _head;1262 typename Digraph::template ArcMap<Arc> _parent;1263 typename Digraph::template ArcMap<Arc> _left;1264 typename Digraph::template ArcMap<Arc> _right;1265 1260 1266 1261 class ArcLess { … … 1273 1268 } 1274 1269 }; 1270 1271 protected: 1272 1273 const Digraph &_g; 1274 AutoNodeMap _head; 1275 typename Digraph::template ArcMap<Arc> _parent; 1276 typename Digraph::template ArcMap<Arc> _left; 1277 typename Digraph::template ArcMap<Arc> _right; 1275 1278 1276 1279 public: … … 1631 1634 class ArcLookUp 1632 1635 { 1636 TEMPLATE_DIGRAPH_TYPEDEFS(GR); 1637 1633 1638 public: 1634 TEMPLATE_DIGRAPH_TYPEDEFS(GR); 1639 1640 /// The Digraph type 1635 1641 typedef GR Digraph; 1636 1642 … … 1747 1753 1748 1754 TEMPLATE_DIGRAPH_TYPEDEFS(GR); 1749 typedef GR Digraph; 1750 1751 typename Digraph::template ArcMap<Arc> _next; 1755 1756 typename GR::template ArcMap<Arc> _next; 1752 1757 1753 1758 Arc refreshNext(Arc head,Arc next=INVALID) … … 1768 1773 1769 1774 public: 1775 1776 /// The Digraph type 1777 typedef GR Digraph; 1778 1770 1779 ///Constructor 1771 1780
Note: See TracChangeset
for help on using the changeset viewer.