doc/migration.dox
changeset 306 2bf7c645d5a6
parent 305 069f27927ba9
child 307 47ec522b838e
equal deleted inserted replaced
0:effbff8e803f 1:2f17e8c4d2c9
    14  * express or implied, and with no claim as to its suitability for any
    14  * express or implied, and with no claim as to its suitability for any
    15  * purpose.
    15  * purpose.
    16  *
    16  *
    17  */
    17  */
    18 
    18 
       
    19 namespace lemon {
    19 /*!
    20 /*!
    20 
    21 
    21 \page migration Migration from the 0.x Series
    22 \page migration Migration from the 0.x Series
    22 
    23 
    23 This guide gives an in depth description on what has changed compared
    24 This guide gives an in depth description on what has changed compared
    24 to the 0.x release series. 
    25 to the 0.x release series.
    25 
    26 
    26 Many of these changes adjusted automatically by the
    27 Many of these changes adjusted automatically by the
    27 <tt>script/lemon-0.x-to-1.x.sh</tt> tool. Those requiring manual
    28 <tt>script/lemon-0.x-to-1.x.sh</tt> tool. Those requiring manual
    28 update are typeset <b>boldface</b>.
    29 update are typeset <b>boldface</b>.
    29 
    30 
    30 \section migration-graph Graph Related Name Changes
    31 \section migration-graph Graph Related Name Changes
    31 
    32 
    32 - Directed graphs are called \c Digraph and they have <tt>Arc</tt>s
    33 - \ref concepts::Digraph "Directed graphs" are called \c Digraph and
    33   instead of <tt>Edge</tt>s, while the undirected graph is called \c
    34   they have <tt>Arc</tt>s (instead of <tt>Edge</tt>s), while
    34   Graph (instead of \c UGraph) and they have <tt>Edge</tt>s (instead
    35   \ref concepts::Graph "undirected graphs" are called \c Graph
    35   of <tt>UEdge</tt>s). This changes reflected thoroughly everywhere in
    36   (instead of \c UGraph) and they have <tt>Edge</tt>s (instead of
       
    37   <tt>UEdge</tt>s). These changes reflected thoroughly everywhere in
    36   the library. Namely,
    38   the library. Namely,
    37   - \c Graph -> \c Digraph
    39   - \c Graph -> \c Digraph
    38     - \c ListGraph -> \c ListDigraph, \c SmartGraph -> \c SmartDigraph etc.
    40     - \c %ListGraph -> \c ListDigraph, \c %SmartGraph -> \c SmartDigraph etc.
    39   - \c UGraph -> \c Graph
    41   - \c UGraph -> \c Graph
    40     - \c ListUGraph -> \c ListGraph, \c SmartUGraph -> \c SmartGraph etc.
    42     - \c ListUGraph -> \c ListGraph, \c SmartUGraph -> \c SmartGraph etc.
    41   - \c Edge -> \c Arc
    43   - \c Edge -> \c Arc, \c UEdge -> \c Edge
    42   - \c UEdge -> \c Edge
    44   - \c EdgeMap -> \c ArcMap, \c UEdgeMap -> \c EdgeMap
    43   - \c EdgeMap -> \c ArcMap
    45   - \c EdgeIt -> \c ArcIt, \c UEdgeIt -> \c EdgeIt
    44   - \c UEdgeMap -> \c EdgeMap
    46   - Class names and function names containing the words \c graph,
    45   - Class names and function names containing the words \e edge or \e arc
    47     \c ugraph, \e edge or \e arc should also be updated.
    46     should also be updated.
       
    47 - <b>The two endpoints of an (\e undirected) \c Edge can be obtained by the
    48 - <b>The two endpoints of an (\e undirected) \c Edge can be obtained by the
    48   <tt>u()</tt> and <tt>v()</tt> member function of the graph class
    49   <tt>u()</tt> and <tt>v()</tt> member function of the graph
    49   (instead of <tt>source()</tt> and <tt>target()</tt>). This change
    50   (instead of <tt>source()</tt> and <tt>target()</tt>). This change
    50   must be done by hand.</b>
    51   must be done by hand.</b>
    51   \n Of course, you can still use <tt>source()</tt> and <tt>target()</tt>
    52   \n Of course, you can still use <tt>source()</tt> and <tt>target()</tt>
    52   for <tt>Arc</tt>s (directed edges).
    53   for <tt>Arc</tt>s (directed edges).
    53 
    54 
       
    55 \warning
       
    56 <b>The <tt>script/lemon-0.x-to-1.x.sh</tt> tool replaces all instances of
       
    57 the words \c graph, \c digraph, \c edge and \c arc, so it replaces them
       
    58 in strings, comments etc. as well as in all identifiers.</b>
       
    59 
    54 \section migration-lgf LGF tools
    60 \section migration-lgf LGF tools
    55 
    61 
    56 \section migration-search BFS, DFS and Dijkstra
    62 \section migration-search BFS, DFS and Dijkstra
       
    63 - <b>Using the function interface of BFS, DFS and %Dijkstra both source and
       
    64   target nodes can be given as parameters of the <tt>run()</tt> function
       
    65   (instead of \c bfs(), \c dfs() or \c dijkstra() itself).</b>
       
    66 - \ref named-templ-param "Named class template parameters" of \c Bfs,
       
    67   \c Dfs, \c Dijkstra, \c BfsVisit, \c DfsVisit are renamed to start
       
    68   with "Set" instead of "Def". Namely,
       
    69   - \c DefPredMap -> \c SetPredMap
       
    70   - \c DefDistMap -> \c SetDistMap
       
    71   - \c DefReachedMap -> \c SetReachedMap
       
    72   - \c DefProcessedMap -> \c SetProcessedMap
       
    73   - \c DefHeap -> \c SetHeap
       
    74   - \c DefStandardHeap -> \c SetStandardHeap
       
    75   - \c DefOperationTraits -> \c SetOperationTraits
       
    76   - \c DefProcessedMapToBeDefaultMap -> \c SetStandardProcessedMap
    57 
    77 
    58 \section migration-error Exceptions and Debug tools
    78 \section migration-error Exceptions and Debug tools
    59 
    79 
    60 \section migration-other Others
    80 \section migration-other Others
       
    81 - <b>The contents of <tt>graph_utils.h</tt> are moved to <tt>core.h</tt>
       
    82   and <tt>maps.h</tt>. <tt>core.h</tt> is included by all graph types,
       
    83   therefore it usually do not have to be included directly.</b>
       
    84 - <b><tt>path_utils.h</tt> is merged to \c path.h.</b>
       
    85 - <b>The parameters of the graph copying tools (i.e. \c GraphCopy,
       
    86   \c DigraphCopy) have to be given in the from-to order.</b>
       
    87 - \c copyDigraph() and \c copyGraph() are renamed to \c digraphCopy()
       
    88   and \c graphCopy(), respectively.
       
    89 - The of
       
    90  - DefXyzMap --> SetXyzMap
       
    91  - DefHeap --> SetHeap
       
    92  - DefStandardHeap --> SetStandardHeap
       
    93  - DefOperationTraits --> SetOperationTraits
       
    94  - DefProcessedMapToBeDefaultMap --> SetStandardProcessedMap
       
    95 - Some map types should also been renamed. Namely,
       
    96   - \c IntegerMap -> \c RangeMap
       
    97   - \c StdMap -> \c SparseMap
       
    98   - \c FunctorMap -> \c FunctorToMap
       
    99   - \c MapFunctor -> \c MapToFunctor
       
   100   - \c ForkWriteMap -> \c ForkMap
       
   101   - \c StoreBoolMap -> \c LoggerBoolMap
       
   102 - \c dim2::BoundingBox -> \c dim2::Box
       
   103 
    61 */
   104 */
       
   105 }