COIN-OR::LEMON - Graph Library

Changeset 967:6563019430ba in lemon-0.x for src/lemon


Ignore:
Timestamp:
11/08/04 16:22:39 (19 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1354
Message:

Several changes in doc.

Location:
src/lemon
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • src/lemon/bin_heap.h

    r921 r967  
    3333
    3434   /// A Binary Heap implementation.
     35 
     36  ///\todo Please document...
     37  ///
     38  ///\sa FibHeap
     39  ///\sa Dijkstra
    3540  template <typename Item, typename Prio, typename ItemIntMap,
    3641            typename Compare = std::less<Prio> >
     
    6873
    6974  public:
     75    ///\e
    7076    BinHeap(ItemIntMap &_iim) : iim(_iim) {}
     77    ///\e
    7178    BinHeap(ItemIntMap &_iim, const Compare &_comp) : comp(_comp), iim(_iim) {}
    7279
    7380
     81    ///\e
    7482    int size() const { return data.size(); }
     83    ///\e
    7584    bool empty() const { return data.empty(); }
    7685
     
    102111
    103112  public:
     113    ///\e
    104114    void push(const PairType &p) {
    105115      int n = data.size();
     
    107117      bubble_up(n, p);
    108118    }
     119    ///\e
    109120    void push(const Item &i, const Prio &p) { push(PairType(i,p)); }
    110121
     122    ///\e
    111123    Item top() const {
    112124      return data[0].first;
     
    117129    }
    118130
     131    ///\e
    119132    void pop() {
    120133      rmidx(0);
    121134    }
    122135
     136    ///\e
    123137    void erase(const Item &i) {
    124138      rmidx(iim[i]);
    125139    }
    126140
     141    ///\e
    127142    Prio operator[](const Item &i) const {
    128143      int idx = iim[i];
     
    130145    }
    131146
     147    ///\e
    132148    void set(const Item &i, const Prio &p) {
    133149      int idx = iim[i];
     
    143159    }
    144160
     161    ///\e
    145162    void decrease(const Item &i, const Prio &p) {
    146163      int idx = iim[i];
    147164      bubble_up(idx, PairType(i,p));
    148165    }
     166    ///\e
    149167    void increase(const Item &i, const Prio &p) {
    150168      int idx = iim[i];
     
    152170    }
    153171
     172    ///\e
    154173    state_enum state(const Item &i) const {
    155174      int s = iim[i];
  • src/lemon/concept/path.h

    r959 r967  
    3030
    3131
    32     //! \brief A skeletom structure for representing directed paths in a graph.
     32    //! \brief A skeleton structure for representing directed paths in a graph.
    3333    //!
    3434    //! A skeleton structure for representing directed paths in a graph.
  • src/lemon/fib_heap.h

    r921 r967  
    5050  ///default is \c std::less<Prio>.
    5151  ///
     52  ///\sa BinHeap
     53  ///\sa Dijkstra
    5254  ///\author Jacint Szabo
    5355 
  • src/lemon/graph_utils.h

    r964 r967  
    9090    }
    9191    return num;
     92  }
     93
     94  /// Finds an edge between two nodes of a graph.
     95
     96  /// Finds an edge from node \c u to node \c v in graph \c g.
     97  ///
     98  /// If \c prev is \ref INVALID (this is the default value), then
     99  /// it finds the first edge from \c u to \c v. Otherwise it looks for
     100  /// the next edge from \c u to \c v after \c prev.
     101  /// \return The found edge or \ref INVALID if there is no such an edge.
     102  ///
     103  /// Thus you can iterate through each edge from \c u to \c v as it follows.
     104  /// \code
     105  /// for(Edge e=findEdge(g,u,v);e!=INVALID;e=findEdge(g,u,v,e)) {
     106  ///   ...
     107  /// }
     108  /// \endcode
     109  /// \todo We may want to use the \ref concept::GraphBase "GraphBase"
     110  /// interface here...
     111  /// \bug Untested ...
     112  template <typename Graph>
     113  typename Graph::Edge findEdge(const Graph &g,
     114                typename Graph::Node u, typename Graph::Node v,
     115                typename Graph::Edge prev = INVALID)
     116  {
     117    typename Graph::OutEdgeIt e(g,prev);
     118    if(prev==INVALID) g.first(e,u);
     119    else ++e;
     120    while(e!=INVALID && g.tail(e)!=v) ++e;
     121    return e;
    92122  }
    93123 
  • src/lemon/xy.h

    r964 r967  
    138138  ///Read a plainvector from a stream
    139139
     140  ///Read a plainvector from a stream
    140141  ///\relates xy
    141142  ///
     
    151152  ///Write a plainvector to a stream
    152153
     154  ///Write a plainvector to a stream
    153155  ///\relates xy
    154156  ///
Note: See TracChangeset for help on using the changeset viewer.