COIN-OR::LEMON - Graph Library

Changeset 877:141f9c0db4a3 in lemon-main for lemon/suurballe.h


Ignore:
Timestamp:
03/06/10 15:35:12 (14 years ago)
Author:
Alpar Juttner <alpar@…>
Branch:
default
Children:
879:38213abd2911, 931:f112c18bc304
Phase:
public
Message:

Unify the sources (#339)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/suurballe.h

    r863 r877  
    33 * This file is a part of LEMON, a generic C++ optimization library.
    44 *
    5  * Copyright (C) 2003-2009
     5 * Copyright (C) 2003-2010
    66 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    77 * (Egervary Research Group on Combinatorial Optimization, EGRES).
     
    6666    /// and it must have an \c addBack() function.
    6767    typedef lemon::Path<Digraph> Path;
    68    
     68
    6969    /// The cross reference type used for the heap.
    7070    typedef typename GR::template NodeMap<int> HeapCrossRef;
     
    159159      Node _s;
    160160      Node _t;
    161      
     161
    162162      PotentialMap _dist;
    163163      std::vector<Node> _proc_nodes;
     
    168168      ResidualDijkstra(Suurballe &srb) :
    169169        _graph(srb._graph), _length(srb._length),
    170         _flow(*srb._flow), _pi(*srb._potential), _pred(srb._pred), 
     170        _flow(*srb._flow), _pi(*srb._potential), _pred(srb._pred),
    171171        _s(srb._s), _t(srb._t), _dist(_graph) {}
    172        
     172
    173173      // Run the algorithm and return true if a path is found
    174174      // from the source node to the target node.
     
    178178
    179179    private:
    180    
     180
    181181      // Execute the algorithm for the first time (the flow and potential
    182182      // functions have to be identically zero).
     
    349349      typedef Suurballe<GR, LEN, SetPathTraits<T> > Create;
    350350    };
    351    
     351
    352352    template <typename H, typename CR>
    353353    struct SetHeapTraits : public Traits {
     
    360360    ///
    361361    /// \ref named-templ-param "Named parameter" for setting \c Heap
    362     /// and \c HeapCrossRef types with automatic allocation. 
     362    /// and \c HeapCrossRef types with automatic allocation.
    363363    /// They will be used for internal Dijkstra computations.
    364364    /// The heap type must conform to the \ref lemon::concepts::Heap "Heap"
     
    398398    // The pred arc map
    399399    PredMap _pred;
    400    
     400
    401401    // Data for full init
    402402    PotentialMap *_init_dist;
     
    556556      dijk.distMap(*_init_dist).predMap(*_init_pred);
    557557      dijk.run(s);
    558      
     558
    559559      _full_init = true;
    560560    }
     
    600600      _t = t;
    601601      ResidualDijkstra dijkstra(*this);
    602      
     602
    603603      // Initialization
    604604      for (ArcIt e(_graph); e != INVALID; ++e) {
     
    614614          (*_flow)[e] = 1;
    615615          u = _graph.source(e);
    616         }       
     616        }
    617617        _path_num = 1;
    618618      } else {
Note: See TracChangeset for help on using the changeset viewer.