Changeset 891:74589d20dbc3 in lemon-0.x for src/hugo/graph_wrapper.h
- Timestamp:
- 09/21/04 00:57:48 (20 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1199
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/hugo/graph_wrapper.h
r888 r891 287 287 return GraphWrapper<Graph>::tail(e); } 288 288 289 KEEP_MAPS(Parent, RevGraphWrapper);289 // KEEP_MAPS(Parent, RevGraphWrapper); 290 290 291 291 }; … … 494 494 } 495 495 496 KEEP_MAPS(Parent, SubGraphWrapper);496 // KEEP_MAPS(Parent, SubGraphWrapper); 497 497 }; 498 498 … … 559 559 return this->graph->tail(e); } 560 560 561 KEEP_MAPS(Parent, UndirGraphWrapper);561 // KEEP_MAPS(Parent, UndirGraphWrapper); 562 562 563 563 }; … … 566 566 /// 567 567 ///\warning Graph wrappers are in even more experimental state than the other 568 ///parts of the lib. Use them at you own risk.568 ///parts of the lib. Use them at your own risk. 569 569 /// 570 570 /// An undirected graph template. … … 582 582 } 583 583 584 KEEP_MAPS(Parent, UndirGraph);584 // KEEP_MAPS(Parent, UndirGraph); 585 585 }; 586 586 … … 895 895 /// one for the backward edges. 896 896 class EdgeMap { 897 template <typename TT> friend class EdgeMap; 897 898 typename Graph::template EdgeMap<T> forward_map, backward_map; 898 899 public: 899 900 typedef T ValueType; 900 901 typedef Edge KeyType; 902 901 903 EdgeMap(const SubBidirGraphWrapper<Graph, 902 904 ForwardFilterMap, BackwardFilterMap>& g) : 903 905 forward_map(*(g.graph)), backward_map(*(g.graph)) { } 906 904 907 EdgeMap(const SubBidirGraphWrapper<Graph, 905 908 ForwardFilterMap, BackwardFilterMap>& g, T a) : 906 909 forward_map(*(g.graph), a), backward_map(*(g.graph), a) { } 910 911 template <typename TT> 912 EdgeMap(const EdgeMap<TT>& copy) 913 : forward_map(copy.forward_map), backward_map(copy.backward_map) {} 914 915 template <typename TT> 916 EdgeMap& operator=(const EdgeMap<TT>& copy) { 917 forward_map = copy.forward_map; 918 backward_map = copy.backward_map; 919 return *this; 920 } 921 907 922 void set(Edge e, T a) { 908 923 if (!e.backward) … … 911 926 backward_map.set(e, a); 912 927 } 913 T operator[](Edge e) const { 928 929 typename Graph::template EdgeMap<T>::ConstReferenceType 930 operator[](Edge e) const { 914 931 if (!e.backward) 915 932 return forward_map[e]; … … 917 934 return backward_map[e]; 918 935 } 936 937 typename Graph::template EdgeMap<T>::ReferenceType 938 operator[](Edge e) { 939 if (!e.backward) 940 return forward_map[e]; 941 else 942 return backward_map[e]; 943 } 944 919 945 void update() { 920 946 forward_map.update(); … … 924 950 925 951 926 KEEP_NODE_MAP(Parent, SubBidirGraphWrapper);952 // KEEP_NODE_MAP(Parent, SubBidirGraphWrapper); 927 953 928 954 }; … … 966 992 return 2*this->graph->edgeNum(); 967 993 } 968 KEEP_MAPS(Parent, BidirGraphWrapper);994 // KEEP_MAPS(Parent, BidirGraphWrapper); 969 995 }; 970 996 … … 992 1018 Parent::setGraph(gr); 993 1019 } 994 KEEP_MAPS(Parent, BidirGraph);1020 // KEEP_MAPS(Parent, BidirGraph); 995 1021 }; 996 1022 … … 1107 1133 }; 1108 1134 1109 KEEP_MAPS(Parent, ResGraphWrapper);1135 // KEEP_MAPS(Parent, ResGraphWrapper); 1110 1136 }; 1111 1137 … … 1169 1195 } 1170 1196 1171 KEEP_MAPS(Parent, ErasingFirstGraphWrapper);1197 // KEEP_MAPS(Parent, ErasingFirstGraphWrapper); 1172 1198 }; 1173 1199
Note: See TracChangeset
for help on using the changeset viewer.