Changeset 1194:699c7eac2c6d in lemon for lemon/bits/graph_extender.h
 Timestamp:
 01/11/12 22:21:07 (8 years ago)
 Branch:
 default
 Phase:
 public
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

lemon/bits/graph_extender.h
r1193 r1194 914 914 }; 915 915 916 class Red It : public RedNode {916 class RedNodeIt : public RedNode { 917 917 const BpGraph* _graph; 918 918 public: 919 919 920 Red It() {}921 922 Red It(Invalid i) : RedNode(i) { }923 924 explicit Red It(const BpGraph& graph) : _graph(&graph) {920 RedNodeIt() {} 921 922 RedNodeIt(Invalid i) : RedNode(i) { } 923 924 explicit RedNodeIt(const BpGraph& graph) : _graph(&graph) { 925 925 _graph>first(static_cast<RedNode&>(*this)); 926 926 } 927 927 928 Red It(const BpGraph& graph, const RedNode& node)928 RedNodeIt(const BpGraph& graph, const RedNode& node) 929 929 : RedNode(node), _graph(&graph) {} 930 930 931 Red It& operator++() {931 RedNodeIt& operator++() { 932 932 _graph>next(static_cast<RedNode&>(*this)); 933 933 return *this; … … 936 936 }; 937 937 938 class Blue It : public BlueNode {938 class BlueNodeIt : public BlueNode { 939 939 const BpGraph* _graph; 940 940 public: 941 941 942 Blue It() {}943 944 Blue It(Invalid i) : BlueNode(i) { }945 946 explicit Blue It(const BpGraph& graph) : _graph(&graph) {942 BlueNodeIt() {} 943 944 BlueNodeIt(Invalid i) : BlueNode(i) { } 945 946 explicit BlueNodeIt(const BpGraph& graph) : _graph(&graph) { 947 947 _graph>first(static_cast<BlueNode&>(*this)); 948 948 } 949 949 950 Blue It(const BpGraph& graph, const BlueNode& node)950 BlueNodeIt(const BpGraph& graph, const BlueNode& node) 951 951 : BlueNode(node), _graph(&graph) {} 952 952 953 Blue It& operator++() {953 BlueNodeIt& operator++() { 954 954 _graph>next(static_cast<BlueNode&>(*this)); 955 955 return *this; … … 1145 1145 1146 1146 template <typename _Value> 1147 class Red Map1147 class RedNodeMap 1148 1148 : public MapExtender<DefaultMap<BpGraph, RedNode, _Value> > { 1149 1149 typedef MapExtender<DefaultMap<BpGraph, RedNode, _Value> > Parent; 1150 1150 1151 1151 public: 1152 explicit Red Map(const BpGraph& bpgraph)1152 explicit RedNodeMap(const BpGraph& bpgraph) 1153 1153 : Parent(bpgraph) {} 1154 Red Map(const BpGraph& bpgraph, const _Value& value)1154 RedNodeMap(const BpGraph& bpgraph, const _Value& value) 1155 1155 : Parent(bpgraph, value) {} 1156 1156 1157 1157 private: 1158 Red Map& operator=(const RedMap& cmap) {1159 return operator=<Red Map>(cmap);1158 RedNodeMap& operator=(const RedNodeMap& cmap) { 1159 return operator=<RedNodeMap>(cmap); 1160 1160 } 1161 1161 1162 1162 template <typename CMap> 1163 Red Map& operator=(const CMap& cmap) {1163 RedNodeMap& operator=(const CMap& cmap) { 1164 1164 Parent::operator=(cmap); 1165 1165 return *this; … … 1169 1169 1170 1170 template <typename _Value> 1171 class Blue Map1171 class BlueNodeMap 1172 1172 : public MapExtender<DefaultMap<BpGraph, BlueNode, _Value> > { 1173 1173 typedef MapExtender<DefaultMap<BpGraph, BlueNode, _Value> > Parent; 1174 1174 1175 1175 public: 1176 explicit Blue Map(const BpGraph& bpgraph)1176 explicit BlueNodeMap(const BpGraph& bpgraph) 1177 1177 : Parent(bpgraph) {} 1178 Blue Map(const BpGraph& bpgraph, const _Value& value)1178 BlueNodeMap(const BpGraph& bpgraph, const _Value& value) 1179 1179 : Parent(bpgraph, value) {} 1180 1180 1181 1181 private: 1182 Blue Map& operator=(const BlueMap& cmap) {1183 return operator=<Blue Map>(cmap);1182 BlueNodeMap& operator=(const BlueNodeMap& cmap) { 1183 return operator=<BlueNodeMap>(cmap); 1184 1184 } 1185 1185 1186 1186 template <typename CMap> 1187 Blue Map& operator=(const CMap& cmap) {1187 BlueNodeMap& operator=(const CMap& cmap) { 1188 1188 Parent::operator=(cmap); 1189 1189 return *this;
Note: See TracChangeset
for help on using the changeset viewer.