Changeset 755:a8c2e828ce0b in lemon-0.x
- Timestamp:
- 08/04/04 21:04:42 (20 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1015
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/work/johanna/kruskal.h
r737 r755 118 118 /// 119 119 template<typename Graph, typename Map> 120 class Kruskal PairVec120 class KruskalMapInput 121 121 : public std::vector< std::pair<typename Graph::Edge, 122 122 typename Map::ValueType> > { … … 144 144 145 145 // FIXME: kell ez? 146 // Kruskal PairVec(Parent const& p) : Parent(p) {}146 // KruskalMapInput(Parent const& p) : Parent(p) {} 147 147 148 148 void sort() { … … 151 151 152 152 // FIXME: nem nagyon illik ez ide... 153 Kruskal PairVec(Graph const& G, Map const& m) {153 KruskalMapInput(Graph const& G, Map const& m) { 154 154 typedef typename Graph::EdgeIt EdgeIt; 155 155 … … 170 170 171 171 172 // template <typename Map>173 // class KruskalMapVec : public std::vector<typename Map::KeyType>{172 // template<typename Graph, typename Map> 173 // class KruskalMapVec { 174 174 // public: 175 175 176 // typedef typename Map::KeyType KeyType; 177 // typedef typename Map::ValueType ValueType; 178 179 // typedef typename std::vector<KeyType> Parent; 180 // typedef typename Parent::iterator iterator; 181 // typedef typename Parent::const_iterator const_iterator; 182 176 // typedef std::pair<typename Map::KeyType, Map::ValueType> value_type; 177 178 // typedef std::vector<KeyType> Container; 179 // Container container; 180 // std::vector<typename Map::KeyType> container 181 // const Map &m; 182 183 184 // class iterator 185 // { 186 // Container::iterator i; 187 // public: 188 // iterator &operator ++() {++i;return *this;} 189 // valuetype operator *() {return value_type(container(i),m[container(i)]);} 190 // bool operator==(iterator b) {return i==b.i;} 191 // iterator() {} 192 // iterator(Container::iterator _i) i(_i) {} 193 // }; 194 // class const_iterator 195 // { 196 // Container::const_iterator i; 197 // public: 198 // iterator &operator ++() {++i;return *this;} 199 // valuetype operator *() {return value_type(container(i),m[container(i)]);} 200 // bool operator==(iterator b) {return i==b.i;} 201 // const_iterator() {} 202 // const_iterator(Container::iterator _i) i(_i) {} 203 // }; 204 205 // iterator begin() { return iterator(container.begin());} 206 // const_iterator begin() const { return iterator(container.begin());} 207 // iterator end() { return iterator(container.end());} 208 // const_iterator end() const { return iterator(container.end());} 209 183 210 // private: 184 185 // const Map &m; 186 211 187 212 // class compareKeys { 188 213 // const Map &m; … … 222 247 // }; 223 248 249 224 250 /* ** ** Wrapper fuggvenyek ** ** */ 225 251 … … 237 263 RetEdgeBoolMap &ret_bool_map) { 238 264 239 typedef Kruskal PairVec<Graph,EdgeCostMap> InputVec;265 typedef KruskalMapInput<Graph,EdgeCostMap> InputVec; 240 266 241 267 InputVec iv(G, edge_costs); … … 261 287 OutMap out(ret_iterator); 262 288 263 typedef Kruskal PairVec<Graph, EdgeCostMap> InputVec;289 typedef KruskalMapInput<Graph, EdgeCostMap> InputVec; 264 290 265 291 InputVec iv(G, edge_costs);
Note: See TracChangeset
for help on using the changeset viewer.