COIN-OR::LEMON - Graph Library

Changeset 802:bc0c74eeb151 in lemon-0.x for src/hugo/bfs.h


Ignore:
Timestamp:
09/05/04 22:11:47 (20 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1096
Message:
  • Changes in doc
  • setGraph(...) finally removed from Dijkstra, Bfs and Dfs.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/hugo/bfs.h

    r781 r802  
    3535    ///The type of the underlying graph.
    3636    typedef GR Graph;
     37    ///.
    3738    typedef typename Graph::Node Node;
     39    ///.
    3840    typedef typename Graph::NodeIt NodeIt;
     41    ///.
    3942    typedef typename Graph::Edge Edge;
     43    ///.
    4044    typedef typename Graph::OutEdgeIt OutEdgeIt;
    4145   
     
    5054
    5155  private:
     56    /// Pointer to the underlying graph.
    5257    const Graph *G;
     58    ///Pointer to the map of predecessors edges.
    5359    PredMap *predecessor;
     60    ///Indicates if \ref predecessor is locally allocated (\c true) or not.
    5461    bool local_predecessor;
     62    ///Pointer to the map of predecessors nodes.
    5563    PredNodeMap *pred_node;
     64    ///Indicates if \ref pred_node is locally allocated (\c true) or not.
    5665    bool local_pred_node;
     66    ///Pointer to the map of distances.
    5767    DistMap *distance;
     68    ///Indicates if \ref distance is locally allocated (\c true) or not.
    5869    bool local_distance;
    5970
    60     //The source node of the last execution.
     71    ///The source node of the last execution.
    6172    Node source;
    6273
     
    8091   
    8192  public :   
     93    ///Constructor.
     94   
     95    ///\param _G the graph the algorithm will run on.
    8296    Bfs(const Graph& _G) :
    8397      G(&_G),
     
    87101    { }
    88102   
     103    ///Destructor.
    89104    ~Bfs()
    90105    {
     
    94109    }
    95110
    96     ///Sets the graph the algorithm will run on.
    97 
    98     ///Sets the graph the algorithm will run on.
    99     ///\return <tt> (*this) </tt>
    100     ///\bug What about maps?
    101     ///\todo It may be unnecessary
    102     Bfs &setGraph(const Graph &_G)
    103     {
    104       G = &_G;
    105       return *this;
    106     }
    107111    ///Sets the map storing the predecessor edges.
    108112
     
    250254
    251255    ///Returns \c true if \c v is reachable from the root.
    252     ///\warning The root node is reported to be reached!
     256    ///\note The root node is reported to be reached!
    253257    ///
    254258    ///\pre \ref run() must be called before using this function.
Note: See TracChangeset for help on using the changeset viewer.