gravatar
alpar (Alpar Juttner)
alpar@cs.elte.hu
0.x -> 1.x migration script and guide (preliminary version) (#157)
0 1 2
default
3 files changed with 114 insertions and 0 deletions:
↑ Collapse diff ↑
Ignore white space 24 line context
1
/* -*- mode: C++; indent-tabs-mode: nil; -*-
2
 *
3
 * This file is a part of LEMON, a generic C++ optimization library.
4
 *
5
 * Copyright (C) 2003-2008
6
 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
7
 * (Egervary Research Group on Combinatorial Optimization, EGRES).
8
 *
9
 * Permission to use, modify and distribute this software is granted
10
 * provided that this copyright notice appears in all copies. For
11
 * precise terms see the accompanying LICENSE file.
12
 *
13
 * This software is provided "AS IS" with no warranty of any kind,
14
 * express or implied, and with no claim as to its suitability for any
15
 * purpose.
16
 *
17
 */
18

	
19
/*!
20

	
21
\page migration Migration from the 0.x Series
22

	
23
This guide gives an in depth description on what has changed compared
24
to the 0.x release series. 
25

	
26
Many of these changes adjusted automatically by the
27
<tt>script/lemon-0.x-to-1.x.sh</tt> tool. Those requiring manual
28
update are typeset <b>boldface</b>.
29

	
30
\section migration-graph Graph Related Name Changes
31

	
32
- Directed graphs are called \c Digraph and they have <tt>Arc</tt>s
33
  instead of <tt>Edge</tt>s, while the undirected graph is called \c
34
  Graph (instead of \c UGraph) and they have <tt>Edge</tt>s (instead
35
  of <tt>UEdge</tt>s). This changes reflected thoroughly everywhere in
36
  the library. Namely,
37
  - \c Graph -> \c Digraph
38
    - \c ListGraph -> \c ListDigraph, \c SmartGraph -> \c SmartDigraph etc.
39
  - \c UGraph -> \c Graph
40
    - \c ListUGraph -> \c ListGraph, \c SmartUGraph -> \c SmartGraph etc.
41
  - \c Edge -> \c Arc
42
  - \c UEdge -> \c Edge
43
  - \c EdgeMap -> \c ArcMap
44
  - \c UEdgeMap -> \c EdgeMap
45
  - Class names and function names containing the words \e edge or \e arc
46
    should also be updated.
47
- <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
  (instead of <tt>source()</tt> and <tt>target()</tt>). This change
50
  must be done by hand.</b>
51
  \n Of course, you can still use <tt>source()</tt> and <tt>target()</tt>
52
  for <tt>Arc</tt>s (directed edges).
53

	
54
\section migration-lgf LGF tools
55

	
56
\section migration-search BFS, DFS and Dijkstra
57

	
58
\section migration-error Exceptions and Debug tools
59

	
60
\section migration-other Others
61
*/
Ignore white space 24 line context
1
#!/bin/bash
2

	
3
set -e
4

	
5
if [ $# -eq 0 -o x$1 = "x-h" -o x$1 = "x-help" -o x$1 = "x--help" ]; then
6
	echo "Usage:"
7
	echo "  $0 source-file"
8
	exit
9
fi
10

	
11
TMP=`mktemp`
12

	
13
sed -e "s/bipartite undirected graph/bipartite graph/g"\
14
	-e "s/undirected graph/_gr_aph_label_/g"\
15
	-e "s/undirected edge/_ed_ge_label_/g"\
16
	-e "s/graph_/_gr_aph_label__/g"\
17
	-e "s/_graph/__gr_aph_label_/g"\
18
	-e "s/UGraph/_Gr_aph_label_/g"\
19
	-e "s/uGraph/_gr_aph_label_/g"\
20
	-e "s/ugraph/_gr_aph_label_/g"\
21
	-e "s/Graph/_Digr_aph_label_/g"\
22
	-e "s/graph/_digr_aph_label_/g"\
23
	-e "s/UEdge/_Ed_ge_label_/g"\
24
	-e "s/uEdge/_ed_ge_label_/g"\
25
	-e "s/uedge/_ed_ge_label_/g"\
26
	-e "s/IncEdgeIt/_In_cEd_geIt_label_/g"\
27
	-e "s/Edge/_Ar_c_label_/g"\
28
	-e "s/edge/_ar_c_label_/g"\
29
	-e "s/ANode/_Re_d_label_/g"\
30
	-e "s/BNode/_Blu_e_label_/g"\
31
	-e "s/A-Node/_Re_d_label_/g"\
32
	-e "s/B-Node/_Blu_e_label_/g"\
33
	-e "s/anode/_re_d_label_/g"\
34
	-e "s/bnode/_blu_e_label_/g"\
35
	-e "s/aNode/_re_d_label_/g"\
36
	-e "s/bNode/_blu_e_label_/g"\
37
	-e "s/_Digr_aph_label_/Digraph/g"\
38
	-e "s/_digr_aph_label_/digraph/g"\
39
	-e "s/_Gr_aph_label_/Graph/g"\
40
	-e "s/_gr_aph_label_/graph/g"\
41
	-e "s/_Ar_c_label_/Arc/g"\
42
	-e "s/_ar_c_label_/arc/g"\
43
	-e "s/_Ed_ge_label_/Edge/g"\
44
	-e "s/_ed_ge_label_/edge/g"\
45
	-e "s/_In_cEd_geIt_label_/IncEdgeIt/g"\
46
	-e "s/_Re_d_label_/Red/g"\
47
	-e "s/_Blu_e_label_/Blue/g"\
48
	-e "s/_re_d_label_/red/g"\
49
	-e "s/_blu_e_label_/blue/g"\
50
<$1 > $TMP
51

	
52
mv $TMP $1
... ...
 No newline at end of file
Ignore white space 24 line context
1 1
EXTRA_DIST += \
2 2
	doc/Doxyfile.in \
3 3
	doc/coding_style.dox \
4 4
	doc/dirs.dox \
5 5
	doc/groups.dox \
6 6
	doc/lgf.dox \
7 7
	doc/license.dox \
8 8
	doc/mainpage.dox \
9
	doc/migration	.dox \
9 10
	doc/named-param.dox \
10 11
	doc/namespaces.dox \
11 12
	doc/html \
12 13
	doc/CMakeLists.txt
13 14

	
14 15
DOC_EPS_IMAGES18 = \
15 16
	nodeshape_0.eps \
16 17
	nodeshape_1.eps \
17 18
	nodeshape_2.eps \
18 19
	nodeshape_3.eps \
19 20
	nodeshape_4.eps
20 21

	
0 comments (0 inline)