Changeset 606:c5fd2d996909 in lemon for lemon/elevator.h
- Timestamp:
- 03/29/09 23:08:20 (16 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/elevator.h
r566 r606 47 47 ///\sa LinkedElevator 48 48 /// 49 ///\param G raphType of the underlying graph.50 ///\param Item Type of the items the data is assigned to ( Graph::Node,51 /// Graph::Arc, Graph::Edge).52 template<class G raph, class Item>49 ///\param GR Type of the underlying graph. 50 ///\param Item Type of the items the data is assigned to (\c GR::Node, 51 ///\c GR::Arc or \c GR::Edge). 52 template<class GR, class Item> 53 53 class Elevator 54 54 { … … 61 61 62 62 typedef Item *Vit; 63 typedef typename ItemSetTraits<G raph,Item>::template Map<Vit>::Type VitMap;64 typedef typename ItemSetTraits<G raph,Item>::template Map<int>::Type IntMap;65 66 const G raph&_g;63 typedef typename ItemSetTraits<GR,Item>::template Map<Vit>::Type VitMap; 64 typedef typename ItemSetTraits<GR,Item>::template Map<int>::Type IntMap; 65 66 const GR &_g; 67 67 int _max_level; 68 68 int _item_num; … … 106 106 ///\param max_level The maximum allowed level. 107 107 ///Set the range of the possible labels to <tt>[0..max_level]</tt>. 108 Elevator(const G raph&graph,int max_level) :108 Elevator(const GR &graph,int max_level) : 109 109 _g(graph), 110 110 _max_level(max_level), … … 123 123 ///Set the range of the possible labels to <tt>[0..max_level]</tt>, 124 124 ///where \c max_level is equal to the number of labeled items in the graph. 125 Elevator(const G raph&graph) :125 Elevator(const GR &graph) : 126 126 _g(graph), 127 _max_level(countItems<G raph, Item>(graph)),127 _max_level(countItems<GR, Item>(graph)), 128 128 _item_num(_max_level), 129 129 _where(graph), … … 431 431 _last_active[0]=&_items[0]-1; 432 432 Vit n=&_items[0]; 433 for(typename ItemSetTraits<G raph,Item>::ItemIt i(_g);i!=INVALID;++i)433 for(typename ItemSetTraits<GR,Item>::ItemIt i(_g);i!=INVALID;++i) 434 434 { 435 435 *n=i; … … 490 490 ///\sa Elevator 491 491 /// 492 ///\param G raphType of the underlying graph.493 ///\param Item Type of the items the data is assigned to ( Graph::Node,494 /// Graph::Arc, Graph::Edge).495 template <class G raph, class Item>492 ///\param GR Type of the underlying graph. 493 ///\param Item Type of the items the data is assigned to (\c GR::Node, 494 ///\c GR::Arc or \c GR::Edge). 495 template <class GR, class Item> 496 496 class LinkedElevator { 497 497 public: … … 502 502 private: 503 503 504 typedef typename ItemSetTraits<G raph,Item>::504 typedef typename ItemSetTraits<GR,Item>:: 505 505 template Map<Item>::Type ItemMap; 506 typedef typename ItemSetTraits<G raph,Item>::506 typedef typename ItemSetTraits<GR,Item>:: 507 507 template Map<int>::Type IntMap; 508 typedef typename ItemSetTraits<G raph,Item>::508 typedef typename ItemSetTraits<GR,Item>:: 509 509 template Map<bool>::Type BoolMap; 510 510 511 const G raph&_graph;511 const GR &_graph; 512 512 int _max_level; 513 513 int _item_num; … … 526 526 ///\param max_level The maximum allowed level. 527 527 ///Set the range of the possible labels to <tt>[0..max_level]</tt>. 528 LinkedElevator(const G raph& graph, int max_level)528 LinkedElevator(const GR& graph, int max_level) 529 529 : _graph(graph), _max_level(max_level), _item_num(_max_level), 530 530 _first(_max_level + 1), _last(_max_level + 1), … … 539 539 ///Set the range of the possible labels to <tt>[0..max_level]</tt>, 540 540 ///where \c max_level is equal to the number of labeled items in the graph. 541 LinkedElevator(const G raph& graph)542 : _graph(graph), _max_level(countItems<G raph, Item>(graph)),541 LinkedElevator(const GR& graph) 542 : _graph(graph), _max_level(countItems<GR, Item>(graph)), 543 543 _item_num(_max_level), 544 544 _first(_max_level + 1), _last(_max_level + 1), … … 936 936 } 937 937 _init_level = 0; 938 for(typename ItemSetTraits<G raph,Item>::ItemIt i(_graph);938 for(typename ItemSetTraits<GR,Item>::ItemIt i(_graph); 939 939 i != INVALID; ++i) { 940 940 _level.set(i, _max_level);
Note: See TracChangeset
for help on using the changeset viewer.