0
3
0
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 |
|
9 |
doc/migration.dox \ |
|
10 | 10 |
doc/named-param.dox \ |
11 | 11 |
doc/namespaces.dox \ |
12 | 12 |
doc/html \ |
13 | 13 |
doc/CMakeLists.txt |
14 | 14 |
|
15 | 15 |
DOC_EPS_IMAGES18 = \ |
16 | 16 |
nodeshape_0.eps \ |
17 | 17 |
nodeshape_1.eps \ |
18 | 18 |
nodeshape_2.eps \ |
19 | 19 |
nodeshape_3.eps \ |
20 | 20 |
nodeshape_4.eps |
21 | 21 |
... | ... |
@@ -7,55 +7,99 @@ |
7 | 7 |
* (Egervary Research Group on Combinatorial Optimization, EGRES). |
8 | 8 |
* |
9 | 9 |
* Permission to use, modify and distribute this software is granted |
10 | 10 |
* provided that this copyright notice appears in all copies. For |
11 | 11 |
* precise terms see the accompanying LICENSE file. |
12 | 12 |
* |
13 | 13 |
* This software is provided "AS IS" with no warranty of any kind, |
14 | 14 |
* express or implied, and with no claim as to its suitability for any |
15 | 15 |
* purpose. |
16 | 16 |
* |
17 | 17 |
*/ |
18 | 18 |
|
19 |
namespace lemon { |
|
19 | 20 |
/*! |
20 | 21 |
|
21 | 22 |
\page migration Migration from the 0.x Series |
22 | 23 |
|
23 | 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 | 27 |
Many of these changes adjusted automatically by the |
27 | 28 |
<tt>script/lemon-0.x-to-1.x.sh</tt> tool. Those requiring manual |
28 | 29 |
update are typeset <b>boldface</b>. |
29 | 30 |
|
30 | 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 |
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 |
|
33 |
- \ref concepts::Digraph "Directed graphs" are called \c Digraph and |
|
34 |
they have <tt>Arc</tt>s (instead of <tt>Edge</tt>s), while |
|
35 |
\ref concepts::Graph "undirected graphs" are called \c Graph |
|
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 | 38 |
the library. Namely, |
37 | 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 | 41 |
- \c UGraph -> \c Graph |
40 | 42 |
- \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. |
|
43 |
- \c Edge -> \c Arc, \c UEdge -> \c Edge |
|
44 |
- \c EdgeMap -> \c ArcMap, \c UEdgeMap -> \c EdgeMap |
|
45 |
- \c EdgeIt -> \c ArcIt, \c UEdgeIt -> \c EdgeIt |
|
46 |
- Class names and function names containing the words \c graph, |
|
47 |
\c ugraph, \e edge or \e arc should also be updated. |
|
47 | 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 |
|
49 |
<tt>u()</tt> and <tt>v()</tt> member function of the graph |
|
49 | 50 |
(instead of <tt>source()</tt> and <tt>target()</tt>). This change |
50 | 51 |
must be done by hand.</b> |
51 | 52 |
\n Of course, you can still use <tt>source()</tt> and <tt>target()</tt> |
52 | 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 | 60 |
\section migration-lgf LGF tools |
55 | 61 |
|
56 | 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 | 78 |
\section migration-error Exceptions and Debug tools |
59 | 79 |
|
60 | 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 |
} |
1 | 1 |
#!/bin/bash |
2 | 2 |
|
3 | 3 |
set -e |
4 | 4 |
|
5 | 5 |
if [ $# -eq 0 -o x$1 = "x-h" -o x$1 = "x-help" -o x$1 = "x--help" ]; then |
6 | 6 |
echo "Usage:" |
7 | 7 |
echo " $0 source-file" |
8 | 8 |
exit |
9 | 9 |
fi |
10 | 10 |
|
11 | 11 |
TMP=`mktemp` |
12 | 12 |
|
13 |
sed -e "s/bipartite undirected graph/bipartite graph/g"\ |
|
14 |
-e "s/undirected graph/_gr_aph_label_/g"\ |
|
13 |
sed -e "s/undirected graph/_gr_aph_label_/g"\ |
|
15 | 14 |
-e "s/undirected edge/_ed_ge_label_/g"\ |
16 | 15 |
-e "s/graph_/_gr_aph_label__/g"\ |
17 | 16 |
-e "s/_graph/__gr_aph_label_/g"\ |
18 | 17 |
-e "s/UGraph/_Gr_aph_label_/g"\ |
19 | 18 |
-e "s/uGraph/_gr_aph_label_/g"\ |
20 | 19 |
-e "s/ugraph/_gr_aph_label_/g"\ |
21 | 20 |
-e "s/Graph/_Digr_aph_label_/g"\ |
22 | 21 |
-e "s/graph/_digr_aph_label_/g"\ |
23 | 22 |
-e "s/UEdge/_Ed_ge_label_/g"\ |
24 | 23 |
-e "s/uEdge/_ed_ge_label_/g"\ |
25 | 24 |
-e "s/uedge/_ed_ge_label_/g"\ |
26 | 25 |
-e "s/IncEdgeIt/_In_cEd_geIt_label_/g"\ |
... | ... |
@@ -38,15 +37,91 @@ |
38 | 37 |
-e "s/_digr_aph_label_/digraph/g"\ |
39 | 38 |
-e "s/_Gr_aph_label_/Graph/g"\ |
40 | 39 |
-e "s/_gr_aph_label_/graph/g"\ |
41 | 40 |
-e "s/_Ar_c_label_/Arc/g"\ |
42 | 41 |
-e "s/_ar_c_label_/arc/g"\ |
43 | 42 |
-e "s/_Ed_ge_label_/Edge/g"\ |
44 | 43 |
-e "s/_ed_ge_label_/edge/g"\ |
45 | 44 |
-e "s/_In_cEd_geIt_label_/IncEdgeIt/g"\ |
46 | 45 |
-e "s/_Re_d_label_/Red/g"\ |
47 | 46 |
-e "s/_Blu_e_label_/Blue/g"\ |
48 | 47 |
-e "s/_re_d_label_/red/g"\ |
49 | 48 |
-e "s/_blu_e_label_/blue/g"\ |
49 |
-e "s/\(\W\)DefPredMap\(\W\)/\1SetPredMap\2/g"\ |
|
50 |
-e "s/\(\W\)DefPredMap$/\1SetPredMap/g"\ |
|
51 |
-e "s/^DefPredMap\(\W\)/SetPredMap\1/g"\ |
|
52 |
-e "s/^DefPredMap$/SetPredMap/g"\ |
|
53 |
-e "s/\(\W\)DefDistMap\(\W\)/\1SetDistMap\2/g"\ |
|
54 |
-e "s/\(\W\)DefDistMap$/\1SetDistMap/g"\ |
|
55 |
-e "s/^DefDistMap\(\W\)/SetDistMap\1/g"\ |
|
56 |
-e "s/^DefDistMap$/SetDistMap/g"\ |
|
57 |
-e "s/\(\W\)DefReachedMap\(\W\)/\1SetReachedMap\2/g"\ |
|
58 |
-e "s/\(\W\)DefReachedMap$/\1SetReachedMap/g"\ |
|
59 |
-e "s/^DefReachedMap\(\W\)/SetReachedMap\1/g"\ |
|
60 |
-e "s/^DefReachedMap$/SetReachedMap/g"\ |
|
61 |
-e "s/\(\W\)DefProcessedMap\(\W\)/\1SetProcessedMap\2/g"\ |
|
62 |
-e "s/\(\W\)DefProcessedMap$/\1SetProcessedMap/g"\ |
|
63 |
-e "s/^DefProcessedMap\(\W\)/SetProcessedMap\1/g"\ |
|
64 |
-e "s/^DefProcessedMap$/SetProcessedMap/g"\ |
|
65 |
-e "s/\(\W\)DefHeap\(\W\)/\1SetHeap\2/g"\ |
|
66 |
-e "s/\(\W\)DefHeap$/\1SetHeap/g"\ |
|
67 |
-e "s/^DefHeap\(\W\)/SetHeap\1/g"\ |
|
68 |
-e "s/^DefHeap$/SetHeap/g"\ |
|
69 |
-e "s/\(\W\)DefStandardHeap\(\W\)/\1SetStandradHeap\2/g"\ |
|
70 |
-e "s/\(\W\)DefStandardHeap$/\1SetStandradHeap/g"\ |
|
71 |
-e "s/^DefStandardHeap\(\W\)/SetStandradHeap\1/g"\ |
|
72 |
-e "s/^DefStandardHeap$/SetStandradHeap/g"\ |
|
73 |
-e "s/\(\W\)DefOperationTraits\(\W\)/\1SetOperationTraits\2/g"\ |
|
74 |
-e "s/\(\W\)DefOperationTraits$/\1SetOperationTraits/g"\ |
|
75 |
-e "s/^DefOperationTraits\(\W\)/SetOperationTraits\1/g"\ |
|
76 |
-e "s/^DefOperationTraits$/SetOperationTraits/g"\ |
|
77 |
-e "s/\(\W\)DefProcessedMapToBeDefaultMap\(\W\)/\1SetStandardProcessedMap\2/g"\ |
|
78 |
-e "s/\(\W\)DefProcessedMapToBeDefaultMap$/\1SetStandardProcessedMap/g"\ |
|
79 |
-e "s/^DefProcessedMapToBeDefaultMap\(\W\)/SetStandardProcessedMap\1/g"\ |
|
80 |
-e "s/^DefProcessedMapToBeDefaultMap$/SetStandardProcessedMap/g"\ |
|
81 |
-e "s/\(\W\)IntegerMap\(\W\)/\1RangeMap\2/g"\ |
|
82 |
-e "s/\(\W\)IntegerMap$/\1RangeMap/g"\ |
|
83 |
-e "s/^IntegerMap\(\W\)/RangeMap\1/g"\ |
|
84 |
-e "s/^IntegerMap$/RangeMap/g"\ |
|
85 |
-e "s/\(\W\)integerMap\(\W\)/\1rangeMap\2/g"\ |
|
86 |
-e "s/\(\W\)integerMap$/\1rangeMap/g"\ |
|
87 |
-e "s/^integerMap\(\W\)/rangeMap\1/g"\ |
|
88 |
-e "s/^integerMap$/rangeMap/g"\ |
|
89 |
-e "s/\(\W\)copyGraph\(\W\)/\1graphCopy\2/g"\ |
|
90 |
-e "s/\(\W\)copyGraph$/\1graphCopy/g"\ |
|
91 |
-e "s/^copyGraph\(\W\)/graphCopy\1/g"\ |
|
92 |
-e "s/^copyGraph$/graphCopy/g"\ |
|
93 |
-e "s/\(\W\)copyDigraph\(\W\)/\1digraphCopy\2/g"\ |
|
94 |
-e "s/\(\W\)copyDigraph$/\1digraphCopy/g"\ |
|
95 |
-e "s/^copyDigraph\(\W\)/digraphCopy\1/g"\ |
|
96 |
-e "s/^copyDigraph$/digraphCopy/g"\ |
|
97 |
-e "s/\(\W\)\([sS]\)tdMap\(\W\)/\1\2parseMap\3/g"\ |
|
98 |
-e "s/\(\W\)\([sS]\)tdMap$/\1\2parseMap/g"\ |
|
99 |
-e "s/^\([sS]\)tdMap\(\W\)/\1parseMap\2/g"\ |
|
100 |
-e "s/^\([sS]\)tdMap$/\1parseMap/g"\ |
|
101 |
-e "s/\(\W\)\([Ff]\)unctorMap\(\W\)/\1\2unctorToMap\3/g"\ |
|
102 |
-e "s/\(\W\)\([Ff]\)unctorMap$/\1\2unctorToMap/g"\ |
|
103 |
-e "s/^\([Ff]\)unctorMap\(\W\)/\1unctorToMap\2/g"\ |
|
104 |
-e "s/^\([Ff]\)unctorMap$/\1unctorToMap/g"\ |
|
105 |
-e "s/\(\W\)\([Mm]\)apFunctor\(\W\)/\1\2apToFunctor\3/g"\ |
|
106 |
-e "s/\(\W\)\([Mm]\)apFunctor$/\1\2apToFunctor/g"\ |
|
107 |
-e "s/^\([Mm]\)apFunctor\(\W\)/\1apToFunctor\2/g"\ |
|
108 |
-e "s/^\([Mm]\)apFunctor$/\1apToFunctor/g"\ |
|
109 |
-e "s/\(\W\)\([Ff]\)orkWriteMap\(\W\)/\1\2orkMap\3/g"\ |
|
110 |
-e "s/\(\W\)\([Ff]\)orkWriteMap$/\1\2orkMap/g"\ |
|
111 |
-e "s/^\([Ff]\)orkWriteMap\(\W\)/\1orkMap\2/g"\ |
|
112 |
-e "s/^\([Ff]\)orkWriteMap$/\1orkMap/g"\ |
|
113 |
-e "s/\(\W\)StoreBoolMap\(\W\)/\1LoggerBoolMap\2/g"\ |
|
114 |
-e "s/\(\W\)StoreBoolMap$/\1LoggerBoolMap/g"\ |
|
115 |
-e "s/^StoreBoolMap\(\W\)/LoggerBoolMap\1/g"\ |
|
116 |
-e "s/^StoreBoolMap$/LoggerBoolMap/g"\ |
|
117 |
-e "s/\(\W\)storeBoolMap\(\W\)/\1loggerBoolMap\2/g"\ |
|
118 |
-e "s/\(\W\)storeBoolMap$/\1loggerBoolMap/g"\ |
|
119 |
-e "s/^storeBoolMap\(\W\)/loggerBoolMap\1/g"\ |
|
120 |
-e "s/^storeBoolMap$/loggerBoolMap/g"\ |
|
121 |
-e "s/\(\W\)BoundingBox\(\W\)/\1Box\2/g"\ |
|
122 |
-e "s/\(\W\)BoundingBox$/\1Box/g"\ |
|
123 |
-e "s/^BoundingBox\(\W\)/Box\1/g"\ |
|
124 |
-e "s/^BoundingBox$/Box/g"\ |
|
50 | 125 |
<$1 > $TMP |
51 | 126 |
|
52 | 127 |
mv $TMP $1 |
... | ... |
No newline at end of file |
0 comments (0 inline)