COIN-OR::LEMON - Graph Library

Changeset 606:c5fd2d996909 in lemon for lemon/elevator.h


Ignore:
Timestamp:
03/29/09 23:08:20 (10 years ago)
Author:
Peter Kovacs <kpeter@…>
Branch:
default
Phase:
public
Message:

Various doc improvements (#248)

  • Rename all the ugly template parameters (too long and/or starting with an underscore).
  • Rename function parameters starting with an underscore.
  • Extend the doc for many classes.
  • Use LaTeX-style O(...) expressions only for the complicated ones.
  • A lot of small unification changes.
  • Small fixes.
  • Some other improvements.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/elevator.h

    r566 r606  
    4747  ///\sa LinkedElevator
    4848  ///
    49   ///\param Graph Type 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 Graph, 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>
    5353  class Elevator
    5454  {
     
    6161
    6262    typedef Item *Vit;
    63     typedef typename ItemSetTraits<Graph,Item>::template Map<Vit>::Type VitMap;
    64     typedef typename ItemSetTraits<Graph,Item>::template Map<int>::Type IntMap;
    65 
    66     const Graph &_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;
    6767    int _max_level;
    6868    int _item_num;
     
    106106    ///\param max_level The maximum allowed level.
    107107    ///Set the range of the possible labels to <tt>[0..max_level]</tt>.
    108     Elevator(const Graph &graph,int max_level) :
     108    Elevator(const GR &graph,int max_level) :
    109109      _g(graph),
    110110      _max_level(max_level),
     
    123123    ///Set the range of the possible labels to <tt>[0..max_level]</tt>,
    124124    ///where \c max_level is equal to the number of labeled items in the graph.
    125     Elevator(const Graph &graph) :
     125    Elevator(const GR &graph) :
    126126      _g(graph),
    127       _max_level(countItems<Graph, Item>(graph)),
     127      _max_level(countItems<GR, Item>(graph)),
    128128      _item_num(_max_level),
    129129      _where(graph),
     
    431431      _last_active[0]=&_items[0]-1;
    432432      Vit n=&_items[0];
    433       for(typename ItemSetTraits<Graph,Item>::ItemIt i(_g);i!=INVALID;++i)
     433      for(typename ItemSetTraits<GR,Item>::ItemIt i(_g);i!=INVALID;++i)
    434434        {
    435435          *n=i;
     
    490490  ///\sa Elevator
    491491  ///
    492   ///\param Graph Type 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 Graph, 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>
    496496  class LinkedElevator {
    497497  public:
     
    502502  private:
    503503
    504     typedef typename ItemSetTraits<Graph,Item>::
     504    typedef typename ItemSetTraits<GR,Item>::
    505505    template Map<Item>::Type ItemMap;
    506     typedef typename ItemSetTraits<Graph,Item>::
     506    typedef typename ItemSetTraits<GR,Item>::
    507507    template Map<int>::Type IntMap;
    508     typedef typename ItemSetTraits<Graph,Item>::
     508    typedef typename ItemSetTraits<GR,Item>::
    509509    template Map<bool>::Type BoolMap;
    510510
    511     const Graph &_graph;
     511    const GR &_graph;
    512512    int _max_level;
    513513    int _item_num;
     
    526526    ///\param max_level The maximum allowed level.
    527527    ///Set the range of the possible labels to <tt>[0..max_level]</tt>.
    528     LinkedElevator(const Graph& graph, int max_level)
     528    LinkedElevator(const GR& graph, int max_level)
    529529      : _graph(graph), _max_level(max_level), _item_num(_max_level),
    530530        _first(_max_level + 1), _last(_max_level + 1),
     
    539539    ///Set the range of the possible labels to <tt>[0..max_level]</tt>,
    540540    ///where \c max_level is equal to the number of labeled items in the graph.
    541     LinkedElevator(const Graph& graph)
    542       : _graph(graph), _max_level(countItems<Graph, Item>(graph)),
     541    LinkedElevator(const GR& graph)
     542      : _graph(graph), _max_level(countItems<GR, Item>(graph)),
    543543        _item_num(_max_level),
    544544        _first(_max_level + 1), _last(_max_level + 1),
     
    936936      }
    937937      _init_level = 0;
    938       for(typename ItemSetTraits<Graph,Item>::ItemIt i(_graph);
     938      for(typename ItemSetTraits<GR,Item>::ItemIt i(_graph);
    939939          i != INVALID; ++i) {
    940940        _level.set(i, _max_level);
Note: See TracChangeset for help on using the changeset viewer.