1.1 --- a/doc/Makefile.am Mon Oct 06 11:41:05 2008 +0100
1.2 +++ b/doc/Makefile.am Mon Oct 06 13:02:13 2008 +0100
1.3 @@ -6,6 +6,7 @@
1.4 doc/lgf.dox \
1.5 doc/license.dox \
1.6 doc/mainpage.dox \
1.7 + doc/migration .dox \
1.8 doc/named-param.dox \
1.9 doc/namespaces.dox \
1.10 doc/html \
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/doc/migration.dox Mon Oct 06 13:02:13 2008 +0100
2.3 @@ -0,0 +1,61 @@
2.4 +/* -*- mode: C++; indent-tabs-mode: nil; -*-
2.5 + *
2.6 + * This file is a part of LEMON, a generic C++ optimization library.
2.7 + *
2.8 + * Copyright (C) 2003-2008
2.9 + * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
2.10 + * (Egervary Research Group on Combinatorial Optimization, EGRES).
2.11 + *
2.12 + * Permission to use, modify and distribute this software is granted
2.13 + * provided that this copyright notice appears in all copies. For
2.14 + * precise terms see the accompanying LICENSE file.
2.15 + *
2.16 + * This software is provided "AS IS" with no warranty of any kind,
2.17 + * express or implied, and with no claim as to its suitability for any
2.18 + * purpose.
2.19 + *
2.20 + */
2.21 +
2.22 +/*!
2.23 +
2.24 +\page migration Migration from the 0.x Series
2.25 +
2.26 +This guide gives an in depth description on what has changed compared
2.27 +to the 0.x release series.
2.28 +
2.29 +Many of these changes adjusted automatically by the
2.30 +<tt>script/lemon-0.x-to-1.x.sh</tt> tool. Those requiring manual
2.31 +update are typeset <b>boldface</b>.
2.32 +
2.33 +\section migration-graph Graph Related Name Changes
2.34 +
2.35 +- Directed graphs are called \c Digraph and they have <tt>Arc</tt>s
2.36 + instead of <tt>Edge</tt>s, while the undirected graph is called \c
2.37 + Graph (instead of \c UGraph) and they have <tt>Edge</tt>s (instead
2.38 + of <tt>UEdge</tt>s). This changes reflected thoroughly everywhere in
2.39 + the library. Namely,
2.40 + - \c Graph -> \c Digraph
2.41 + - \c ListGraph -> \c ListDigraph, \c SmartGraph -> \c SmartDigraph etc.
2.42 + - \c UGraph -> \c Graph
2.43 + - \c ListUGraph -> \c ListGraph, \c SmartUGraph -> \c SmartGraph etc.
2.44 + - \c Edge -> \c Arc
2.45 + - \c UEdge -> \c Edge
2.46 + - \c EdgeMap -> \c ArcMap
2.47 + - \c UEdgeMap -> \c EdgeMap
2.48 + - Class names and function names containing the words \e edge or \e arc
2.49 + should also be updated.
2.50 +- <b>The two endpoints of an (\e undirected) \c Edge can be obtained by the
2.51 + <tt>u()</tt> and <tt>v()</tt> member function of the graph class
2.52 + (instead of <tt>source()</tt> and <tt>target()</tt>). This change
2.53 + must be done by hand.</b>
2.54 + \n Of course, you can still use <tt>source()</tt> and <tt>target()</tt>
2.55 + for <tt>Arc</tt>s (directed edges).
2.56 +
2.57 +\section migration-lgf LGF tools
2.58 +
2.59 +\section migration-search BFS, DFS and Dijkstra
2.60 +
2.61 +\section migration-error Exceptions and Debug tools
2.62 +
2.63 +\section migration-other Others
2.64 +*/
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
3.2 +++ b/scripts/lemon-0.x-to-1.x.sh Mon Oct 06 13:02:13 2008 +0100
3.3 @@ -0,0 +1,52 @@
3.4 +#!/bin/bash
3.5 +
3.6 +set -e
3.7 +
3.8 +if [ $# -eq 0 -o x$1 = "x-h" -o x$1 = "x-help" -o x$1 = "x--help" ]; then
3.9 + echo "Usage:"
3.10 + echo " $0 source-file"
3.11 + exit
3.12 +fi
3.13 +
3.14 +TMP=`mktemp`
3.15 +
3.16 +sed -e "s/bipartite undirected graph/bipartite graph/g"\
3.17 + -e "s/undirected graph/_gr_aph_label_/g"\
3.18 + -e "s/undirected edge/_ed_ge_label_/g"\
3.19 + -e "s/graph_/_gr_aph_label__/g"\
3.20 + -e "s/_graph/__gr_aph_label_/g"\
3.21 + -e "s/UGraph/_Gr_aph_label_/g"\
3.22 + -e "s/uGraph/_gr_aph_label_/g"\
3.23 + -e "s/ugraph/_gr_aph_label_/g"\
3.24 + -e "s/Graph/_Digr_aph_label_/g"\
3.25 + -e "s/graph/_digr_aph_label_/g"\
3.26 + -e "s/UEdge/_Ed_ge_label_/g"\
3.27 + -e "s/uEdge/_ed_ge_label_/g"\
3.28 + -e "s/uedge/_ed_ge_label_/g"\
3.29 + -e "s/IncEdgeIt/_In_cEd_geIt_label_/g"\
3.30 + -e "s/Edge/_Ar_c_label_/g"\
3.31 + -e "s/edge/_ar_c_label_/g"\
3.32 + -e "s/ANode/_Re_d_label_/g"\
3.33 + -e "s/BNode/_Blu_e_label_/g"\
3.34 + -e "s/A-Node/_Re_d_label_/g"\
3.35 + -e "s/B-Node/_Blu_e_label_/g"\
3.36 + -e "s/anode/_re_d_label_/g"\
3.37 + -e "s/bnode/_blu_e_label_/g"\
3.38 + -e "s/aNode/_re_d_label_/g"\
3.39 + -e "s/bNode/_blu_e_label_/g"\
3.40 + -e "s/_Digr_aph_label_/Digraph/g"\
3.41 + -e "s/_digr_aph_label_/digraph/g"\
3.42 + -e "s/_Gr_aph_label_/Graph/g"\
3.43 + -e "s/_gr_aph_label_/graph/g"\
3.44 + -e "s/_Ar_c_label_/Arc/g"\
3.45 + -e "s/_ar_c_label_/arc/g"\
3.46 + -e "s/_Ed_ge_label_/Edge/g"\
3.47 + -e "s/_ed_ge_label_/edge/g"\
3.48 + -e "s/_In_cEd_geIt_label_/IncEdgeIt/g"\
3.49 + -e "s/_Re_d_label_/Red/g"\
3.50 + -e "s/_Blu_e_label_/Blue/g"\
3.51 + -e "s/_re_d_label_/red/g"\
3.52 + -e "s/_blu_e_label_/blue/g"\
3.53 +<$1 > $TMP
3.54 +
3.55 +mv $TMP $1
3.56 \ No newline at end of file