COIN-OR::LEMON - Graph Library

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


Ignore:
Timestamp:
11/08/04 16:22:39 (20 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
Files:
6 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  ///
  • src/work/alpar/dijkstra.h

    r959 r967  
    4343    ///The type of the map that stores the edge lengths.
    4444
    45     ///It must meet the \ref ReadMap concept.
     45    ///It must meet the \ref concept::ReadMap "ReadMap" concept.
    4646    ///
    4747    typedef LM LengthMap;
     
    4949    typedef typename LM::ValueType ValueType;
    5050    ///The heap type used by Dijkstra algorithm.
     51
     52    ///The heap type used by Dijkstra algorithm.
     53    ///
     54    ///\sa BinHeap
     55    ///\sa Dijkstra
    5156    typedef BinHeap<typename Graph::Node,
    5257                    typename LM::ValueType,
     
    5762    ///edges of the shortest paths.
    5863    ///
    59     ///It must meet the \ref WriteMap concept.
     64    ///It must meet the \ref concept::WriteMap "WriteMap" concept.
    6065    ///
    6166    typedef typename Graph::template NodeMap<typename GR::Edge> PredMap;
     
    7176    ///nodes of the shortest paths.
    7277    ///
    73     ///It must meet the \ref WriteMap concept.
     78    ///It must meet the \ref concept::WriteMap "WriteMap" concept.
    7479    ///
    7580    typedef typename Graph::template NodeMap<typename GR::Node> PredNodeMap;
     
    7782 
    7883    ///\todo Please document...
    79     /// 
     84    ///
    8085    static PredNodeMap *createPredNodeMap(const GR &G)
    8186    {
     
    8489    ///The type of the map that stores the dists of the nodes.
    8590 
    86     ///It must meet the \ref WriteMap concept.
     91    ///It must meet the \ref concept::WriteMap "WriteMap" concept.
    8792    ///
    8893    typedef typename Graph::template NodeMap<typename LM::ValueType> DistMap;
     
    167172    ///The heap type used by the dijkstra algorithm.
    168173    typedef typename TR::Heap Heap;
    169 
    170174  private:
    171175    /// Pointer to the underlying graph.
     
    225229    ///\ref named-templ-param "Named parameter" for setting PredMap type
    226230
     231    ///\relates Dijkstra
    227232    ///\ingroup flowalgs
    228233    ///\ref named-templ-param "Named parameter" for setting PredMap type
Note: See TracChangeset for help on using the changeset viewer.