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