Changeset 1909:2d806130e700 in lemon0.x for lemon/bits/default_map.h
 Timestamp:
 01/26/06 16:42:13 (14 years ago)
 Branch:
 default
 Phase:
 public
 Convert:
 svn:c9d7d8f590d60310b91f818b3a526b0e/lemon/trunk@2484
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

lemon/bits/default_map.h
r1875 r1909 267 267 /// \e 268 268 template <typename _Base> 269 class MappableU ndirGraphExtender :269 class MappableUGraphExtender : 270 270 public MappableGraphExtender<_Base> { 271 271 public: 272 272 273 typedef MappableU ndirGraphExtender Graph;273 typedef MappableUGraphExtender Graph; 274 274 typedef MappableGraphExtender<_Base> Parent; 275 275 276 typedef typename Parent::U ndirEdge UndirEdge;277 278 template <typename _Value> 279 class U ndirEdgeMap280 : public IterableMapExtender<DefaultMap<Graph, U ndirEdge, _Value> > {281 public: 282 typedef MappableU ndirGraphExtender Graph;276 typedef typename Parent::UEdge UEdge; 277 278 template <typename _Value> 279 class UEdgeMap 280 : public IterableMapExtender<DefaultMap<Graph, UEdge, _Value> > { 281 public: 282 typedef MappableUGraphExtender Graph; 283 283 typedef IterableMapExtender< 284 DefaultMap<Graph, U ndirEdge, _Value> > Parent;285 286 U ndirEdgeMap(const Graph& _g)287 : Parent(_g) {} 288 U ndirEdgeMap(const Graph& _g, const _Value& _v)289 : Parent(_g, _v) {} 290 291 U ndirEdgeMap& operator=(const UndirEdgeMap& cmap) {292 return operator=<U ndirEdgeMap>(cmap);293 } 294 295 template <typename CMap> 296 U ndirEdgeMap& operator=(const CMap& cmap) {297 checkConcept<concept::ReadMap<U ndirEdge, _Value>, CMap>();298 const typename Parent::Graph* graph = Parent::getGraph(); 299 U ndirEdge it;284 DefaultMap<Graph, UEdge, _Value> > Parent; 285 286 UEdgeMap(const Graph& _g) 287 : Parent(_g) {} 288 UEdgeMap(const Graph& _g, const _Value& _v) 289 : Parent(_g, _v) {} 290 291 UEdgeMap& operator=(const UEdgeMap& cmap) { 292 return operator=<UEdgeMap>(cmap); 293 } 294 295 template <typename CMap> 296 UEdgeMap& operator=(const CMap& cmap) { 297 checkConcept<concept::ReadMap<UEdge, _Value>, CMap>(); 298 const typename Parent::Graph* graph = Parent::getGraph(); 299 UEdge it; 300 300 for (graph>first(it); it != INVALID; graph>next(it)) { 301 301 Parent::set(it, cmap[it]); … … 310 310 /// \e 311 311 template <typename _Base> 312 class MappableU ndirEdgeSetExtender :312 class MappableUEdgeSetExtender : 313 313 public MappableEdgeSetExtender<_Base> { 314 314 public: 315 315 316 typedef MappableU ndirEdgeSetExtender Graph;316 typedef MappableUEdgeSetExtender Graph; 317 317 typedef MappableEdgeSetExtender<_Base> Parent; 318 318 319 typedef typename Parent::U ndirEdge UndirEdge;320 321 template <typename _Value> 322 class U ndirEdgeMap323 : public IterableMapExtender<DefaultMap<Graph, U ndirEdge, _Value> > {324 public: 325 typedef MappableU ndirEdgeSetExtender Graph;319 typedef typename Parent::UEdge UEdge; 320 321 template <typename _Value> 322 class UEdgeMap 323 : public IterableMapExtender<DefaultMap<Graph, UEdge, _Value> > { 324 public: 325 typedef MappableUEdgeSetExtender Graph; 326 326 typedef IterableMapExtender< 327 DefaultMap<Graph, U ndirEdge, _Value> > Parent;328 329 U ndirEdgeMap(const Graph& _g)330 : Parent(_g) {} 331 U ndirEdgeMap(const Graph& _g, const _Value& _v)332 : Parent(_g, _v) {} 333 334 U ndirEdgeMap& operator=(const UndirEdgeMap& cmap) {335 return operator=<U ndirEdgeMap>(cmap);336 } 337 338 template <typename CMap> 339 U ndirEdgeMap& operator=(const CMap& cmap) {340 checkConcept<concept::ReadMap<U ndirEdge, _Value>, CMap>();341 const typename Parent::Graph* graph = Parent::getGraph(); 342 U ndirEdge it;327 DefaultMap<Graph, UEdge, _Value> > Parent; 328 329 UEdgeMap(const Graph& _g) 330 : Parent(_g) {} 331 UEdgeMap(const Graph& _g, const _Value& _v) 332 : Parent(_g, _v) {} 333 334 UEdgeMap& operator=(const UEdgeMap& cmap) { 335 return operator=<UEdgeMap>(cmap); 336 } 337 338 template <typename CMap> 339 UEdgeMap& operator=(const CMap& cmap) { 340 checkConcept<concept::ReadMap<UEdge, _Value>, CMap>(); 341 const typename Parent::Graph* graph = Parent::getGraph(); 342 UEdge it; 343 343 for (graph>first(it); it != INVALID; graph>next(it)) { 344 344 Parent::set(it, cmap[it]); … … 353 353 354 354 template <typename _Base> 355 class MappableU ndirBipartiteGraphExtender : public _Base {355 class MappableUBipartiteGraphExtender : public _Base { 356 356 public: 357 357 358 358 typedef _Base Parent; 359 typedef MappableU ndirBipartiteGraphExtender Graph;359 typedef MappableUBipartiteGraphExtender Graph; 360 360 361 361 typedef typename Parent::Node Node; … … 363 363 typedef typename Parent::LowerNode LowerNode; 364 364 typedef typename Parent::Edge Edge; 365 typedef typename Parent::U ndirEdge UndirEdge;365 typedef typename Parent::UEdge UEdge; 366 366 367 367 template <typename _Value> … … 369 369 : public IterableMapExtender<DefaultMap<Graph, UpperNode, _Value> > { 370 370 public: 371 typedef MappableU ndirBipartiteGraphExtender Graph;371 typedef MappableUBipartiteGraphExtender Graph; 372 372 typedef IterableMapExtender<DefaultMap<Graph, UpperNode, _Value> > 373 373 Parent; … … 406 406 : public IterableMapExtender<DefaultMap<Graph, LowerNode, _Value> > { 407 407 public: 408 typedef MappableU ndirBipartiteGraphExtender Graph;408 typedef MappableUBipartiteGraphExtender Graph; 409 409 typedef IterableMapExtender<DefaultMap<Graph, LowerNode, _Value> > 410 410 Parent; … … 444 444 class NodeMapBase : public Parent::NodeNotifier::ObserverBase { 445 445 public: 446 typedef MappableU ndirBipartiteGraphExtender Graph;446 typedef MappableUBipartiteGraphExtender Graph; 447 447 448 448 typedef Node Key; … … 524 524 : public IterableMapExtender<NodeMapBase<_Value> > { 525 525 public: 526 typedef MappableU ndirBipartiteGraphExtender Graph;526 typedef MappableUBipartiteGraphExtender Graph; 527 527 typedef IterableMapExtender< NodeMapBase<_Value> > Parent; 528 528 … … 562 562 : public IterableMapExtender<DefaultMap<Graph, Edge, _Value> > { 563 563 public: 564 typedef MappableU ndirBipartiteGraphExtender Graph;564 typedef MappableUBipartiteGraphExtender Graph; 565 565 typedef IterableMapExtender<DefaultMap<Graph, Edge, _Value> > Parent; 566 566 … … 587 587 588 588 template <typename _Value> 589 class U ndirEdgeMap590 : public IterableMapExtender<DefaultMap<Graph, U ndirEdge, _Value> > {591 public: 592 typedef MappableU ndirBipartiteGraphExtender Graph;593 typedef IterableMapExtender<DefaultMap<Graph, U ndirEdge, _Value> >589 class UEdgeMap 590 : public IterableMapExtender<DefaultMap<Graph, UEdge, _Value> > { 591 public: 592 typedef MappableUBipartiteGraphExtender Graph; 593 typedef IterableMapExtender<DefaultMap<Graph, UEdge, _Value> > 594 594 Parent; 595 595 596 U ndirEdgeMap(const Graph& _g)597 : Parent(_g) {} 598 U ndirEdgeMap(const Graph& _g, const _Value& _v)599 : Parent(_g, _v) {} 600 601 U ndirEdgeMap& operator=(const UndirEdgeMap& cmap) {602 return operator=<U ndirEdgeMap>(cmap);603 } 604 605 template <typename CMap> 606 U ndirEdgeMap& operator=(const CMap& cmap) {607 checkConcept<concept::ReadMap<U ndirEdge, _Value>, CMap>();608 const typename Parent::Graph* graph = Parent::getGraph(); 609 U ndirEdge it;596 UEdgeMap(const Graph& _g) 597 : Parent(_g) {} 598 UEdgeMap(const Graph& _g, const _Value& _v) 599 : Parent(_g, _v) {} 600 601 UEdgeMap& operator=(const UEdgeMap& cmap) { 602 return operator=<UEdgeMap>(cmap); 603 } 604 605 template <typename CMap> 606 UEdgeMap& operator=(const CMap& cmap) { 607 checkConcept<concept::ReadMap<UEdge, _Value>, CMap>(); 608 const typename Parent::Graph* graph = Parent::getGraph(); 609 UEdge it; 610 610 for (graph>first(it); it != INVALID; graph>next(it)) { 611 611 Parent::set(it, cmap[it]);
Note: See TracChangeset
for help on using the changeset viewer.