COIN-OR::LEMON - Graph Library

Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/dijkstra.h

    r525 r463  
    7474    typedef typename LM::Value Value;
    7575
    76     /// Operation traits for %Dijkstra algorithm.
     76    /// Operation traits for Dijkstra algorithm.
    7777
    7878    /// This class defines the operations that are used in the algorithm.
     
    8585    /// Usually it is \c Digraph::NodeMap<int>.
    8686    typedef typename Digraph::template NodeMap<int> HeapCrossRef;
    87     ///Instantiates a \c HeapCrossRef.
     87    ///Instantiates a \ref HeapCrossRef.
    8888
    8989    ///This function instantiates a \ref HeapCrossRef.
     
    9595    }
    9696
    97     ///The heap type used by the %Dijkstra algorithm.
     97    ///The heap type used by the Dijkstra algorithm.
    9898
    9999    ///The heap type used by the Dijkstra algorithm.
     
    102102    ///\sa Dijkstra
    103103    typedef BinHeap<typename LM::Value, HeapCrossRef, std::less<Value> > Heap;
    104     ///Instantiates a \c Heap.
     104    ///Instantiates a \ref Heap.
    105105
    106106    ///This function instantiates a \ref Heap.
     
    117117    ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
    118118    typedef typename Digraph::template NodeMap<typename Digraph::Arc> PredMap;
    119     ///Instantiates a \c PredMap.
    120 
    121     ///This function instantiates a \ref PredMap.
     119    ///Instantiates a PredMap.
     120
     121    ///This function instantiates a PredMap.
    122122    ///\param g is the digraph, to which we would like to define the
    123     ///\ref PredMap.
     123    ///PredMap.
    124124    static PredMap *createPredMap(const Digraph &g)
    125125    {
     
    133133    ///By default it is a NullMap.
    134134    typedef NullMap<typename Digraph::Node,bool> ProcessedMap;
    135     ///Instantiates a \c ProcessedMap.
    136 
    137     ///This function instantiates a \ref ProcessedMap.
     135    ///Instantiates a ProcessedMap.
     136
     137    ///This function instantiates a ProcessedMap.
    138138    ///\param g is the digraph, to which
    139     ///we would like to define the \ref ProcessedMap.
     139    ///we would like to define the ProcessedMap
    140140#ifdef DOXYGEN
    141141    static ProcessedMap *createProcessedMap(const Digraph &g)
     
    152152    ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
    153153    typedef typename Digraph::template NodeMap<typename LM::Value> DistMap;
    154     ///Instantiates a \c DistMap.
    155 
    156     ///This function instantiates a \ref DistMap.
     154    ///Instantiates a DistMap.
     155
     156    ///This function instantiates a DistMap.
    157157    ///\param g is the digraph, to which we would like to define
    158     ///the \ref DistMap.
     158    ///the DistMap
    159159    static DistMap *createDistMap(const Digraph &g)
    160160    {
     
    217217    ///The heap type used by the algorithm.
    218218    typedef typename TR::Heap Heap;
    219     ///\brief The \ref DijkstraDefaultOperationTraits "operation traits class"
    220     ///of the algorithm.
     219    ///The operation traits class.
    221220    typedef typename TR::OperationTraits OperationTraits;
    222221
     
    234233    const Digraph *G;
    235234    //Pointer to the length map.
    236     const LengthMap *_length;
     235    const LengthMap *length;
    237236    //Pointer to the map of predecessors arcs.
    238237    PredMap *_pred;
     
    299298    };
    300299    ///\brief \ref named-templ-param "Named parameter" for setting
    301     ///\c PredMap type.
     300    ///PredMap type.
    302301    ///
    303302    ///\ref named-templ-param "Named parameter" for setting
    304     ///\c PredMap type.
     303    ///PredMap type.
    305304    ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
    306305    template <class T>
     
    320319    };
    321320    ///\brief \ref named-templ-param "Named parameter" for setting
    322     ///\c DistMap type.
     321    ///DistMap type.
    323322    ///
    324323    ///\ref named-templ-param "Named parameter" for setting
    325     ///\c DistMap type.
     324    ///DistMap type.
    326325    ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
    327326    template <class T>
     
    341340    };
    342341    ///\brief \ref named-templ-param "Named parameter" for setting
    343     ///\c ProcessedMap type.
     342    ///ProcessedMap type.
    344343    ///
    345344    ///\ref named-templ-param "Named parameter" for setting
    346     ///\c ProcessedMap type.
     345    ///ProcessedMap type.
    347346    ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
    348347    template <class T>
     
    360359    };
    361360    ///\brief \ref named-templ-param "Named parameter" for setting
    362     ///\c ProcessedMap type to be <tt>Digraph::NodeMap<bool></tt>.
     361    ///ProcessedMap type to be <tt>Digraph::NodeMap<bool></tt>.
    363362    ///
    364363    ///\ref named-templ-param "Named parameter" for setting
    365     ///\c ProcessedMap type to be <tt>Digraph::NodeMap<bool></tt>.
     364    ///ProcessedMap type to be <tt>Digraph::NodeMap<bool></tt>.
    366365    ///If you don't set it explicitly, it will be automatically allocated.
    367366    struct SetStandardProcessedMap
     
    441440    ///
    442441    ///\ref named-templ-param "Named parameter" for setting
    443     ///\c OperationTraits type.
     442    ///\ref OperationTraits type.
    444443    template <class T>
    445444    struct SetOperationTraits
     
    460459
    461460    ///Constructor.
    462     ///\param g The digraph the algorithm runs on.
    463     ///\param length The length map used by the algorithm.
    464     Dijkstra(const Digraph& g, const LengthMap& length) :
    465       G(&g), _length(&length),
     461    ///\param _g The digraph the algorithm runs on.
     462    ///\param _length The length map used by the algorithm.
     463    Dijkstra(const Digraph& _g, const LengthMap& _length) :
     464      G(&_g), length(&_length),
    466465      _pred(NULL), local_pred(false),
    467466      _dist(NULL), local_dist(false),
     
    487486    Dijkstra &lengthMap(const LengthMap &m)
    488487    {
    489       _length = &m;
     488      length = &m;
    490489      return *this;
    491490    }
     
    640639        switch(_heap->state(w)) {
    641640        case Heap::PRE_HEAP:
    642           _heap->push(w,OperationTraits::plus(oldvalue, (*_length)[e]));
     641          _heap->push(w,OperationTraits::plus(oldvalue, (*length)[e]));
    643642          _pred->set(w,e);
    644643          break;
    645644        case Heap::IN_HEAP:
    646645          {
    647             Value newvalue = OperationTraits::plus(oldvalue, (*_length)[e]);
     646            Value newvalue = OperationTraits::plus(oldvalue, (*length)[e]);
    648647            if ( OperationTraits::less(newvalue, (*_heap)[w]) ) {
    649648              _heap->decrease(w, newvalue);
Note: See TracChangeset for help on using the changeset viewer.