COIN-OR::LEMON - Graph Library

Ticket #331: 331-doc-impr3-c2230649a493.patch

File 331-doc-impr3-c2230649a493.patch, 17.8 KB (added by Peter Kovacs, 15 years ago)
  • lemon/adaptors.h

    # HG changeset patch
    # User Peter Kovacs <kpeter@inf.elte.hu>
    # Date 1258311422 -3600
    # Node ID c2230649a493e6fd8f19a16372e9fade832c63d5
    # Parent  1a7fe3bef5144989cc90fe53f4f0a23337fc493f
    Various doc improvements (#331)
    
     - Add notes to the graph classes about the time of
       item counting.
     - Clarify the doc for run() in BFS and DFS.
     - Other improvements.
    
    diff --git a/lemon/adaptors.h b/lemon/adaptors.h
    a b  
    360360  /// by adding or removing nodes or arcs, unless the \c GR template
    361361  /// parameter is set to be \c const.
    362362  ///
     363  /// This class provides item counting in the same time as the adapted
     364  /// digraph structure.
     365  ///
    363366  /// \tparam DGR The type of the adapted digraph.
    364367  /// It must conform to the \ref concepts::Digraph "Digraph" concept.
    365368  /// It can also be specified to be \c const.
     
    719722  /// by adding or removing nodes or arcs, unless the \c GR template
    720723  /// parameter is set to be \c const.
    721724  ///
     725  /// This class provides only linear time counting for nodes and arcs.
     726  ///
    722727  /// \tparam DGR The type of the adapted digraph.
    723728  /// It must conform to the \ref concepts::Digraph "Digraph" concept.
    724729  /// It can also be specified to be \c const.
     
    13141319  /// by adding or removing nodes or edges, unless the \c GR template
    13151320  /// parameter is set to be \c const.
    13161321  ///
     1322  /// This class provides only linear time counting for nodes, edges and arcs.
     1323  ///
    13171324  /// \tparam GR The type of the adapted graph.
    13181325  /// It must conform to the \ref concepts::Graph "Graph" concept.
    13191326  /// It can also be specified to be \c const.
     
    14711478  /// by adding or removing nodes or arcs/edges, unless the \c GR template
    14721479  /// parameter is set to be \c const.
    14731480  ///
     1481  /// This class provides only linear time item counting.
     1482  ///
    14741483  /// \tparam GR The type of the adapted digraph or graph.
    14751484  /// It must conform to the \ref concepts::Digraph "Digraph" concept
    14761485  /// or the \ref concepts::Graph "Graph" concept.
     
    16191628  /// by adding or removing nodes or arcs, unless the \c GR template
    16201629  /// parameter is set to be \c const.
    16211630  ///
     1631  /// This class provides only linear time counting for nodes and arcs.
     1632  ///
    16221633  /// \tparam DGR The type of the adapted digraph.
    16231634  /// It must conform to the \ref concepts::Digraph "Digraph" concept.
    16241635  /// It can also be specified to be \c const.
     
    17291740  /// by adding or removing nodes or edges, unless the \c GR template
    17301741  /// parameter is set to be \c const.
    17311742  ///
     1743  /// This class provides only linear time counting for nodes, edges and arcs.
     1744  ///
    17321745  /// \tparam GR The type of the adapted graph.
    17331746  /// It must conform to the \ref concepts::Graph "Graph" concept.
    17341747  /// It can also be specified to be \c const.
     
    22322245  /// by adding or removing nodes or edges, unless the \c GR template
    22332246  /// parameter is set to be \c const.
    22342247  ///
     2248  /// This class provides item counting in the same time as the adapted
     2249  /// digraph structure.
     2250  ///
    22352251  /// \tparam DGR The type of the adapted digraph.
    22362252  /// It must conform to the \ref concepts::Digraph "Digraph" concept.
    22372253  /// It can also be specified to be \c const.
     
    25352551  /// by adding or removing nodes or arcs, unless the \c GR template
    25362552  /// parameter is set to be \c const.
    25372553  ///
     2554  /// This class provides item counting in the same time as the adapted
     2555  /// graph structure.
     2556  ///
    25382557  /// \tparam GR The type of the adapted graph.
    25392558  /// It must conform to the \ref concepts::Graph "Graph" concept.
    25402559  /// It can also be specified to be \c const.
     
    26782697  /// arcs).
    26792698  /// This class conforms to the \ref concepts::Digraph "Digraph" concept.
    26802699  ///
     2700  /// This class provides only linear time counting for nodes and arcs.
     2701  ///
    26812702  /// \tparam DGR The type of the adapted digraph.
    26822703  /// It must conform to the \ref concepts::Digraph "Digraph" concept.
    26832704  /// It is implicitly \c const.
     
    33253346  /// costs/capacities of the original digraph to the \e bind \e arcs
    33263347  /// in the adaptor.
    33273348  ///
     3349  /// This class provides item counting in the same time as the adapted
     3350  /// digraph structure.
     3351  ///
    33283352  /// \tparam DGR The type of the adapted digraph.
    33293353  /// It must conform to the \ref concepts::Digraph "Digraph" concept.
    33303354  /// It is implicitly \c const.
  • lemon/bfs.h

    diff --git a/lemon/bfs.h b/lemon/bfs.h
    a b  
    701701
    702702    ///Runs the algorithm to visit all nodes in the digraph.
    703703
    704     ///This method runs the %BFS algorithm in order to
    705     ///compute the shortest path to each node.
    706     ///
    707     ///The algorithm computes
    708     ///- the shortest path tree (forest),
    709     ///- the distance of each node from the root(s).
     704    ///This method runs the %BFS algorithm in order to visit all nodes
     705    ///in the digraph.
    710706    ///
    711707    ///\note <tt>b.run(s)</tt> is just a shortcut of the following code.
    712708    ///\code
     
    10461042
    10471043    ///Runs BFS algorithm to visit all nodes in the digraph.
    10481044
    1049     ///This method runs BFS algorithm in order to compute
    1050     ///the shortest path to each node.
     1045    ///This method runs BFS algorithm in order to visit all nodes
     1046    ///in the digraph.
    10511047    void run()
    10521048    {
    10531049      run(INVALID);
     
    16951691
    16961692    /// \brief Runs the algorithm to visit all nodes in the digraph.
    16971693    ///
    1698     /// This method runs the %BFS algorithm in order to
    1699     /// compute the shortest path to each node.
    1700     ///
    1701     /// The algorithm computes
    1702     /// - the shortest path tree (forest),
    1703     /// - the distance of each node from the root(s).
     1694    /// This method runs the %BFS algorithm in order to visit all nodes
     1695    /// in the digraph.
    17041696    ///
    17051697    /// \note <tt>b.run(s)</tt> is just a shortcut of the following code.
    17061698    ///\code
  • lemon/dfs.h

    diff --git a/lemon/dfs.h b/lemon/dfs.h
    a b  
    633633
    634634    ///Runs the algorithm to visit all nodes in the digraph.
    635635
    636     ///This method runs the %DFS algorithm in order to compute the
    637     ///%DFS path to each node.
    638     ///
    639     ///The algorithm computes
    640     ///- the %DFS tree (forest),
    641     ///- the distance of each node from the root(s) in the %DFS tree.
     636    ///This method runs the %DFS algorithm in order to visit all nodes
     637    ///in the digraph.
    642638    ///
    643639    ///\note <tt>d.run()</tt> is just a shortcut of the following code.
    644640    ///\code
     
    976972
    977973    ///Runs DFS algorithm to visit all nodes in the digraph.
    978974
    979     ///This method runs DFS algorithm in order to compute
    980     ///the DFS path to each node.
     975    ///This method runs DFS algorithm in order to visit all nodes
     976    ///in the digraph.
    981977    void run()
    982978    {
    983979      run(INVALID);
     
    15781574
    15791575    /// \brief Runs the algorithm to visit all nodes in the digraph.
    15801576
    1581     /// This method runs the %DFS algorithm in order to
    1582     /// compute the %DFS path to each node.
    1583     ///
    1584     /// The algorithm computes
    1585     /// - the %DFS tree (forest),
    1586     /// - the distance of each node from the root(s) in the %DFS tree.
     1577    /// This method runs the %DFS algorithm in order to visit all nodes
     1578    /// in the digraph.
    15871579    ///
    15881580    /// \note <tt>d.run()</tt> is just a shortcut of the following code.
    15891581    ///\code
  • lemon/dijkstra.h

    diff --git a/lemon/dijkstra.h b/lemon/dijkstra.h
    a b  
    206206    typedef typename TR::Digraph Digraph;
    207207
    208208    ///The type of the arc lengths.
    209     typedef typename TR::LengthMap::Value Value;
     209    typedef typename TR::Value Value;
    210210    ///The type of the map that stores the arc lengths.
    211211    typedef typename TR::LengthMap LengthMap;
    212212    ///\brief The type of the map that stores the predecessor arcs of the
  • lemon/edge_set.h

    diff --git a/lemon/edge_set.h b/lemon/edge_set.h
    a b  
    255255  /// that node can be removed from the underlying graph, in this case
    256256  /// all arcs incident to the given node is erased from the arc set.
    257257  ///
     258  /// This class fully conforms to the \ref concepts::Digraph
     259  /// "Digraph" concept.
     260  /// It provides only linear time counting for nodes and arcs.
     261  ///
    258262  /// \param GR The type of the graph which shares its node set with
    259263  /// this class. Its interface must conform to the
    260264  /// \ref concepts::Digraph "Digraph" or \ref concepts::Graph "Graph"
    261265  /// concept.
    262   ///
    263   /// This class fully conforms to the \ref concepts::Digraph
    264   /// "Digraph" concept.
    265266  template <typename GR>
    266267  class ListArcSet : public ArcSetExtender<ListArcSetBase<GR> > {
    267268    typedef ArcSetExtender<ListArcSetBase<GR> > Parent;
     
    685686  /// be removed from the underlying graph, in this case all edges
    686687  /// incident to the given node is erased from the arc set.
    687688  ///
     689  /// This class fully conforms to the \ref concepts::Graph "Graph"
     690  /// concept.
     691  /// It provides only linear time counting for nodes, edges and arcs.
     692  ///
    688693  /// \param GR The type of the graph which shares its node set
    689694  /// with this class. Its interface must conform to the
    690695  /// \ref concepts::Digraph "Digraph" or \ref concepts::Graph "Graph"
    691696  /// concept.
    692   ///
    693   /// This class fully conforms to the \ref concepts::Graph "Graph"
    694   /// concept.
    695697  template <typename GR>
    696698  class ListEdgeSet : public EdgeSetExtender<ListEdgeSetBase<GR> > {
    697699    typedef EdgeSetExtender<ListEdgeSetBase<GR> > Parent;
     
    954956  /// single-linked lists for enumerate outgoing and incoming
    955957  /// arcs. Therefore the arcs cannot be erased from the arc sets.
    956958  ///
     959  /// This class fully conforms to the \ref concepts::Digraph "Digraph"
     960  /// concept.
     961  /// It provides only linear time counting for nodes and arcs.
     962  ///
    957963  /// \warning If a node is erased from the underlying graph and this
    958964  /// node is the source or target of one arc in the arc set, then
    959965  /// the arc set is invalidated, and it cannot be used anymore. The
    960966  /// validity can be checked with the \c valid() member function.
    961   ///
    962   /// This class fully conforms to the \ref concepts::Digraph
    963   /// "Digraph" concept.
    964967  template <typename GR>
    965968  class SmartArcSet : public ArcSetExtender<SmartArcSetBase<GR> > {
    966969    typedef ArcSetExtender<SmartArcSetBase<GR> > Parent;
     
    13041307  /// single-linked lists for enumerate incident edges. Therefore the
    13051308  /// edges cannot be erased from the edge sets.
    13061309  ///
     1310  /// This class fully conforms to the \ref concepts::Graph "Graph"
     1311  /// concept.
     1312  /// It provides only linear time counting for nodes, edges and arcs.
     1313  ///
    13071314  /// \warning If a node is erased from the underlying graph and this
    13081315  /// node is incident to one edge in the edge set, then the edge set
    13091316  /// is invalidated, and it cannot be used anymore. The validity can
    13101317  /// be checked with the \c valid() member function.
    1311   ///
    1312   /// This class fully conforms to the \ref concepts::Graph
    1313   /// "Graph" concept.
    13141318  template <typename GR>
    13151319  class SmartEdgeSet : public EdgeSetExtender<SmartEdgeSetBase<GR> > {
    13161320    typedef EdgeSetExtender<SmartEdgeSetBase<GR> > Parent;
  • lemon/full_graph.h

    diff --git a/lemon/full_graph.h b/lemon/full_graph.h
    a b  
    162162  /// Most of its member functions and nested classes are documented
    163163  /// only in the concept class.
    164164  ///
     165  /// This class provides constant time counting for nodes and arcs.
     166  ///
    165167  /// \note FullDigraph and FullGraph classes are very similar,
    166168  /// but there are two differences. While this class conforms only
    167169  /// to the \ref concepts::Digraph "Digraph" concept, FullGraph
     
    204206    /// Returns the node with the given index. Since this structure is
    205207    /// completely static, the nodes can be indexed with integers from
    206208    /// the range <tt>[0..nodeNum()-1]</tt>.
     209    /// The index of a node is the same as its ID.
    207210    /// \sa index()
    208211    Node operator()(int ix) const { return Parent::operator()(ix); }
    209212
     
    212215    /// Returns the index of the given node. Since this structure is
    213216    /// completely static, the nodes can be indexed with integers from
    214217    /// the range <tt>[0..nodeNum()-1]</tt>.
     218    /// The index of a node is the same as its ID.
    215219    /// \sa operator()()
    216220    static int index(const Node& node) { return Parent::index(node); }
    217221
     
    535539  /// Most of its member functions and nested classes are documented
    536540  /// only in the concept class.
    537541  ///
     542  /// This class provides constant time counting for nodes, edges and arcs.
     543  ///
    538544  /// \note FullDigraph and FullGraph classes are very similar,
    539545  /// but there are two differences. While FullDigraph
    540546  /// conforms only to the \ref concepts::Digraph "Digraph" concept,
     
    579585    /// Returns the node with the given index. Since this structure is
    580586    /// completely static, the nodes can be indexed with integers from
    581587    /// the range <tt>[0..nodeNum()-1]</tt>.
     588    /// The index of a node is the same as its ID.
    582589    /// \sa index()
    583590    Node operator()(int ix) const { return Parent::operator()(ix); }
    584591
     
    587594    /// Returns the index of the given node. Since this structure is
    588595    /// completely static, the nodes can be indexed with integers from
    589596    /// the range <tt>[0..nodeNum()-1]</tt>.
     597    /// The index of a node is the same as its ID.
    590598    /// \sa operator()()
    591599    static int index(const Node& node) { return Parent::index(node); }
    592600
  • lemon/grid_graph.h

    diff --git a/lemon/grid_graph.h b/lemon/grid_graph.h
    a b  
    503503  /// This type fully conforms to the \ref concepts::Graph "Graph concept".
    504504  /// Most of its member functions and nested classes are documented
    505505  /// only in the concept class.
     506  ///
     507  /// This class provides constant time counting for nodes, edges and arcs.
    506508  class GridGraph : public ExtendedGridGraphBase {
    507509    typedef ExtendedGridGraphBase Parent;
    508510
  • lemon/hypercube_graph.h

    diff --git a/lemon/hypercube_graph.h b/lemon/hypercube_graph.h
    a b  
    294294  /// Most of its member functions and nested classes are documented
    295295  /// only in the concept class.
    296296  ///
     297  /// This class provides constant time counting for nodes, edges and arcs.
     298  ///
    297299  /// \note The type of the indices is chosen to \c int for efficiency
    298300  /// reasons. Thus the maximum dimension of this implementation is 26
    299301  /// (assuming that the size of \c int is 32 bit).
  • lemon/list_graph.h

    diff --git a/lemon/list_graph.h b/lemon/list_graph.h
    a b  
    324324  ///Most of its member functions and nested classes are documented
    325325  ///only in the concept class.
    326326  ///
     327  ///This class provides only linear time counting for nodes and arcs.
     328  ///
    327329  ///\sa concepts::Digraph
    328330  ///\sa ListGraph
    329331  class ListDigraph : public ExtendedListDigraphBase {
     
    360362
    361363    ///\brief Erase a node from the digraph.
    362364    ///
    363     ///This function erases the given node from the digraph.
     365    ///This function erases the given node along with its outgoing and
     366    ///incoming arcs from the digraph.
     367    ///
     368    ///\note All iterators referencing the removed node or the connected
     369    ///arcs are invalidated, of course.
    364370    void erase(Node n) { Parent::erase(n); }
    365371
    366372    ///\brief Erase an arc from the digraph.
    367373    ///
    368374    ///This function erases the given arc from the digraph.
     375    ///
     376    ///\note All iterators referencing the removed arc are invalidated,
     377    ///of course.
    369378    void erase(Arc a) { Parent::erase(a); }
    370379
    371380    /// Node validity check
     
    510519
    511520    ///This function erases all nodes and arcs from the digraph.
    512521    ///
     522    ///\note All iterators of the digraph are invalidated, of course.
    513523    void clear() {
    514524      Parent::clear();
    515525    }
     
    11791189  ///Most of its member functions and nested classes are documented
    11801190  ///only in the concept class.
    11811191  ///
     1192  ///This class provides only linear time counting for nodes, edges and arcs.
     1193  ///
    11821194  ///\sa concepts::Graph
    11831195  ///\sa ListDigraph
    11841196  class ListGraph : public ExtendedListGraphBase {
     
    12171229
    12181230    ///\brief Erase a node from the graph.
    12191231    ///
    1220     /// This function erases the given node from the graph.
     1232    /// This function erases the given node along with its incident arcs
     1233    /// from the graph.
     1234    ///
     1235    /// \note All iterators referencing the removed node or the incident
     1236    /// edges are invalidated, of course.
    12211237    void erase(Node n) { Parent::erase(n); }
    12221238
    12231239    ///\brief Erase an edge from the graph.
    12241240    ///
    12251241    /// This function erases the given edge from the graph.
     1242    ///
     1243    /// \note All iterators referencing the removed edge are invalidated,
     1244    /// of course.
    12261245    void erase(Edge e) { Parent::erase(e); }
    12271246    /// Node validity check
    12281247
     
    13121331
    13131332    ///This function erases all nodes and arcs from the graph.
    13141333    ///
     1334    ///\note All iterators of the graph are invalidated, of course.
    13151335    void clear() {
    13161336      Parent::clear();
    13171337    }
  • lemon/smart_graph.h

    diff --git a/lemon/smart_graph.h b/lemon/smart_graph.h
    a b  
    194194  ///Most of its member functions and nested classes are documented
    195195  ///only in the concept class.
    196196  ///
     197  ///This class provides constant time counting for nodes and arcs.
     198  ///
    197199  ///\sa concepts::Digraph
    198200  ///\sa SmartGraph
    199201  class SmartDigraph : public ExtendedSmartDigraphBase {
     
    620622  /// Most of its member functions and nested classes are documented
    621623  /// only in the concept class.
    622624  ///
     625  /// This class provides constant time counting for nodes, edges and arcs.
     626  ///
    623627  /// \sa concepts::Graph
    624628  /// \sa SmartDigraph
    625629  class SmartGraph : public ExtendedSmartGraphBase {
  • lemon/static_graph.h

    diff --git a/lemon/static_graph.h b/lemon/static_graph.h
    a b  
    292292  /// Most of its member functions and nested classes are documented
    293293  /// only in the concept class.
    294294  ///
     295  /// This class provides constant time counting for nodes and arcs.
     296  ///
    295297  /// \sa concepts::Digraph
    296298  class StaticDigraph : public ExtendedStaticDigraphBase {
    297299  public: