Changeset 1909:2d806130e700 in lemon0.x for lemon/bits/static_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/static_map.h
r1875 r1909 306 306 /// \e 307 307 template <typename _Base> 308 class StaticMappableU ndirGraphExtender :308 class StaticMappableUGraphExtender : 309 309 public StaticMappableGraphExtender<_Base> { 310 310 public: 311 311 312 typedef StaticMappableU ndirGraphExtender Graph;312 typedef StaticMappableUGraphExtender Graph; 313 313 typedef StaticMappableGraphExtender<_Base> Parent; 314 314 315 typedef typename Parent::U ndirEdge UndirEdge;316 317 template <typename _Value> 318 class U ndirEdgeMap319 : public IterableMapExtender<StaticMap<Graph, U ndirEdge, _Value> > {320 public: 321 typedef StaticMappableU ndirGraphExtender Graph;315 typedef typename Parent::UEdge UEdge; 316 317 template <typename _Value> 318 class UEdgeMap 319 : public IterableMapExtender<StaticMap<Graph, UEdge, _Value> > { 320 public: 321 typedef StaticMappableUGraphExtender Graph; 322 322 typedef IterableMapExtender< 323 StaticMap<Graph, U ndirEdge, _Value> > Parent;324 325 U ndirEdgeMap(const Graph& _g)326 : Parent(_g) {} 327 U ndirEdgeMap(const Graph& _g, const _Value& _v)328 : Parent(_g, _v) {} 329 330 U ndirEdgeMap& operator=(const UndirEdgeMap& cmap) {331 return operator=<U ndirEdgeMap>(cmap);332 } 333 334 template <typename CMap> 335 U ndirEdgeMap& operator=(const CMap& cmap) {336 checkConcept<concept::ReadMap<U ndirEdge, _Value>, CMap>();337 const typename Parent::Graph* graph = Parent::getGraph(); 338 U ndirEdge it;323 StaticMap<Graph, UEdge, _Value> > Parent; 324 325 UEdgeMap(const Graph& _g) 326 : Parent(_g) {} 327 UEdgeMap(const Graph& _g, const _Value& _v) 328 : Parent(_g, _v) {} 329 330 UEdgeMap& operator=(const UEdgeMap& cmap) { 331 return operator=<UEdgeMap>(cmap); 332 } 333 334 template <typename CMap> 335 UEdgeMap& operator=(const CMap& cmap) { 336 checkConcept<concept::ReadMap<UEdge, _Value>, CMap>(); 337 const typename Parent::Graph* graph = Parent::getGraph(); 338 UEdge it; 339 339 for (graph>first(it); it != INVALID; graph>next(it)) { 340 340 Parent::set(it, cmap[it]); … … 347 347 348 348 template <typename _Base> 349 class StaticMappableU ndirBipartiteGraphExtender : public _Base {349 class StaticMappableUBipartiteGraphExtender : public _Base { 350 350 public: 351 351 352 352 typedef _Base Parent; 353 typedef StaticMappableU ndirBipartiteGraphExtender Graph;353 typedef StaticMappableUBipartiteGraphExtender Graph; 354 354 355 355 typedef typename Parent::Node Node; … … 357 357 typedef typename Parent::LowerNode LowerNode; 358 358 typedef typename Parent::Edge Edge; 359 typedef typename Parent::U ndirEdge UndirEdge;359 typedef typename Parent::UEdge UEdge; 360 360 361 361 template <typename _Value> … … 363 363 : public IterableMapExtender<StaticMap<Graph, UpperNode, _Value> > { 364 364 public: 365 typedef StaticMappableU ndirBipartiteGraphExtender Graph;365 typedef StaticMappableUBipartiteGraphExtender Graph; 366 366 typedef IterableMapExtender<StaticMap<Graph, UpperNode, _Value> > 367 367 Parent; … … 400 400 : public IterableMapExtender<StaticMap<Graph, LowerNode, _Value> > { 401 401 public: 402 typedef StaticMappableU ndirBipartiteGraphExtender Graph;402 typedef StaticMappableUBipartiteGraphExtender Graph; 403 403 typedef IterableMapExtender<StaticMap<Graph, LowerNode, _Value> > 404 404 Parent; … … 438 438 class NodeMapBase : public Parent::NodeNotifier::ObserverBase { 439 439 public: 440 typedef StaticMappableU ndirBipartiteGraphExtender Graph;440 typedef StaticMappableUBipartiteGraphExtender Graph; 441 441 442 442 typedef Node Key; … … 518 518 : public IterableMapExtender<NodeMapBase<_Value> > { 519 519 public: 520 typedef StaticMappableU ndirBipartiteGraphExtender Graph;520 typedef StaticMappableUBipartiteGraphExtender Graph; 521 521 typedef IterableMapExtender< NodeMapBase<_Value> > Parent; 522 522 … … 556 556 : public IterableMapExtender<StaticMap<Graph, Edge, _Value> > { 557 557 public: 558 typedef StaticMappableU ndirBipartiteGraphExtender Graph;558 typedef StaticMappableUBipartiteGraphExtender Graph; 559 559 typedef IterableMapExtender<StaticMap<Graph, Edge, _Value> > Parent; 560 560 … … 581 581 582 582 template <typename _Value> 583 class U ndirEdgeMap584 : public IterableMapExtender<StaticMap<Graph, U ndirEdge, _Value> > {585 public: 586 typedef StaticMappableU ndirBipartiteGraphExtender Graph;587 typedef IterableMapExtender<StaticMap<Graph, U ndirEdge, _Value> >583 class UEdgeMap 584 : public IterableMapExtender<StaticMap<Graph, UEdge, _Value> > { 585 public: 586 typedef StaticMappableUBipartiteGraphExtender Graph; 587 typedef IterableMapExtender<StaticMap<Graph, UEdge, _Value> > 588 588 Parent; 589 589 590 U ndirEdgeMap(const Graph& _g)591 : Parent(_g) {} 592 U ndirEdgeMap(const Graph& _g, const _Value& _v)593 : Parent(_g, _v) {} 594 595 U ndirEdgeMap& operator=(const UndirEdgeMap& cmap) {596 return operator=<U ndirEdgeMap>(cmap);597 } 598 599 template <typename CMap> 600 U ndirEdgeMap& operator=(const CMap& cmap) {601 checkConcept<concept::ReadMap<U ndirEdge, _Value>, CMap>();602 const typename Parent::Graph* graph = Parent::getGraph(); 603 U ndirEdge it;590 UEdgeMap(const Graph& _g) 591 : Parent(_g) {} 592 UEdgeMap(const Graph& _g, const _Value& _v) 593 : Parent(_g, _v) {} 594 595 UEdgeMap& operator=(const UEdgeMap& cmap) { 596 return operator=<UEdgeMap>(cmap); 597 } 598 599 template <typename CMap> 600 UEdgeMap& operator=(const CMap& cmap) { 601 checkConcept<concept::ReadMap<UEdge, _Value>, CMap>(); 602 const typename Parent::Graph* graph = Parent::getGraph(); 603 UEdge it; 604 604 for (graph>first(it); it != INVALID; graph>next(it)) { 605 605 Parent::set(it, cmap[it]);
Note: See TracChangeset
for help on using the changeset viewer.