Changeset 606:c5fd2d996909 in lemon for lemon/core.h
- Timestamp:
- 03/29/09 23:08:20 (16 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/core.h
r582 r606 1035 1035 ///\sa findArc() 1036 1036 ///\sa ArcLookUp, AllArcLookUp, DynArcLookUp 1037 template <typename _Graph>1038 class ConArcIt : public _Graph::Arc {1037 template <typename GR> 1038 class ConArcIt : public GR::Arc { 1039 1039 public: 1040 1040 1041 typedef _GraphGraph;1041 typedef GR Graph; 1042 1042 typedef typename Graph::Arc Parent; 1043 1043 … … 1158 1158 /// 1159 1159 ///\sa findEdge() 1160 template <typename _Graph>1161 class ConEdgeIt : public _Graph::Edge {1160 template <typename GR> 1161 class ConEdgeIt : public GR::Edge { 1162 1162 public: 1163 1163 1164 typedef _GraphGraph;1164 typedef GR Graph; 1165 1165 typedef typename Graph::Edge Parent; 1166 1166 … … 1212 1212 ///queries. 1213 1213 /// 1214 ///\tparam G The type of the underlying digraph.1214 ///\tparam GR The type of the underlying digraph. 1215 1215 /// 1216 1216 ///\sa ArcLookUp 1217 1217 ///\sa AllArcLookUp 1218 template <class G>1218 template <typename GR> 1219 1219 class DynArcLookUp 1220 : protected ItemSetTraits<G , typename G::Arc>::ItemNotifier::ObserverBase1220 : protected ItemSetTraits<GR, typename GR::Arc>::ItemNotifier::ObserverBase 1221 1221 { 1222 1222 public: 1223 typedef typename ItemSetTraits<G , typename G::Arc>1223 typedef typename ItemSetTraits<GR, typename GR::Arc> 1224 1224 ::ItemNotifier::ObserverBase Parent; 1225 1225 1226 TEMPLATE_DIGRAPH_TYPEDEFS(G );1227 typedef G Digraph;1226 TEMPLATE_DIGRAPH_TYPEDEFS(GR); 1227 typedef GR Digraph; 1228 1228 1229 1229 protected: 1230 1230 1231 class AutoNodeMap : public ItemSetTraits<G , Node>::template Map<Arc>::Type {1231 class AutoNodeMap : public ItemSetTraits<GR, Node>::template Map<Arc>::Type { 1232 1232 public: 1233 1233 1234 typedef typename ItemSetTraits<G , Node>::template Map<Arc>::Type Parent;1235 1236 AutoNodeMap(const G & digraph) : Parent(digraph, INVALID) {}1234 typedef typename ItemSetTraits<GR, Node>::template Map<Arc>::Type Parent; 1235 1236 AutoNodeMap(const GR& digraph) : Parent(digraph, INVALID) {} 1237 1237 1238 1238 virtual void add(const Node& node) { … … 1624 1624 ///(<em>O</em>(<em>m</em> log<em>m</em>)) to the number of arcs). 1625 1625 /// 1626 ///\tparam G The type of the underlying digraph.1626 ///\tparam GR The type of the underlying digraph. 1627 1627 /// 1628 1628 ///\sa DynArcLookUp 1629 1629 ///\sa AllArcLookUp 1630 template<class G >1630 template<class GR> 1631 1631 class ArcLookUp 1632 1632 { 1633 1633 public: 1634 TEMPLATE_DIGRAPH_TYPEDEFS(G );1635 typedef G Digraph;1634 TEMPLATE_DIGRAPH_TYPEDEFS(GR); 1635 typedef GR Digraph; 1636 1636 1637 1637 protected: … … 1734 1734 ///(<em>O</em>(<em>m</em> log<em>m</em>)) to the number of arcs). 1735 1735 /// 1736 ///\tparam G The type of the underlying digraph.1736 ///\tparam GR The type of the underlying digraph. 1737 1737 /// 1738 1738 ///\sa DynArcLookUp 1739 1739 ///\sa ArcLookUp 1740 template<class G >1741 class AllArcLookUp : public ArcLookUp<G >1740 template<class GR> 1741 class AllArcLookUp : public ArcLookUp<GR> 1742 1742 { 1743 using ArcLookUp<G >::_g;1744 using ArcLookUp<G >::_right;1745 using ArcLookUp<G >::_left;1746 using ArcLookUp<G >::_head;1747 1748 TEMPLATE_DIGRAPH_TYPEDEFS(G );1749 typedef G Digraph;1743 using ArcLookUp<GR>::_g; 1744 using ArcLookUp<GR>::_right; 1745 using ArcLookUp<GR>::_left; 1746 using ArcLookUp<GR>::_head; 1747 1748 TEMPLATE_DIGRAPH_TYPEDEFS(GR); 1749 typedef GR Digraph; 1750 1750 1751 1751 typename Digraph::template ArcMap<Arc> _next; … … 1774 1774 ///It builds up the search database, which remains valid until the digraph 1775 1775 ///changes. 1776 AllArcLookUp(const Digraph &g) : ArcLookUp<G >(g), _next(g) {refreshNext();}1776 AllArcLookUp(const Digraph &g) : ArcLookUp<GR>(g), _next(g) {refreshNext();} 1777 1777 1778 1778 ///Refresh the data structure at a node. … … 1784 1784 void refresh(Node n) 1785 1785 { 1786 ArcLookUp<G >::refresh(n);1786 ArcLookUp<GR>::refresh(n); 1787 1787 refreshNext(_head[n]); 1788 1788 } … … 1831 1831 Arc operator()(Node s, Node t, Arc prev=INVALID) const {} 1832 1832 #else 1833 using ArcLookUp<G >::operator() ;1833 using ArcLookUp<GR>::operator() ; 1834 1834 Arc operator()(Node s, Node t, Arc prev) const 1835 1835 {
Note: See TracChangeset
for help on using the changeset viewer.