1
38
2
1
1
4
14
35
48
1
1
46
46
13
13
46
46
34
34
19
35
48
68
45
67
130
124
1
1
| 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 |
namespace lemon {
|
|
| 20 |
/*! |
|
| 21 |
|
|
| 22 |
\page migration Migration from the 0.x Series |
|
| 23 |
|
|
| 24 |
This guide gives an in depth description on what has changed compared |
|
| 25 |
to the 0.x release series. |
|
| 26 |
|
|
| 27 |
Many of these changes adjusted automatically by the |
|
| 28 |
<tt>script/lemon-0.x-to-1.x.sh</tt> tool. Those requiring manual |
|
| 29 |
update are typeset <b>boldface</b>. |
|
| 30 |
|
|
| 31 |
\section migration-graph Graph Related Name Changes |
|
| 32 |
|
|
| 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 |
|
| 38 |
the library. Namely, |
|
| 39 |
- \c Graph -> \c Digraph |
|
| 40 |
- \c %ListGraph -> \c ListDigraph, \c %SmartGraph -> \c SmartDigraph etc. |
|
| 41 |
- \c UGraph -> \c Graph |
|
| 42 |
- \c ListUGraph -> \c ListGraph, \c SmartUGraph -> \c SmartGraph etc. |
|
| 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. |
|
| 48 |
- <b>The two endpoints of an (\e undirected) \c Edge can be obtained by the |
|
| 49 |
<tt>u()</tt> and <tt>v()</tt> member function of the graph |
|
| 50 |
(instead of <tt>source()</tt> and <tt>target()</tt>). This change |
|
| 51 |
must be done by hand.</b> |
|
| 52 |
\n Of course, you can still use <tt>source()</tt> and <tt>target()</tt> |
|
| 53 |
for <tt>Arc</tt>s (directed edges). |
|
| 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 |
|
|
| 60 |
\section migration-lgf LGF tools |
|
| 61 |
- The \ref lgf-format "LGF file format" has changed, |
|
| 62 |
<tt>\@nodeset</tt> has changed to <tt>\@nodes</tt>, |
|
| 63 |
<tt>\@edgeset</tt> and <tt>\@uedgeset</tt> to <tt>\@arcs</tt> or |
|
| 64 |
<tt>\@edges</tt>, which become completely equivalents. The |
|
| 65 |
<tt>\@nodes</tt>, <tt>\@edges</tt> and <tt>\@uedges</tt> sections are |
|
| 66 |
removed from the format, the content of them should be |
|
| 67 |
the part of <tt>\@attributes</tt> section. The data fields in |
|
| 68 |
the sections must follow a strict format, they must be either character |
|
| 69 |
sequences without whitespaces or quoted strings. |
|
| 70 |
- The <tt>LemonReader</tt> and <tt>LemonWriter</tt> core interfaces |
|
| 71 |
are no longer available. |
|
| 72 |
- The implementation of the general section readers and writers has changed |
|
| 73 |
they are simple functors now. Beside the old |
|
| 74 |
stream based section handling, currently line oriented section |
|
| 75 |
reading and writing are also supported. In the |
|
| 76 |
section readers the lines must be counted manually. The sections |
|
| 77 |
should be read and written with the SectionWriter and SectionReader |
|
| 78 |
classes. |
|
| 79 |
- Instead of the item readers and writers, item converters should be |
|
| 80 |
used. The converters are functors, which map the type to |
|
| 81 |
std::string or std::string to the type. The converters for standard |
|
| 82 |
containers hasn't yet been implemented in the new LEMON. The converters |
|
| 83 |
can return strings in any format, because if it is necessary, the LGF |
|
| 84 |
writer and reader will quote and unquote the given value. |
|
| 85 |
- The DigraphReader and DigraphWriter can used similarly to the |
|
| 86 |
0.x series, however the <tt>read</tt> or <tt>write</tt> prefix of |
|
| 87 |
the member functions are removed. |
|
| 88 |
- The new LEMON supports the function like interface, the \c |
|
| 89 |
digraphReader and \c digraphWriter functions are more convenient than |
|
| 90 |
using the classes directly. |
|
| 91 |
|
|
| 92 |
\section migration-search BFS, DFS and Dijkstra |
|
| 93 |
- <b>Using the function interface of BFS, DFS and %Dijkstra both source and |
|
| 94 |
target nodes can be given as parameters of the <tt>run()</tt> function |
|
| 95 |
(instead of \c bfs(), \c dfs() or \c dijkstra() itself).</b> |
|
| 96 |
- \ref named-templ-param "Named class template parameters" of \c Bfs, |
|
| 97 |
\c Dfs, \c Dijkstra, \c BfsVisit, \c DfsVisit are renamed to start |
|
| 98 |
with "Set" instead of "Def". Namely, |
|
| 99 |
- \c DefPredMap -> \c SetPredMap |
|
| 100 |
- \c DefDistMap -> \c SetDistMap |
|
| 101 |
- \c DefReachedMap -> \c SetReachedMap |
|
| 102 |
- \c DefProcessedMap -> \c SetProcessedMap |
|
| 103 |
- \c DefHeap -> \c SetHeap |
|
| 104 |
- \c DefStandardHeap -> \c SetStandardHeap |
|
| 105 |
- \c DefOperationTraits -> \c SetOperationTraits |
|
| 106 |
- \c DefProcessedMapToBeDefaultMap -> \c SetStandardProcessedMap |
|
| 107 |
|
|
| 108 |
\section migration-error Exceptions and Debug tools |
|
| 109 |
|
|
| 110 |
<b>The class hierarchy of exceptions has largely been simplified. Now, |
|
| 111 |
only the i/o related tools may throw exceptions. All other exceptions |
|
| 112 |
have been replaced with either the \c LEMON_ASSERT or the \c LEMON_DEBUG |
|
| 113 |
macros.</b> |
|
| 114 |
|
|
| 115 |
<b>On the other hand, the parameter order of constructors of the |
|
| 116 |
exceptions has been changed. See \ref IoError and \ref FormatError for |
|
| 117 |
more details.</b> |
|
| 118 |
|
|
| 119 |
\section migration-other Others |
|
| 120 |
- <b>The contents of <tt>graph_utils.h</tt> are moved to <tt>core.h</tt> |
|
| 121 |
and <tt>maps.h</tt>. <tt>core.h</tt> is included by all graph types, |
|
| 122 |
therefore it usually do not have to be included directly.</b> |
|
| 123 |
- <b><tt>path_utils.h</tt> is merged to \c path.h.</b> |
|
| 124 |
- <b>The semantic of the assignment operations and copy constructors of maps |
|
| 125 |
are still under discussion. So, you must copy them by hand (i.e. copy |
|
| 126 |
each entry one-by-one)</b> |
|
| 127 |
- <b>The parameters of the graph copying tools (i.e. \c GraphCopy, |
|
| 128 |
\c DigraphCopy) have to be given in the from-to order.</b> |
|
| 129 |
- \c copyDigraph() and \c copyGraph() are renamed to \c digraphCopy() |
|
| 130 |
and \c graphCopy(), respectively. |
|
| 131 |
- <b>The interface of \ref DynArcLookUp has changed. It is now the same as |
|
| 132 |
of \ref ArcLookUp and \ref AllArcLookUp</b> |
|
| 133 |
- Some map types should also been renamed. Namely, |
|
| 134 |
- \c IntegerMap -> \c RangeMap |
|
| 135 |
- \c StdMap -> \c SparseMap |
|
| 136 |
- \c FunctorMap -> \c FunctorToMap |
|
| 137 |
- \c MapFunctor -> \c MapToFunctor |
|
| 138 |
- \c ForkWriteMap -> \c ForkMap |
|
| 139 |
- \c StoreBoolMap -> \c LoggerBoolMap |
|
| 140 |
- \c dim2::BoundingBox -> \c dim2::Box |
|
| 141 |
|
|
| 142 |
*/ |
|
| 143 |
} |
| 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/undirected graph/_gr_aph_label_/g"\ |
|
| 14 |
-e "s/undirected edge/_ed_ge_label_/g"\ |
|
| 15 |
-e "s/graph_/_gr_aph_label__/g"\ |
|
| 16 |
-e "s/_graph/__gr_aph_label_/g"\ |
|
| 17 |
-e "s/UGraph/_Gr_aph_label_/g"\ |
|
| 18 |
-e "s/uGraph/_gr_aph_label_/g"\ |
|
| 19 |
-e "s/ugraph/_gr_aph_label_/g"\ |
|
| 20 |
-e "s/Graph/_Digr_aph_label_/g"\ |
|
| 21 |
-e "s/graph/_digr_aph_label_/g"\ |
|
| 22 |
-e "s/UEdge/_Ed_ge_label_/g"\ |
|
| 23 |
-e "s/uEdge/_ed_ge_label_/g"\ |
|
| 24 |
-e "s/uedge/_ed_ge_label_/g"\ |
|
| 25 |
-e "s/IncEdgeIt/_In_cEd_geIt_label_/g"\ |
|
| 26 |
-e "s/Edge/_Ar_c_label_/g"\ |
|
| 27 |
-e "s/edge/_ar_c_label_/g"\ |
|
| 28 |
-e "s/ANode/_Re_d_label_/g"\ |
|
| 29 |
-e "s/BNode/_Blu_e_label_/g"\ |
|
| 30 |
-e "s/A-Node/_Re_d_label_/g"\ |
|
| 31 |
-e "s/B-Node/_Blu_e_label_/g"\ |
|
| 32 |
-e "s/anode/_re_d_label_/g"\ |
|
| 33 |
-e "s/bnode/_blu_e_label_/g"\ |
|
| 34 |
-e "s/aNode/_re_d_label_/g"\ |
|
| 35 |
-e "s/bNode/_blu_e_label_/g"\ |
|
| 36 |
-e "s/_Digr_aph_label_/Digraph/g"\ |
|
| 37 |
-e "s/_digr_aph_label_/digraph/g"\ |
|
| 38 |
-e "s/_Gr_aph_label_/Graph/g"\ |
|
| 39 |
-e "s/_gr_aph_label_/graph/g"\ |
|
| 40 |
-e "s/_Ar_c_label_/Arc/g"\ |
|
| 41 |
-e "s/_ar_c_label_/arc/g"\ |
|
| 42 |
-e "s/_Ed_ge_label_/Edge/g"\ |
|
| 43 |
-e "s/_ed_ge_label_/edge/g"\ |
|
| 44 |
-e "s/_In_cEd_geIt_label_/IncEdgeIt/g"\ |
|
| 45 |
-e "s/_Re_d_label_/Red/g"\ |
|
| 46 |
-e "s/_Blu_e_label_/Blue/g"\ |
|
| 47 |
-e "s/_re_d_label_/red/g"\ |
|
| 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"\ |
|
| 125 |
<$1 > $TMP |
|
| 126 |
|
|
| 127 |
mv $TMP $1 |
|
| ... | ... |
No newline at end of file |
| ... | ... |
@@ -83,15 +83,2 @@ |
| 83 | 83 |
|
| 84 |
dnl Disable/enable building the benchmarks. |
|
| 85 |
AC_ARG_ENABLE([benchmark], |
|
| 86 |
AS_HELP_STRING([--enable-benchmark], [build the benchmarks]) |
|
| 87 |
AS_HELP_STRING([--disable-benchmark], [do not build the benchmarks @<:@default@:>@]), |
|
| 88 |
[], [enable_benchmark=no]) |
|
| 89 |
AC_MSG_CHECKING([whether to build the benchmarks]) |
|
| 90 |
if test x"$enable_benchmark" != x"no"; then |
|
| 91 |
AC_MSG_RESULT([yes]) |
|
| 92 |
else |
|
| 93 |
AC_MSG_RESULT([no]) |
|
| 94 |
fi |
|
| 95 |
AM_CONDITIONAL([WANT_BENCHMARK], [test x"$enable_benchmark" != x"no"]) |
|
| 96 |
|
|
| 97 | 84 |
dnl Checks for header files. |
| ... | ... |
@@ -134,3 +121,2 @@ |
| 134 | 121 |
#echo |
| 135 |
echo Build benchmarks.............. : $enable_benchmark |
|
| 136 | 122 |
echo Build demo programs........... : $enable_demo |
| ... | ... |
@@ -56,3 +56,5 @@ |
| 56 | 56 |
the best, most graph algorithms and auxiliary data structures can be used |
| 57 |
with any graph |
|
| 57 |
with any graph structure. |
|
| 58 |
|
|
| 59 |
<b>See also:</b> \ref graph_concepts "Graph Structure Concepts". |
|
| 58 | 60 |
*/ |
| ... | ... |
@@ -76,4 +78,6 @@ |
| 76 | 78 |
|
| 77 |
LEMON provides several special purpose maps that e.g. combine |
|
| 79 |
LEMON provides several special purpose maps and map adaptors that e.g. combine |
|
| 78 | 80 |
new maps from existing ones. |
| 81 |
|
|
| 82 |
<b>See also:</b> \ref map_concepts "Map Concepts". |
|
| 79 | 83 |
*/ |
| ... | ... |
@@ -89,3 +93,2 @@ |
| 89 | 93 |
|
| 90 |
|
|
| 91 | 94 |
/** |
| ... | ... |
@@ -106,3 +109,3 @@ |
| 106 | 109 |
type map adaptors can be used comfortable. For example let's see the |
| 107 |
usage of map adaptors with the \c |
|
| 110 |
usage of map adaptors with the \c graphToEps() function. |
|
| 108 | 111 |
\code |
| ... | ... |
@@ -120,3 +123,3 @@ |
| 120 | 123 |
|
| 121 |
|
|
| 124 |
graphToEps(graph, "graph.eps") |
|
| 122 | 125 |
.coords(coords).scaleToA4().undirected() |
| ... | ... |
@@ -126,3 +129,3 @@ |
| 126 | 129 |
The \c functorToMap() function makes an \c int to \c Color map from the |
| 127 |
\ |
|
| 130 |
\c nodeColor() function. The \c composeMap() compose the \c degree_map |
|
| 128 | 131 |
and the previously created map. The composed map is a proper function to |
| ... | ... |
@@ -175,3 +178,2 @@ |
| 175 | 178 |
\sa lemon::concepts::Path |
| 176 |
|
|
| 177 | 179 |
*/ |
| ... | ... |
@@ -187,3 +189,2 @@ |
| 187 | 189 |
|
| 188 |
|
|
| 189 | 190 |
/** |
| ... | ... |
@@ -203,3 +204,3 @@ |
| 203 | 204 |
This group describes the common graph search algorithms like |
| 204 |
Breadth- |
|
| 205 |
Breadth-First Search (BFS) and Depth-First Search (DFS). |
|
| 205 | 206 |
*/ |
| ... | ... |
@@ -207,3 +208,3 @@ |
| 207 | 208 |
/** |
| 208 |
@defgroup shortest_path Shortest Path |
|
| 209 |
@defgroup shortest_path Shortest Path Algorithms |
|
| 209 | 210 |
@ingroup algs |
| ... | ... |
@@ -215,3 +216,3 @@ |
| 215 | 216 |
/** |
| 216 |
@defgroup max_flow Maximum Flow |
|
| 217 |
@defgroup max_flow Maximum Flow Algorithms |
|
| 217 | 218 |
@ingroup algs |
| ... | ... |
@@ -243,3 +244,2 @@ |
| 243 | 244 |
programming problem of the maximum flow. |
| 244 |
|
|
| 245 | 245 |
*/ |
| ... | ... |
@@ -247,3 +247,3 @@ |
| 247 | 247 |
/** |
| 248 |
@defgroup min_cost_flow Minimum Cost Flow |
|
| 248 |
@defgroup min_cost_flow Minimum Cost Flow Algorithms |
|
| 249 | 249 |
@ingroup algs |
| ... | ... |
@@ -257,3 +257,3 @@ |
| 257 | 257 |
/** |
| 258 |
@defgroup min_cut Minimum Cut |
|
| 258 |
@defgroup min_cut Minimum Cut Algorithms |
|
| 259 | 259 |
@ingroup algs |
| ... | ... |
@@ -284,3 +284,2 @@ |
| 284 | 284 |
please see the \ref max_flow "Maximum Flow page". |
| 285 |
|
|
| 286 | 285 |
*/ |
| ... | ... |
@@ -288,3 +287,3 @@ |
| 288 | 287 |
/** |
| 289 |
@defgroup graph_prop Connectivity and |
|
| 288 |
@defgroup graph_prop Connectivity and Other Graph Properties |
|
| 290 | 289 |
@ingroup algs |
| ... | ... |
@@ -300,3 +299,3 @@ |
| 300 | 299 |
/** |
| 301 |
@defgroup planar Planarity |
|
| 300 |
@defgroup planar Planarity Embedding and Drawing |
|
| 302 | 301 |
@ingroup algs |
| ... | ... |
@@ -312,3 +311,3 @@ |
| 312 | 311 |
/** |
| 313 |
@defgroup matching Matching |
|
| 312 |
@defgroup matching Matching Algorithms |
|
| 314 | 313 |
@ingroup algs |
| ... | ... |
@@ -350,3 +349,2 @@ |
| 350 | 349 |
\image latex bipartite_matching.eps "Bipartite Matching" width=\textwidth |
| 351 |
|
|
| 352 | 350 |
*/ |
| ... | ... |
@@ -354,3 +352,3 @@ |
| 354 | 352 |
/** |
| 355 |
@defgroup spantree Minimum Spanning Tree |
|
| 353 |
@defgroup spantree Minimum Spanning Tree Algorithms |
|
| 356 | 354 |
@ingroup algs |
| ... | ... |
@@ -362,5 +360,4 @@ |
| 362 | 360 |
|
| 363 |
|
|
| 364 | 361 |
/** |
| 365 |
@defgroup auxalg Auxiliary |
|
| 362 |
@defgroup auxalg Auxiliary Algorithms |
|
| 366 | 363 |
@ingroup algs |
| ... | ... |
@@ -373,3 +370,4 @@ |
| 373 | 370 |
/** |
| 374 |
@defgroup approx Approximation |
|
| 371 |
@defgroup approx Approximation Algorithms |
|
| 372 |
@ingroup algs |
|
| 375 | 373 |
\brief Approximation algorithms. |
| ... | ... |
@@ -387,3 +385,2 @@ |
| 387 | 385 |
implemented in LEMON. |
| 388 |
|
|
| 389 | 386 |
*/ |
| ... | ... |
@@ -391,3 +388,3 @@ |
| 391 | 388 |
/** |
| 392 |
@defgroup lp_group Lp and Mip |
|
| 389 |
@defgroup lp_group Lp and Mip Solvers |
|
| 393 | 390 |
@ingroup gen_opt_group |
| ... | ... |
@@ -398,3 +395,2 @@ |
| 398 | 395 |
interface. |
| 399 |
|
|
| 400 | 396 |
*/ |
| ... | ... |
@@ -402,3 +398,3 @@ |
| 402 | 398 |
/** |
| 403 |
@defgroup lp_utils Tools for Lp and Mip |
|
| 399 |
@defgroup lp_utils Tools for Lp and Mip Solvers |
|
| 404 | 400 |
@ingroup lp_group |
| ... | ... |
@@ -443,3 +439,3 @@ |
| 443 | 439 |
/** |
| 444 |
@defgroup timecount Time |
|
| 440 |
@defgroup timecount Time Measuring and Counting |
|
| 445 | 441 |
@ingroup misc |
| ... | ... |
@@ -452,11 +448,2 @@ |
| 452 | 448 |
/** |
| 453 |
@defgroup graphbits Tools for Graph Implementation |
|
| 454 |
@ingroup utils |
|
| 455 |
\brief Tools to make it easier to create graphs. |
|
| 456 |
|
|
| 457 |
This group describes the tools that makes it easier to create graphs and |
|
| 458 |
the maps that dynamically update with the graph changes. |
|
| 459 |
*/ |
|
| 460 |
|
|
| 461 |
/** |
|
| 462 | 449 |
@defgroup exceptions Exceptions |
| ... | ... |
@@ -473,4 +460,5 @@ |
| 473 | 460 |
This group describes the tools for importing and exporting graphs |
| 474 |
and graph related data. Now it supports the LEMON format, the |
|
| 475 |
\c DIMACS format and the encapsulated postscript (EPS) format. |
|
| 461 |
and graph related data. Now it supports the \ref lgf-format |
|
| 462 |
"LEMON Graph Format", the \c DIMACS format and the encapsulated |
|
| 463 |
postscript (EPS) format. |
|
| 476 | 464 |
*/ |
| ... | ... |
@@ -480,3 +468,3 @@ |
| 480 | 468 |
@ingroup io_group |
| 481 |
\brief Reading and writing |
|
| 469 |
\brief Reading and writing LEMON Graph Format. |
|
| 482 | 470 |
|
| ... | ... |
@@ -487,3 +475,3 @@ |
| 487 | 475 |
/** |
| 488 |
@defgroup eps_io Postscript |
|
| 476 |
@defgroup eps_io Postscript Exporting |
|
| 489 | 477 |
@ingroup io_group |
| ... | ... |
@@ -495,3 +483,2 @@ |
| 495 | 483 |
|
| 496 |
|
|
| 497 | 484 |
/** |
| ... | ... |
@@ -523,6 +510,4 @@ |
| 523 | 510 |
- Finally, They can serve as a skeleton of a new implementation of a concept. |
| 524 |
|
|
| 525 | 511 |
*/ |
| 526 | 512 |
|
| 527 |
|
|
| 528 | 513 |
/** |
| ... | ... |
@@ -536,6 +521,8 @@ |
| 536 | 521 |
|
| 537 |
/* --- Unused group |
|
| 538 |
@defgroup experimental Experimental Structures and Algorithms |
|
| 539 |
This group describes some Experimental structures and algorithms. |
|
| 540 |
The stuff here is subject to change. |
|
| 522 |
/** |
|
| 523 |
@defgroup map_concepts Map Concepts |
|
| 524 |
@ingroup concept |
|
| 525 |
\brief Skeleton and concept checking classes for maps |
|
| 526 |
|
|
| 527 |
This group describes the skeletons and concept checking classes of maps. |
|
| 541 | 528 |
*/ |
| ... | ... |
@@ -52,3 +52,3 @@ |
| 52 | 52 |
want to see how LEMON works, see |
| 53 |
some \ref demoprograms "demo programs" |
|
| 53 |
some \ref demoprograms "demo programs". |
|
| 54 | 54 |
|
| ... | ... |
@@ -58,3 +58,4 @@ |
| 58 | 58 |
|
| 59 |
|
|
| 59 |
If you are a user of the old (0.x) series of LEMON, please check out the |
|
| 60 |
\ref migration "Migration Guide" for the backward incompatibilities. |
|
| 60 | 61 |
*/ |
| ... | ... |
@@ -28,4 +28,4 @@ |
| 28 | 28 |
|
| 29 |
ArgParser::ArgParser(int argc, const char **argv) :_argc(argc), _argv(argv), |
|
| 30 |
_command_name(argv[0]) {
|
|
| 29 |
ArgParser::ArgParser(int argc, const char * const *argv) |
|
| 30 |
:_argc(argc), _argv(argv), _command_name(argv[0]) {
|
|
| 31 | 31 |
funcOption("-help","Print a short help message",_showHelp,this);
|
| ... | ... |
@@ -33,3 +33,2 @@ |
| 33 | 33 |
synonym("h","-help");
|
| 34 |
|
|
| 35 | 34 |
} |
| ... | ... |
@@ -51,7 +51,7 @@ |
| 51 | 51 |
typedef typename Digraph::template NodeMap<typename Digraph::Arc> PredMap; |
| 52 |
///Instantiates a |
|
| 52 |
///Instantiates a PredMap. |
|
| 53 | 53 |
|
| 54 |
///This function instantiates a |
|
| 54 |
///This function instantiates a PredMap. |
|
| 55 | 55 |
///\param g is the digraph, to which we would like to define the |
| 56 |
/// |
|
| 56 |
///PredMap. |
|
| 57 | 57 |
static PredMap *createPredMap(const Digraph &g) |
| ... | ... |
@@ -66,7 +66,7 @@ |
| 66 | 66 |
typedef NullMap<typename Digraph::Node,bool> ProcessedMap; |
| 67 |
///Instantiates a |
|
| 67 |
///Instantiates a ProcessedMap. |
|
| 68 | 68 |
|
| 69 |
///This function instantiates a |
|
| 69 |
///This function instantiates a ProcessedMap. |
|
| 70 | 70 |
///\param g is the digraph, to which |
| 71 |
///we would like to define the |
|
| 71 |
///we would like to define the ProcessedMap |
|
| 72 | 72 |
#ifdef DOXYGEN |
| ... | ... |
@@ -85,7 +85,7 @@ |
| 85 | 85 |
typedef typename Digraph::template NodeMap<bool> ReachedMap; |
| 86 |
///Instantiates a |
|
| 86 |
///Instantiates a ReachedMap. |
|
| 87 | 87 |
|
| 88 |
///This function instantiates a |
|
| 88 |
///This function instantiates a ReachedMap. |
|
| 89 | 89 |
///\param g is the digraph, to which |
| 90 |
///we would like to define the |
|
| 90 |
///we would like to define the ReachedMap. |
|
| 91 | 91 |
static ReachedMap *createReachedMap(const Digraph &g) |
| ... | ... |
@@ -100,7 +100,7 @@ |
| 100 | 100 |
typedef typename Digraph::template NodeMap<int> DistMap; |
| 101 |
///Instantiates a |
|
| 101 |
///Instantiates a DistMap. |
|
| 102 | 102 |
|
| 103 |
///This function instantiates a |
|
| 103 |
///This function instantiates a DistMap. |
|
| 104 | 104 |
///\param g is the digraph, to which we would like to define the |
| 105 |
/// |
|
| 105 |
///DistMap. |
|
| 106 | 106 |
static DistMap *createDistMap(const Digraph &g) |
| ... | ... |
@@ -229,6 +229,6 @@ |
| 229 | 229 |
///\brief \ref named-templ-param "Named parameter" for setting |
| 230 |
/// |
|
| 230 |
///PredMap type. |
|
| 231 | 231 |
/// |
| 232 | 232 |
///\ref named-templ-param "Named parameter" for setting |
| 233 |
/// |
|
| 233 |
///PredMap type. |
|
| 234 | 234 |
template <class T> |
| ... | ... |
@@ -248,6 +248,6 @@ |
| 248 | 248 |
///\brief \ref named-templ-param "Named parameter" for setting |
| 249 |
/// |
|
| 249 |
///DistMap type. |
|
| 250 | 250 |
/// |
| 251 | 251 |
///\ref named-templ-param "Named parameter" for setting |
| 252 |
/// |
|
| 252 |
///DistMap type. |
|
| 253 | 253 |
template <class T> |
| ... | ... |
@@ -267,6 +267,6 @@ |
| 267 | 267 |
///\brief \ref named-templ-param "Named parameter" for setting |
| 268 |
/// |
|
| 268 |
///ReachedMap type. |
|
| 269 | 269 |
/// |
| 270 | 270 |
///\ref named-templ-param "Named parameter" for setting |
| 271 |
/// |
|
| 271 |
///ReachedMap type. |
|
| 272 | 272 |
template <class T> |
| ... | ... |
@@ -286,6 +286,6 @@ |
| 286 | 286 |
///\brief \ref named-templ-param "Named parameter" for setting |
| 287 |
/// |
|
| 287 |
///ProcessedMap type. |
|
| 288 | 288 |
/// |
| 289 | 289 |
///\ref named-templ-param "Named parameter" for setting |
| 290 |
/// |
|
| 290 |
///ProcessedMap type. |
|
| 291 | 291 |
template <class T> |
| ... | ... |
@@ -304,6 +304,6 @@ |
| 304 | 304 |
///\brief \ref named-templ-param "Named parameter" for setting |
| 305 |
/// |
|
| 305 |
///ProcessedMap type to be <tt>Digraph::NodeMap<bool></tt>. |
|
| 306 | 306 |
/// |
| 307 | 307 |
///\ref named-templ-param "Named parameter" for setting |
| 308 |
/// |
|
| 308 |
///ProcessedMap type to be <tt>Digraph::NodeMap<bool></tt>. |
|
| 309 | 309 |
///If you don't set it explicitly, it will be automatically allocated. |
| ... | ... |
@@ -837,7 +837,7 @@ |
| 837 | 837 |
typedef typename Digraph::template NodeMap<typename Digraph::Arc> PredMap; |
| 838 |
///Instantiates a |
|
| 838 |
///Instantiates a PredMap. |
|
| 839 | 839 |
|
| 840 |
///This function instantiates a |
|
| 840 |
///This function instantiates a PredMap. |
|
| 841 | 841 |
///\param g is the digraph, to which we would like to define the |
| 842 |
/// |
|
| 842 |
///PredMap. |
|
| 843 | 843 |
static PredMap *createPredMap(const Digraph &g) |
| ... | ... |
@@ -853,7 +853,7 @@ |
| 853 | 853 |
typedef NullMap<typename Digraph::Node,bool> ProcessedMap; |
| 854 |
///Instantiates a |
|
| 854 |
///Instantiates a ProcessedMap. |
|
| 855 | 855 |
|
| 856 |
///This function instantiates a |
|
| 856 |
///This function instantiates a ProcessedMap. |
|
| 857 | 857 |
///\param g is the digraph, to which |
| 858 |
///we would like to define the |
|
| 858 |
///we would like to define the ProcessedMap. |
|
| 859 | 859 |
#ifdef DOXYGEN |
| ... | ... |
@@ -872,7 +872,7 @@ |
| 872 | 872 |
typedef typename Digraph::template NodeMap<bool> ReachedMap; |
| 873 |
///Instantiates a |
|
| 873 |
///Instantiates a ReachedMap. |
|
| 874 | 874 |
|
| 875 |
///This function instantiates a |
|
| 875 |
///This function instantiates a ReachedMap. |
|
| 876 | 876 |
///\param g is the digraph, to which |
| 877 |
///we would like to define the |
|
| 877 |
///we would like to define the ReachedMap. |
|
| 878 | 878 |
static ReachedMap *createReachedMap(const Digraph &g) |
| ... | ... |
@@ -887,7 +887,7 @@ |
| 887 | 887 |
typedef typename Digraph::template NodeMap<int> DistMap; |
| 888 |
///Instantiates a |
|
| 888 |
///Instantiates a DistMap. |
|
| 889 | 889 |
|
| 890 |
///This function instantiates a |
|
| 890 |
///This function instantiates a DistMap. |
|
| 891 | 891 |
///\param g is the digraph, to which we would like to define |
| 892 |
///the |
|
| 892 |
///the DistMap |
|
| 893 | 893 |
static DistMap *createDistMap(const Digraph &g) |
| ... | ... |
@@ -904,3 +904,3 @@ |
| 904 | 904 |
|
| 905 |
/// Default traits class used by |
|
| 905 |
/// Default traits class used by BfsWizard |
|
| 906 | 906 |
|
| ... | ... |
@@ -1070,6 +1070,6 @@ |
| 1070 | 1070 |
///\brief \ref named-func-param "Named parameter" |
| 1071 |
///for setting |
|
| 1071 |
///for setting PredMap object. |
|
| 1072 | 1072 |
/// |
| 1073 | 1073 |
///\ref named-func-param "Named parameter" |
| 1074 |
///for setting |
|
| 1074 |
///for setting PredMap object. |
|
| 1075 | 1075 |
template<class T> |
| ... | ... |
@@ -1088,6 +1088,6 @@ |
| 1088 | 1088 |
///\brief \ref named-func-param "Named parameter" |
| 1089 |
///for setting |
|
| 1089 |
///for setting ReachedMap object. |
|
| 1090 | 1090 |
/// |
| 1091 | 1091 |
/// \ref named-func-param "Named parameter" |
| 1092 |
///for setting |
|
| 1092 |
///for setting ReachedMap object. |
|
| 1093 | 1093 |
template<class T> |
| ... | ... |
@@ -1106,6 +1106,6 @@ |
| 1106 | 1106 |
///\brief \ref named-func-param "Named parameter" |
| 1107 |
///for setting |
|
| 1107 |
///for setting DistMap object. |
|
| 1108 | 1108 |
/// |
| 1109 | 1109 |
/// \ref named-func-param "Named parameter" |
| 1110 |
///for setting |
|
| 1110 |
///for setting DistMap object. |
|
| 1111 | 1111 |
template<class T> |
| ... | ... |
@@ -1124,6 +1124,6 @@ |
| 1124 | 1124 |
///\brief \ref named-func-param "Named parameter" |
| 1125 |
///for setting |
|
| 1125 |
///for setting ProcessedMap object. |
|
| 1126 | 1126 |
/// |
| 1127 | 1127 |
/// \ref named-func-param "Named parameter" |
| 1128 |
///for setting |
|
| 1128 |
///for setting ProcessedMap object. |
|
| 1129 | 1129 |
template<class T> |
| ... | ... |
@@ -1269,7 +1269,7 @@ |
| 1269 | 1269 |
|
| 1270 |
/// \brief Instantiates a |
|
| 1270 |
/// \brief Instantiates a ReachedMap. |
|
| 1271 | 1271 |
/// |
| 1272 |
/// This function instantiates a |
|
| 1272 |
/// This function instantiates a ReachedMap. |
|
| 1273 | 1273 |
/// \param digraph is the digraph, to which |
| 1274 |
/// we would like to define the |
|
| 1274 |
/// we would like to define the ReachedMap. |
|
| 1275 | 1275 |
static ReachedMap *createReachedMap(const Digraph &digraph) {
|
| ... | ... |
@@ -26,5 +26,5 @@ |
| 26 | 26 |
|
| 27 |
///\ingroup graphbits |
|
| 28 |
///\file |
|
| 29 |
|
|
| 27 |
//\ingroup graphbits |
|
| 28 |
//\file |
|
| 29 |
//\brief Observer notifier for graph alteration observers. |
|
| 30 | 30 |
|
| ... | ... |
@@ -32,66 +32,65 @@ |
| 32 | 32 |
|
| 33 |
/// \ingroup graphbits |
|
| 34 |
/// |
|
| 35 |
/// \brief Notifier class to notify observes about alterations in |
|
| 36 |
/// a container. |
|
| 37 |
/// |
|
| 38 |
/// The simple graph's can be refered as two containers, one node container |
|
| 39 |
/// and one edge container. But they are not standard containers they |
|
| 40 |
/// does not store values directly they are just key continars for more |
|
| 41 |
/// value containers which are the node and edge maps. |
|
| 42 |
/// |
|
| 43 |
/// The graph's node and edge sets can be changed as we add or erase |
|
| 44 |
/// nodes and edges in the graph. LEMON would like to handle easily |
|
| 45 |
/// that the node and edge maps should contain values for all nodes or |
|
| 46 |
/// edges. If we want to check on every indicing if the map contains |
|
| 47 |
/// the current indicing key that cause a drawback in the performance |
|
| 48 |
/// in the library. We use another solution we notify all maps about |
|
| 49 |
/// an alteration in the graph, which cause only drawback on the |
|
| 50 |
/// alteration of the graph. |
|
| 51 |
/// |
|
| 52 |
/// This class provides an interface to the container. The \e first() and \e |
|
| 53 |
/// next() member functions make possible to iterate on the keys of the |
|
| 54 |
/// container. The \e id() function returns an integer id for each key. |
|
| 55 |
/// The \e maxId() function gives back an upper bound of the ids. |
|
| 56 |
/// |
|
| 57 |
/// For the proper functonality of this class, we should notify it |
|
| 58 |
/// about each alteration in the container. The alterations have four type |
|
| 59 |
/// as \e add(), \e erase(), \e build() and \e clear(). The \e add() and |
|
| 60 |
/// \e erase() signals that only one or few items added or erased to or |
|
| 61 |
/// from the graph. If all items are erased from the graph or from an empty |
|
| 62 |
/// graph a new graph is builded then it can be signaled with the |
|
| 63 |
/// clear() and build() members. Important rule that if we erase items |
|
| 64 |
/// from graph we should first signal the alteration and after that erase |
|
| 65 |
/// them from the container, on the other way on item addition we should |
|
| 66 |
/// first extend the container and just after that signal the alteration. |
|
| 67 |
/// |
|
| 68 |
/// The alteration can be observed with a class inherited from the |
|
| 69 |
/// \e ObserverBase nested class. The signals can be handled with |
|
| 70 |
/// overriding the virtual functions defined in the base class. The |
|
| 71 |
/// observer base can be attached to the notifier with the |
|
| 72 |
/// \e attach() member and can be detached with detach() function. The |
|
| 73 |
/// alteration handlers should not call any function which signals |
|
| 74 |
/// an other alteration in the same notifier and should not |
|
| 75 |
/// detach any observer from the notifier. |
|
| 76 |
/// |
|
| 77 |
/// Alteration observers try to be exception safe. If an \e add() or |
|
| 78 |
/// a \e clear() function throws an exception then the remaining |
|
| 79 |
/// observeres will not be notified and the fulfilled additions will |
|
| 80 |
/// be rolled back by calling the \e erase() or \e clear() |
|
| 81 |
/// functions. Thence the \e erase() and \e clear() should not throw |
|
| 82 |
/// exception. Actullay, it can be throw only |
|
| 83 |
/// \ref AlterationObserver::ImmediateDetach ImmediateDetach |
|
| 84 |
/// exception which detach the observer from the notifier. |
|
| 85 |
/// |
|
| 86 |
/// There are some place when the alteration observing is not completly |
|
| 87 |
/// reliable. If we want to carry out the node degree in the graph |
|
| 88 |
/// as in the \ref InDegMap and we use the reverseEdge that cause |
|
| 89 |
/// unreliable functionality. Because the alteration observing signals |
|
| 90 |
/// only erasing and adding but not the reversing it will stores bad |
|
| 91 |
/// degrees. The sub graph adaptors cannot signal the alterations because |
|
| 92 |
/// just a setting in the filter map can modify the graph and this cannot |
|
| 93 |
/// be watched in any way. |
|
| 94 |
/// |
|
| 95 |
/// \param _Container The container which is observed. |
|
| 96 |
/// \param _Item The item type which is obserbved. |
|
| 33 |
// \ingroup graphbits |
|
| 34 |
// |
|
| 35 |
// \brief Notifier class to notify observes about alterations in |
|
| 36 |
// a container. |
|
| 37 |
// |
|
| 38 |
// The simple graph's can be refered as two containers, one node container |
|
| 39 |
// and one edge container. But they are not standard containers they |
|
| 40 |
// does not store values directly they are just key continars for more |
|
| 41 |
// value containers which are the node and edge maps. |
|
| 42 |
// |
|
| 43 |
// The graph's node and edge sets can be changed as we add or erase |
|
| 44 |
// nodes and edges in the graph. LEMON would like to handle easily |
|
| 45 |
// that the node and edge maps should contain values for all nodes or |
|
| 46 |
// edges. If we want to check on every indicing if the map contains |
|
| 47 |
// the current indicing key that cause a drawback in the performance |
|
| 48 |
// in the library. We use another solution we notify all maps about |
|
| 49 |
// an alteration in the graph, which cause only drawback on the |
|
| 50 |
// alteration of the graph. |
|
| 51 |
// |
|
| 52 |
// This class provides an interface to the container. The \e first() and \e |
|
| 53 |
// next() member functions make possible to iterate on the keys of the |
|
| 54 |
// container. The \e id() function returns an integer id for each key. |
|
| 55 |
// The \e maxId() function gives back an upper bound of the ids. |
|
| 56 |
// |
|
| 57 |
// For the proper functonality of this class, we should notify it |
|
| 58 |
// about each alteration in the container. The alterations have four type |
|
| 59 |
// as \e add(), \e erase(), \e build() and \e clear(). The \e add() and |
|
| 60 |
// \e erase() signals that only one or few items added or erased to or |
|
| 61 |
// from the graph. If all items are erased from the graph or from an empty |
|
| 62 |
// graph a new graph is builded then it can be signaled with the |
|
| 63 |
// clear() and build() members. Important rule that if we erase items |
|
| 64 |
// from graph we should first signal the alteration and after that erase |
|
| 65 |
// them from the container, on the other way on item addition we should |
|
| 66 |
// first extend the container and just after that signal the alteration. |
|
| 67 |
// |
|
| 68 |
// The alteration can be observed with a class inherited from the |
|
| 69 |
// \e ObserverBase nested class. The signals can be handled with |
|
| 70 |
// overriding the virtual functions defined in the base class. The |
|
| 71 |
// observer base can be attached to the notifier with the |
|
| 72 |
// \e attach() member and can be detached with detach() function. The |
|
| 73 |
// alteration handlers should not call any function which signals |
|
| 74 |
// an other alteration in the same notifier and should not |
|
| 75 |
// detach any observer from the notifier. |
|
| 76 |
// |
|
| 77 |
// Alteration observers try to be exception safe. If an \e add() or |
|
| 78 |
// a \e clear() function throws an exception then the remaining |
|
| 79 |
// observeres will not be notified and the fulfilled additions will |
|
| 80 |
// be rolled back by calling the \e erase() or \e clear() |
|
| 81 |
// functions. Thence the \e erase() and \e clear() should not throw |
|
| 82 |
// exception. Actullay, it can be throw only \ref ImmediateDetach |
|
| 83 |
// exception which detach the observer from the notifier. |
|
| 84 |
// |
|
| 85 |
// There are some place when the alteration observing is not completly |
|
| 86 |
// reliable. If we want to carry out the node degree in the graph |
|
| 87 |
// as in the \ref InDegMap and we use the reverseEdge that cause |
|
| 88 |
// unreliable functionality. Because the alteration observing signals |
|
| 89 |
// only erasing and adding but not the reversing it will stores bad |
|
| 90 |
// degrees. The sub graph adaptors cannot signal the alterations because |
|
| 91 |
// just a setting in the filter map can modify the graph and this cannot |
|
| 92 |
// be watched in any way. |
|
| 93 |
// |
|
| 94 |
// \param _Container The container which is observed. |
|
| 95 |
// \param _Item The item type which is obserbved. |
|
| 97 | 96 |
|
| ... | ... |
@@ -106,27 +105,26 @@ |
| 106 | 105 |
|
| 107 |
/// \brief Exception which can be called from \e clear() and |
|
| 108 |
/// \e erase(). |
|
| 109 |
/// |
|
| 110 |
/// From the \e clear() and \e erase() function only this |
|
| 111 |
/// exception is allowed to throw. The exception immediatly |
|
| 112 |
/// detaches the current observer from the notifier. Because the |
|
| 113 |
/// \e clear() and \e erase() should not throw other exceptions |
|
| 114 |
/// it can be used to invalidate the observer. |
|
| 106 |
// \brief Exception which can be called from \e clear() and |
|
| 107 |
// \e erase(). |
|
| 108 |
// |
|
| 109 |
// From the \e clear() and \e erase() function only this |
|
| 110 |
// exception is allowed to throw. The exception immediatly |
|
| 111 |
// detaches the current observer from the notifier. Because the |
|
| 112 |
// \e clear() and \e erase() should not throw other exceptions |
|
| 113 |
// it can be used to invalidate the observer. |
|
| 115 | 114 |
struct ImmediateDetach {};
|
| 116 | 115 |
|
| 117 |
/// \brief ObserverBase is the base class for the observers. |
|
| 118 |
/// |
|
| 119 |
/// ObserverBase is the abstract base class for the observers. |
|
| 120 |
/// It will be notified about an item was inserted into or |
|
| 121 |
/// erased from the graph. |
|
| 122 |
/// |
|
| 123 |
/// The observer interface contains some pure virtual functions |
|
| 124 |
/// to override. The add() and erase() functions are |
|
| 125 |
/// to notify the oberver when one item is added or |
|
| 126 |
/// erased. |
|
| 127 |
/// |
|
| 128 |
/// The build() and clear() members are to notify the observer |
|
| 129 |
/// about the container is built from an empty container or |
|
| 130 |
/// is cleared to an empty container. |
|
| 131 |
|
|
| 116 |
// \brief ObserverBase is the base class for the observers. |
|
| 117 |
// |
|
| 118 |
// ObserverBase is the abstract base class for the observers. |
|
| 119 |
// It will be notified about an item was inserted into or |
|
| 120 |
// erased from the graph. |
|
| 121 |
// |
|
| 122 |
// The observer interface contains some pure virtual functions |
|
| 123 |
// to override. The add() and erase() functions are |
|
| 124 |
// to notify the oberver when one item is added or |
|
| 125 |
// erased. |
|
| 126 |
// |
|
| 127 |
// The build() and clear() members are to notify the observer |
|
| 128 |
// about the container is built from an empty container or |
|
| 129 |
// is cleared to an empty container. |
|
| 132 | 130 |
class ObserverBase {
|
| ... | ... |
@@ -137,11 +135,10 @@ |
| 137 | 135 |
|
| 138 |
/// \brief Default constructor. |
|
| 139 |
/// |
|
| 140 |
/// Default constructor for ObserverBase. |
|
| 141 |
/// |
|
| 136 |
// \brief Default constructor. |
|
| 137 |
// |
|
| 138 |
// Default constructor for ObserverBase. |
|
| 142 | 139 |
ObserverBase() : _notifier(0) {}
|
| 143 | 140 |
|
| 144 |
/// \brief Constructor which attach the observer into notifier. |
|
| 145 |
/// |
|
| 146 |
// |
|
| 141 |
// \brief Constructor which attach the observer into notifier. |
|
| 142 |
// |
|
| 143 |
// Constructor which attach the observer into notifier. |
|
| 147 | 144 |
ObserverBase(AlterationNotifier& nf) {
|
| ... | ... |
@@ -150,6 +147,6 @@ |
| 150 | 147 |
|
| 151 |
/// \brief Constructor which attach the obserever to the same notifier. |
|
| 152 |
/// |
|
| 153 |
/// Constructor which attach the obserever to the same notifier as |
|
| 154 |
/// the other observer is attached to. |
|
| 148 |
// \brief Constructor which attach the obserever to the same notifier. |
|
| 149 |
// |
|
| 150 |
// Constructor which attach the obserever to the same notifier as |
|
| 151 |
// the other observer is attached to. |
|
| 155 | 152 |
ObserverBase(const ObserverBase& copy) {
|
| ... | ... |
@@ -160,3 +157,3 @@ |
| 160 | 157 |
|
| 161 |
// |
|
| 158 |
// \brief Destructor |
|
| 162 | 159 |
virtual ~ObserverBase() {
|
| ... | ... |
@@ -167,6 +164,5 @@ |
| 167 | 164 |
|
| 168 |
/// \brief Attaches the observer into an AlterationNotifier. |
|
| 169 |
/// |
|
| 170 |
/// This member attaches the observer into an AlterationNotifier. |
|
| 171 |
/// |
|
| 165 |
// \brief Attaches the observer into an AlterationNotifier. |
|
| 166 |
// |
|
| 167 |
// This member attaches the observer into an AlterationNotifier. |
|
| 172 | 168 |
void attach(AlterationNotifier& nf) {
|
| ... | ... |
@@ -175,6 +171,5 @@ |
| 175 | 171 |
|
| 176 |
/// \brief Detaches the observer into an AlterationNotifier. |
|
| 177 |
/// |
|
| 178 |
/// This member detaches the observer from an AlterationNotifier. |
|
| 179 |
/// |
|
| 172 |
// \brief Detaches the observer into an AlterationNotifier. |
|
| 173 |
// |
|
| 174 |
// This member detaches the observer from an AlterationNotifier. |
|
| 180 | 175 |
void detach() {
|
| ... | ... |
@@ -183,11 +178,10 @@ |
| 183 | 178 |
|
| 184 |
/// \brief Gives back a pointer to the notifier which the map |
|
| 185 |
/// attached into. |
|
| 186 |
/// |
|
| 187 |
/// This function gives back a pointer to the notifier which the map |
|
| 188 |
/// attached into. |
|
| 189 |
/// |
|
| 179 |
// \brief Gives back a pointer to the notifier which the map |
|
| 180 |
// attached into. |
|
| 181 |
// |
|
| 182 |
// This function gives back a pointer to the notifier which the map |
|
| 183 |
// attached into. |
|
| 190 | 184 |
Notifier* notifier() const { return const_cast<Notifier*>(_notifier); }
|
| 191 | 185 |
|
| 192 |
|
|
| 186 |
// Gives back true when the observer is attached into a notifier. |
|
| 193 | 187 |
bool attached() const { return _notifier != 0; }
|
| ... | ... |
@@ -203,49 +197,48 @@ |
| 203 | 197 |
|
| 204 |
/// \brief The member function to notificate the observer about an |
|
| 205 |
/// item is added to the container. |
|
| 206 |
/// |
|
| 207 |
/// The add() member function notificates the observer about an item |
|
| 208 |
/// is added to the container. It have to be overrided in the |
|
| 209 |
/// subclasses. |
|
| 198 |
// \brief The member function to notificate the observer about an |
|
| 199 |
// item is added to the container. |
|
| 200 |
// |
|
| 201 |
// The add() member function notificates the observer about an item |
|
| 202 |
// is added to the container. It have to be overrided in the |
|
| 203 |
// subclasses. |
|
| 210 | 204 |
virtual void add(const Item&) = 0; |
| 211 | 205 |
|
| 212 |
/// \brief The member function to notificate the observer about |
|
| 213 |
/// more item is added to the container. |
|
| 214 |
/// |
|
| 215 |
/// The add() member function notificates the observer about more item |
|
| 216 |
/// is added to the container. It have to be overrided in the |
|
| 217 |
/// subclasses. |
|
| 206 |
// \brief The member function to notificate the observer about |
|
| 207 |
// more item is added to the container. |
|
| 208 |
// |
|
| 209 |
// The add() member function notificates the observer about more item |
|
| 210 |
// is added to the container. It have to be overrided in the |
|
| 211 |
// subclasses. |
|
| 218 | 212 |
virtual void add(const std::vector<Item>& items) = 0; |
| 219 | 213 |
|
| 220 |
/// \brief The member function to notificate the observer about an |
|
| 221 |
/// item is erased from the container. |
|
| 222 |
/// |
|
| 223 |
/// The erase() member function notificates the observer about an |
|
| 224 |
/// item is erased from the container. It have to be overrided in |
|
| 225 |
/// the subclasses. |
|
| 214 |
// \brief The member function to notificate the observer about an |
|
| 215 |
// item is erased from the container. |
|
| 216 |
// |
|
| 217 |
// The erase() member function notificates the observer about an |
|
| 218 |
// item is erased from the container. It have to be overrided in |
|
| 219 |
// the subclasses. |
|
| 226 | 220 |
virtual void erase(const Item&) = 0; |
| 227 | 221 |
|
| 228 |
/// \brief The member function to notificate the observer about |
|
| 229 |
/// more item is erased from the container. |
|
| 230 |
/// |
|
| 231 |
/// The erase() member function notificates the observer about more item |
|
| 232 |
/// is erased from the container. It have to be overrided in the |
|
| 233 |
/// subclasses. |
|
| 222 |
// \brief The member function to notificate the observer about |
|
| 223 |
// more item is erased from the container. |
|
| 224 |
// |
|
| 225 |
// The erase() member function notificates the observer about more item |
|
| 226 |
// is erased from the container. It have to be overrided in the |
|
| 227 |
// subclasses. |
|
| 234 | 228 |
virtual void erase(const std::vector<Item>& items) = 0; |
| 235 | 229 |
|
| 236 |
/// \brief The member function to notificate the observer about the |
|
| 237 |
/// container is built. |
|
| 238 |
/// |
|
| 239 |
/// The build() member function notificates the observer about the |
|
| 240 |
/// container is built from an empty container. It have to be |
|
| 241 |
/// overrided in the subclasses. |
|
| 242 |
|
|
| 230 |
// \brief The member function to notificate the observer about the |
|
| 231 |
// container is built. |
|
| 232 |
// |
|
| 233 |
// The build() member function notificates the observer about the |
|
| 234 |
// container is built from an empty container. It have to be |
|
| 235 |
// overrided in the subclasses. |
|
| 243 | 236 |
virtual void build() = 0; |
| 244 | 237 |
|
| 245 |
/// \brief The member function to notificate the observer about all |
|
| 246 |
/// items are erased from the container. |
|
| 247 |
/// |
|
| 248 |
/// The clear() member function notificates the observer about all |
|
| 249 |
/// items are erased from the container. It have to be overrided in |
|
| 250 |
/// the subclasses. |
|
| 238 |
// \brief The member function to notificate the observer about all |
|
| 239 |
// items are erased from the container. |
|
| 240 |
// |
|
| 241 |
// The clear() member function notificates the observer about all |
|
| 242 |
// items are erased from the container. It have to be overrided in |
|
| 243 |
// the subclasses. |
|
| 251 | 244 |
virtual void clear() = 0; |
| ... | ... |
@@ -264,6 +257,6 @@ |
| 264 | 257 |
|
| 265 |
/// \brief Default constructor. |
|
| 266 |
/// |
|
| 267 |
/// The default constructor of the AlterationNotifier. |
|
| 268 |
/// It creates an empty notifier. |
|
| 258 |
// \brief Default constructor. |
|
| 259 |
// |
|
| 260 |
// The default constructor of the AlterationNotifier. |
|
| 261 |
// It creates an empty notifier. |
|
| 269 | 262 |
AlterationNotifier() |
| ... | ... |
@@ -271,5 +264,5 @@ |
| 271 | 264 |
|
| 272 |
/// \brief Constructor. |
|
| 273 |
/// |
|
| 274 |
// |
|
| 265 |
// \brief Constructor. |
|
| 266 |
// |
|
| 267 |
// Constructor with the observed container parameter. |
|
| 275 | 268 |
AlterationNotifier(const Container& _container) |
| ... | ... |
@@ -277,7 +270,7 @@ |
| 277 | 270 |
|
| 278 |
/// \brief Copy Constructor of the AlterationNotifier. |
|
| 279 |
/// |
|
| 280 |
/// Copy constructor of the AlterationNotifier. |
|
| 281 |
/// It creates only an empty notifier because the copiable |
|
| 282 |
// |
|
| 271 |
// \brief Copy Constructor of the AlterationNotifier. |
|
| 272 |
// |
|
| 273 |
// Copy constructor of the AlterationNotifier. |
|
| 274 |
// It creates only an empty notifier because the copiable |
|
| 275 |
// notifier's observers have to be registered still into that notifier. |
|
| 283 | 276 |
AlterationNotifier(const AlterationNotifier& _notifier) |
| ... | ... |
@@ -285,6 +278,5 @@ |
| 285 | 278 |
|
| 286 |
/// \brief Destructor. |
|
| 287 |
/// |
|
| 288 |
/// Destructor of the AlterationNotifier. |
|
| 289 |
/// |
|
| 279 |
// \brief Destructor. |
|
| 280 |
// |
|
| 281 |
// Destructor of the AlterationNotifier. |
|
| 290 | 282 |
~AlterationNotifier() {
|
| ... | ... |
@@ -296,5 +288,5 @@ |
| 296 | 288 |
|
| 297 |
/// \brief Sets the container. |
|
| 298 |
/// |
|
| 299 |
// |
|
| 289 |
// \brief Sets the container. |
|
| 290 |
// |
|
| 291 |
// Sets the container. |
|
| 300 | 292 |
void setContainer(const Container& _container) {
|
| ... | ... |
@@ -309,8 +301,6 @@ |
| 309 | 301 |
|
| 310 |
|
|
| 311 |
|
|
| 312 |
/// \brief First item in the container. |
|
| 313 |
/// |
|
| 314 |
/// Returns the first item in the container. It is |
|
| 315 |
/// for start the iteration on the container. |
|
| 302 |
// \brief First item in the container. |
|
| 303 |
// |
|
| 304 |
// Returns the first item in the container. It is |
|
| 305 |
// for start the iteration on the container. |
|
| 316 | 306 |
void first(Item& item) const {
|
| ... | ... |
@@ -319,6 +309,6 @@ |
| 319 | 309 |
|
| 320 |
/// \brief Next item in the container. |
|
| 321 |
/// |
|
| 322 |
/// Returns the next item in the container. It is |
|
| 323 |
/// for iterate on the container. |
|
| 310 |
// \brief Next item in the container. |
|
| 311 |
// |
|
| 312 |
// Returns the next item in the container. It is |
|
| 313 |
// for iterate on the container. |
|
| 324 | 314 |
void next(Item& item) const {
|
| ... | ... |
@@ -327,5 +317,5 @@ |
| 327 | 317 |
|
| 328 |
/// \brief Returns the id of the item. |
|
| 329 |
/// |
|
| 330 |
// |
|
| 318 |
// \brief Returns the id of the item. |
|
| 319 |
// |
|
| 320 |
// Returns the id of the item provided by the container. |
|
| 331 | 321 |
int id(const Item& item) const {
|
| ... | ... |
@@ -334,5 +324,5 @@ |
| 334 | 324 |
|
| 335 |
/// \brief Returns the maximum id of the container. |
|
| 336 |
/// |
|
| 337 |
// |
|
| 325 |
// \brief Returns the maximum id of the container. |
|
| 326 |
// |
|
| 327 |
// Returns the maximum id of the container. |
|
| 338 | 328 |
int maxId() const {
|
| ... | ... |
@@ -356,8 +346,7 @@ |
| 356 | 346 |
|
| 357 |
/// \brief Notifies all the registed observers about an item added to |
|
| 358 |
/// the container. |
|
| 359 |
/// |
|
| 360 |
/// It notifies all the registed observers about an item added to |
|
| 361 |
/// the container. |
|
| 362 |
/// |
|
| 347 |
// \brief Notifies all the registed observers about an item added to |
|
| 348 |
// the container. |
|
| 349 |
// |
|
| 350 |
// It notifies all the registed observers about an item added to |
|
| 351 |
// the container. |
|
| 363 | 352 |
void add(const Item& item) {
|
| ... | ... |
@@ -377,8 +366,7 @@ |
| 377 | 366 |
|
| 378 |
/// \brief Notifies all the registed observers about more item added to |
|
| 379 |
/// the container. |
|
| 380 |
/// |
|
| 381 |
/// It notifies all the registed observers about more item added to |
|
| 382 |
/// the container. |
|
| 383 |
/// |
|
| 367 |
// \brief Notifies all the registed observers about more item added to |
|
| 368 |
// the container. |
|
| 369 |
// |
|
| 370 |
// It notifies all the registed observers about more item added to |
|
| 371 |
// the container. |
|
| 384 | 372 |
void add(const std::vector<Item>& items) {
|
| ... | ... |
@@ -398,8 +386,7 @@ |
| 398 | 386 |
|
| 399 |
/// \brief Notifies all the registed observers about an item erased from |
|
| 400 |
/// the container. |
|
| 401 |
/// |
|
| 402 |
/// It notifies all the registed observers about an item erased from |
|
| 403 |
/// the container. |
|
| 404 |
/// |
|
| 387 |
// \brief Notifies all the registed observers about an item erased from |
|
| 388 |
// the container. |
|
| 389 |
// |
|
| 390 |
// It notifies all the registed observers about an item erased from |
|
| 391 |
// the container. |
|
| 405 | 392 |
void erase(const Item& item) throw() {
|
| ... | ... |
@@ -418,8 +405,7 @@ |
| 418 | 405 |
|
| 419 |
/// \brief Notifies all the registed observers about more item erased |
|
| 420 |
/// from the container. |
|
| 421 |
/// |
|
| 422 |
/// It notifies all the registed observers about more item erased from |
|
| 423 |
/// the container. |
|
| 424 |
/// |
|
| 406 |
// \brief Notifies all the registed observers about more item erased |
|
| 407 |
// from the container. |
|
| 408 |
// |
|
| 409 |
// It notifies all the registed observers about more item erased from |
|
| 410 |
// the container. |
|
| 425 | 411 |
void erase(const std::vector<Item>& items) {
|
| ... | ... |
@@ -438,7 +424,7 @@ |
| 438 | 424 |
|
| 439 |
/// \brief Notifies all the registed observers about the container is |
|
| 440 |
/// built. |
|
| 441 |
/// |
|
| 442 |
/// Notifies all the registed observers about the container is built |
|
| 443 |
// |
|
| 425 |
// \brief Notifies all the registed observers about the container is |
|
| 426 |
// built. |
|
| 427 |
// |
|
| 428 |
// Notifies all the registed observers about the container is built |
|
| 429 |
// from an empty container. |
|
| 444 | 430 |
void build() {
|
| ... | ... |
@@ -458,7 +444,7 @@ |
| 458 | 444 |
|
| 459 |
/// \brief Notifies all the registed observers about all items are |
|
| 460 |
/// erased. |
|
| 461 |
/// |
|
| 462 |
/// Notifies all the registed observers about all items are erased |
|
| 463 |
// |
|
| 445 |
// \brief Notifies all the registed observers about all items are |
|
| 446 |
// erased. |
|
| 447 |
// |
|
| 448 |
// Notifies all the registed observers about all items are erased |
|
| 449 |
// from the container. |
|
| 464 | 450 |
void clear() {
|
| ... | ... |
@@ -28,5 +28,5 @@ |
| 28 | 28 |
|
| 29 |
/// \ingroup graphbits |
|
| 30 |
/// \file |
|
| 31 |
|
|
| 29 |
// \ingroup graphbits |
|
| 30 |
// \file |
|
| 31 |
// \brief Graph map based on the array storage. |
|
| 32 | 32 |
|
| ... | ... |
@@ -34,13 +34,13 @@ |
| 34 | 34 |
|
| 35 |
/// \ingroup graphbits |
|
| 36 |
/// |
|
| 37 |
/// \brief Graph map based on the array storage. |
|
| 38 |
/// |
|
| 39 |
/// The ArrayMap template class is graph map structure what |
|
| 40 |
/// automatically updates the map when a key is added to or erased from |
|
| 41 |
/// the map. This map uses the allocators to implement |
|
| 42 |
/// the container functionality. |
|
| 43 |
/// |
|
| 44 |
/// The template parameters are the Graph the current Item type and |
|
| 45 |
// |
|
| 35 |
// \ingroup graphbits |
|
| 36 |
// |
|
| 37 |
// \brief Graph map based on the array storage. |
|
| 38 |
// |
|
| 39 |
// The ArrayMap template class is graph map structure what |
|
| 40 |
// automatically updates the map when a key is added to or erased from |
|
| 41 |
// the map. This map uses the allocators to implement |
|
| 42 |
// the container functionality. |
|
| 43 |
// |
|
| 44 |
// The template parameters are the Graph the current Item type and |
|
| 45 |
// the Value type of the map. |
|
| 46 | 46 |
template <typename _Graph, typename _Item, typename _Value> |
| ... | ... |
@@ -49,23 +49,23 @@ |
| 49 | 49 |
public: |
| 50 |
|
|
| 50 |
// The graph type of the maps. |
|
| 51 | 51 |
typedef _Graph Graph; |
| 52 |
|
|
| 52 |
// The item type of the map. |
|
| 53 | 53 |
typedef _Item Item; |
| 54 |
|
|
| 54 |
// The reference map tag. |
|
| 55 | 55 |
typedef True ReferenceMapTag; |
| 56 | 56 |
|
| 57 |
|
|
| 57 |
// The key type of the maps. |
|
| 58 | 58 |
typedef _Item Key; |
| 59 |
|
|
| 59 |
// The value type of the map. |
|
| 60 | 60 |
typedef _Value Value; |
| 61 | 61 |
|
| 62 |
|
|
| 62 |
// The const reference type of the map. |
|
| 63 | 63 |
typedef const _Value& ConstReference; |
| 64 |
|
|
| 64 |
// The reference type of the map. |
|
| 65 | 65 |
typedef _Value& Reference; |
| 66 | 66 |
|
| 67 |
|
|
| 67 |
// The notifier type. |
|
| 68 | 68 |
typedef typename ItemSetTraits<_Graph, _Item>::ItemNotifier Notifier; |
| 69 | 69 |
|
| 70 |
|
|
| 70 |
// The MapBase of the Map which imlements the core regisitry function. |
|
| 71 | 71 |
typedef typename Notifier::ObserverBase Parent; |
| ... | ... |
@@ -77,5 +77,5 @@ |
| 77 | 77 |
|
| 78 |
/// \brief Graph initialized map constructor. |
|
| 79 |
/// |
|
| 80 |
// |
|
| 78 |
// \brief Graph initialized map constructor. |
|
| 79 |
// |
|
| 80 |
// Graph initialized map constructor. |
|
| 81 | 81 |
explicit ArrayMap(const Graph& graph) {
|
| ... | ... |
@@ -91,5 +91,5 @@ |
| 91 | 91 |
|
| 92 |
/// \brief Constructor to use default value to initialize the map. |
|
| 93 |
/// |
|
| 94 |
// |
|
| 92 |
// \brief Constructor to use default value to initialize the map. |
|
| 93 |
// |
|
| 94 |
// It constructs a map and initialize all of the the map. |
|
| 95 | 95 |
ArrayMap(const Graph& graph, const Value& value) {
|
| ... | ... |
@@ -106,5 +106,5 @@ |
| 106 | 106 |
private: |
| 107 |
/// \brief Constructor to copy a map of the same map type. |
|
| 108 |
/// |
|
| 109 |
// |
|
| 107 |
// \brief Constructor to copy a map of the same map type. |
|
| 108 |
// |
|
| 109 |
// Constructor to copy a map of the same map type. |
|
| 110 | 110 |
ArrayMap(const ArrayMap& copy) : Parent() {
|
| ... | ... |
@@ -124,9 +124,9 @@ |
| 124 | 124 |
|
| 125 |
/// \brief Assign operator. |
|
| 126 |
/// |
|
| 127 |
/// This operator assigns for each item in the map the |
|
| 128 |
/// value mapped to the same item in the copied map. |
|
| 129 |
/// The parameter map should be indiced with the same |
|
| 130 |
/// itemset because this assign operator does not change |
|
| 131 |
// |
|
| 125 |
// \brief Assign operator. |
|
| 126 |
// |
|
| 127 |
// This operator assigns for each item in the map the |
|
| 128 |
// value mapped to the same item in the copied map. |
|
| 129 |
// The parameter map should be indiced with the same |
|
| 130 |
// itemset because this assign operator does not change |
|
| 131 |
// the container of the map. |
|
| 132 | 132 |
ArrayMap& operator=(const ArrayMap& cmap) {
|
| ... | ... |
@@ -136,8 +136,8 @@ |
| 136 | 136 |
|
| 137 |
/// \brief Template assign operator. |
|
| 138 |
/// |
|
| 139 |
/// The given parameter should be conform to the ReadMap |
|
| 140 |
/// concecpt and could be indiced by the current item set of |
|
| 141 |
/// the NodeMap. In this case the value for each item |
|
| 142 |
/// is assigned by the value of the given ReadMap. |
|
| 137 |
// \brief Template assign operator. |
|
| 138 |
// |
|
| 139 |
// The given parameter should be conform to the ReadMap |
|
| 140 |
// concecpt and could be indiced by the current item set of |
|
| 141 |
// the NodeMap. In this case the value for each item |
|
| 142 |
// is assigned by the value of the given ReadMap. |
|
| 143 | 143 |
template <typename CMap> |
| ... | ... |
@@ -154,5 +154,5 @@ |
| 154 | 154 |
public: |
| 155 |
/// \brief The destructor of the map. |
|
| 156 |
/// |
|
| 157 |
// |
|
| 155 |
// \brief The destructor of the map. |
|
| 156 |
// |
|
| 157 |
// The destructor of the map. |
|
| 158 | 158 |
virtual ~ArrayMap() {
|
| ... | ... |
@@ -172,6 +172,6 @@ |
| 172 | 172 |
|
| 173 |
/// \brief The subscript operator. |
|
| 174 |
/// |
|
| 175 |
/// The subscript operator. The map can be subscripted by the |
|
| 176 |
/// actual keys of the graph. |
|
| 173 |
// \brief The subscript operator. |
|
| 174 |
// |
|
| 175 |
// The subscript operator. The map can be subscripted by the |
|
| 176 |
// actual keys of the graph. |
|
| 177 | 177 |
Value& operator[](const Key& key) {
|
| ... | ... |
@@ -181,6 +181,6 @@ |
| 181 | 181 |
|
| 182 |
/// \brief The const subscript operator. |
|
| 183 |
/// |
|
| 184 |
/// The const subscript operator. The map can be subscripted by the |
|
| 185 |
/// actual keys of the graph. |
|
| 182 |
// \brief The const subscript operator. |
|
| 183 |
// |
|
| 184 |
// The const subscript operator. The map can be subscripted by the |
|
| 185 |
// actual keys of the graph. |
|
| 186 | 186 |
const Value& operator[](const Key& key) const {
|
| ... | ... |
@@ -190,6 +190,6 @@ |
| 190 | 190 |
|
| 191 |
/// \brief Setter function of the map. |
|
| 192 |
/// |
|
| 193 |
/// Setter function of the map. Equivalent with map[key] = val. |
|
| 194 |
/// This is a compatibility feature with the not dereferable maps. |
|
| 191 |
// \brief Setter function of the map. |
|
| 192 |
// |
|
| 193 |
// Setter function of the map. Equivalent with map[key] = val. |
|
| 194 |
// This is a compatibility feature with the not dereferable maps. |
|
| 195 | 195 |
void set(const Key& key, const Value& val) {
|
| ... | ... |
@@ -200,6 +200,6 @@ |
| 200 | 200 |
|
| 201 |
/// \brief Adds a new key to the map. |
|
| 202 |
/// |
|
| 203 |
/// It adds a new key to the map. It called by the observer notifier |
|
| 204 |
/// and it overrides the add() member function of the observer base. |
|
| 201 |
// \brief Adds a new key to the map. |
|
| 202 |
// |
|
| 203 |
// It adds a new key to the map. It called by the observer notifier |
|
| 204 |
// and it overrides the add() member function of the observer base. |
|
| 205 | 205 |
virtual void add(const Key& key) {
|
| ... | ... |
@@ -228,6 +228,6 @@ |
| 228 | 228 |
|
| 229 |
/// \brief Adds more new keys to the map. |
|
| 230 |
/// |
|
| 231 |
/// It adds more new keys to the map. It called by the observer notifier |
|
| 232 |
/// and it overrides the add() member function of the observer base. |
|
| 229 |
// \brief Adds more new keys to the map. |
|
| 230 |
// |
|
| 231 |
// It adds more new keys to the map. It called by the observer notifier |
|
| 232 |
// and it overrides the add() member function of the observer base. |
|
| 233 | 233 |
virtual void add(const std::vector<Key>& keys) {
|
| ... | ... |
@@ -272,6 +272,6 @@ |
| 272 | 272 |
|
| 273 |
/// \brief Erase a key from the map. |
|
| 274 |
/// |
|
| 275 |
/// Erase a key from the map. It called by the observer notifier |
|
| 276 |
/// and it overrides the erase() member function of the observer base. |
|
| 273 |
// \brief Erase a key from the map. |
|
| 274 |
// |
|
| 275 |
// Erase a key from the map. It called by the observer notifier |
|
| 276 |
// and it overrides the erase() member function of the observer base. |
|
| 277 | 277 |
virtual void erase(const Key& key) {
|
| ... | ... |
@@ -281,6 +281,6 @@ |
| 281 | 281 |
|
| 282 |
/// \brief Erase more keys from the map. |
|
| 283 |
/// |
|
| 284 |
/// Erase more keys from the map. It called by the observer notifier |
|
| 285 |
/// and it overrides the erase() member function of the observer base. |
|
| 282 |
// \brief Erase more keys from the map. |
|
| 283 |
// |
|
| 284 |
// Erase more keys from the map. It called by the observer notifier |
|
| 285 |
// and it overrides the erase() member function of the observer base. |
|
| 286 | 286 |
virtual void erase(const std::vector<Key>& keys) {
|
| ... | ... |
@@ -292,6 +292,6 @@ |
| 292 | 292 |
|
| 293 |
/// \brief Buildes the map. |
|
| 294 |
/// |
|
| 295 |
/// It buildes the map. It called by the observer notifier |
|
| 296 |
/// and it overrides the build() member function of the observer base. |
|
| 293 |
// \brief Buildes the map. |
|
| 294 |
// |
|
| 295 |
// It buildes the map. It called by the observer notifier |
|
| 296 |
// and it overrides the build() member function of the observer base. |
|
| 297 | 297 |
virtual void build() {
|
| ... | ... |
@@ -306,6 +306,6 @@ |
| 306 | 306 |
|
| 307 |
/// \brief Clear the map. |
|
| 308 |
/// |
|
| 309 |
/// It erase all items from the map. It called by the observer notifier |
|
| 310 |
/// and it overrides the clear() member function of the observer base. |
|
| 307 |
// \brief Clear the map. |
|
| 308 |
// |
|
| 309 |
// It erase all items from the map. It called by the observer notifier |
|
| 310 |
// and it overrides the clear() member function of the observer base. |
|
| 311 | 311 |
virtual void clear() {
|
| ... | ... |
@@ -30,10 +30,10 @@ |
| 30 | 30 |
|
| 31 |
///\ingroup digraphbits |
|
| 32 |
///\file |
|
| 33 |
|
|
| 31 |
//\ingroup digraphbits |
|
| 32 |
//\file |
|
| 33 |
//\brief Extenders for the digraph types |
|
| 34 | 34 |
namespace lemon {
|
| 35 | 35 |
|
| 36 |
/// \ingroup digraphbits |
|
| 37 |
/// |
|
| 38 |
// |
|
| 36 |
// \ingroup digraphbits |
|
| 37 |
// |
|
| 38 |
// \brief BaseDigraph to BaseGraph extender |
|
| 39 | 39 |
template <typename Base> |
| ... | ... |
@@ -76,3 +76,3 @@ |
| 76 | 76 |
|
| 77 |
|
|
| 77 |
// First node of the edge |
|
| 78 | 78 |
Node u(const Edge &e) const {
|
| ... | ... |
@@ -81,3 +81,3 @@ |
| 81 | 81 |
|
| 82 |
|
|
| 82 |
// Source of the given arc |
|
| 83 | 83 |
Node source(const Arc &e) const {
|
| ... | ... |
@@ -86,3 +86,3 @@ |
| 86 | 86 |
|
| 87 |
|
|
| 87 |
// Second node of the edge |
|
| 88 | 88 |
Node v(const Edge &e) const {
|
| ... | ... |
@@ -91,3 +91,3 @@ |
| 91 | 91 |
|
| 92 |
|
|
| 92 |
// Target of the given arc |
|
| 93 | 93 |
Node target(const Arc &e) const {
|
| ... | ... |
@@ -96,7 +96,7 @@ |
| 96 | 96 |
|
| 97 |
/// \brief Directed arc from an edge. |
|
| 98 |
/// |
|
| 99 |
/// Returns a directed arc corresponding to the specified edge. |
|
| 100 |
/// If the given bool is true, the first node of the given edge and |
|
| 101 |
// |
|
| 97 |
// \brief Directed arc from an edge. |
|
| 98 |
// |
|
| 99 |
// Returns a directed arc corresponding to the specified edge. |
|
| 100 |
// If the given bool is true, the first node of the given edge and |
|
| 101 |
// the source node of the returned arc are the same. |
|
| 102 | 102 |
static Arc direct(const Edge &e, bool d) {
|
| ... | ... |
@@ -105,4 +105,4 @@ |
| 105 | 105 |
|
| 106 |
/// Returns whether the given directed arc has the same orientation |
|
| 107 |
/// as the corresponding edge. |
|
| 106 |
// Returns whether the given directed arc has the same orientation |
|
| 107 |
// as the corresponding edge. |
|
| 108 | 108 |
static bool direction(const Arc &a) { return a.forward; }
|
| ... | ... |
@@ -21,7 +21,7 @@ |
| 21 | 21 |
|
| 22 |
///\ingroup misc |
|
| 23 |
///\file |
|
| 24 |
///\brief Classes to compute with Bezier curves. |
|
| 25 |
/// |
|
| 26 |
// |
|
| 22 |
//\ingroup misc |
|
| 23 |
//\file |
|
| 24 |
//\brief Classes to compute with Bezier curves. |
|
| 25 |
// |
|
| 26 |
//Up to now this file is used internally by \ref graph_to_eps.h |
|
| 27 | 27 |
| ... | ... |
@@ -21,3 +21,2 @@ |
| 21 | 21 |
|
| 22 |
|
|
| 23 | 22 |
#include <lemon/bits/array_map.h> |
| ... | ... |
@@ -26,5 +25,5 @@ |
| 26 | 25 |
|
| 27 |
///\ingroup graphbits |
|
| 28 |
///\file |
|
| 29 |
|
|
| 26 |
//\ingroup graphbits |
|
| 27 |
//\file |
|
| 28 |
//\brief Graph maps that construct and destruct their elements dynamically. |
|
| 30 | 29 |
|
| ... | ... |
@@ -151,3 +150,3 @@ |
| 151 | 150 |
|
| 152 |
// |
|
| 151 |
// DefaultMap class |
|
| 153 | 152 |
template <typename _Graph, typename _Item, typename _Value> |
| ... | ... |
@@ -37,4 +37,4 @@ |
| 37 | 37 |
|
| 38 |
///\file |
|
| 39 |
///\brief Miscellaneous basic utilities |
|
| 38 |
//\file |
|
| 39 |
//\brief Miscellaneous basic utilities |
|
| 40 | 40 |
|
| ... | ... |
@@ -43,9 +43,9 @@ |
| 43 | 43 |
|
| 44 |
|
|
| 44 |
// Basic type for defining "tags". A "YES" condition for \c enable_if. |
|
| 45 | 45 |
|
| 46 |
/// Basic type for defining "tags". A "YES" condition for \c enable_if. |
|
| 47 |
/// |
|
| 48 |
// |
|
| 46 |
// Basic type for defining "tags". A "YES" condition for \c enable_if. |
|
| 47 |
// |
|
| 48 |
//\sa False |
|
| 49 | 49 |
struct True {
|
| 50 |
// |
|
| 50 |
//\e |
|
| 51 | 51 |
static const bool value = true; |
| ... | ... |
@@ -53,9 +53,9 @@ |
| 53 | 53 |
|
| 54 |
|
|
| 54 |
// Basic type for defining "tags". A "NO" condition for \c enable_if. |
|
| 55 | 55 |
|
| 56 |
/// Basic type for defining "tags". A "NO" condition for \c enable_if. |
|
| 57 |
/// |
|
| 58 |
// |
|
| 56 |
// Basic type for defining "tags". A "NO" condition for \c enable_if. |
|
| 57 |
// |
|
| 58 |
//\sa True |
|
| 59 | 59 |
struct False {
|
| 60 |
// |
|
| 60 |
//\e |
|
| 61 | 61 |
static const bool value = false; |
| ... | ... |
@@ -29,10 +29,10 @@ |
| 29 | 29 |
|
| 30 |
///\ingroup graphbits |
|
| 31 |
///\file |
|
| 32 |
|
|
| 30 |
//\ingroup graphbits |
|
| 31 |
//\file |
|
| 32 |
//\brief Extenders for the digraph types |
|
| 33 | 33 |
namespace lemon {
|
| 34 | 34 |
|
| 35 |
/// \ingroup graphbits |
|
| 36 |
/// |
|
| 37 |
// |
|
| 35 |
// \ingroup graphbits |
|
| 36 |
// |
|
| 37 |
// \brief Extender for the Digraphs |
|
| 38 | 38 |
template <typename Base> |
| ... | ... |
@@ -188,5 +188,5 @@ |
| 188 | 188 |
|
| 189 |
/// \brief Base node of the iterator |
|
| 190 |
/// |
|
| 191 |
// |
|
| 189 |
// \brief Base node of the iterator |
|
| 190 |
// |
|
| 191 |
// Returns the base node (i.e. the source in this case) of the iterator |
|
| 192 | 192 |
Node baseNode(const OutArcIt &arc) const {
|
| ... | ... |
@@ -194,6 +194,6 @@ |
| 194 | 194 |
} |
| 195 |
/// \brief Running node of the iterator |
|
| 196 |
/// |
|
| 197 |
/// Returns the running node (i.e. the target in this case) of the |
|
| 198 |
/// iterator |
|
| 195 |
// \brief Running node of the iterator |
|
| 196 |
// |
|
| 197 |
// Returns the running node (i.e. the target in this case) of the |
|
| 198 |
// iterator |
|
| 199 | 199 |
Node runningNode(const OutArcIt &arc) const {
|
| ... | ... |
@@ -202,5 +202,5 @@ |
| 202 | 202 |
|
| 203 |
/// \brief Base node of the iterator |
|
| 204 |
/// |
|
| 205 |
// |
|
| 203 |
// \brief Base node of the iterator |
|
| 204 |
// |
|
| 205 |
// Returns the base node (i.e. the target in this case) of the iterator |
|
| 206 | 206 |
Node baseNode(const InArcIt &arc) const {
|
| ... | ... |
@@ -208,6 +208,6 @@ |
| 208 | 208 |
} |
| 209 |
/// \brief Running node of the iterator |
|
| 210 |
/// |
|
| 211 |
/// Returns the running node (i.e. the source in this case) of the |
|
| 212 |
/// iterator |
|
| 209 |
// \brief Running node of the iterator |
|
| 210 |
// |
|
| 211 |
// Returns the running node (i.e. the source in this case) of the |
|
| 212 |
// iterator |
|
| 213 | 213 |
Node runningNode(const InArcIt &arc) const {
|
| ... | ... |
@@ -327,5 +327,5 @@ |
| 327 | 327 |
|
| 328 |
/// \ingroup _graphbits |
|
| 329 |
/// |
|
| 330 |
// |
|
| 328 |
// \ingroup _graphbits |
|
| 329 |
// |
|
| 330 |
// \brief Extender for the Graphs |
|
| 331 | 331 |
template <typename Base> |
| ... | ... |
@@ -557,5 +557,5 @@ |
| 557 | 557 |
|
| 558 |
/// \brief Base node of the iterator |
|
| 559 |
/// |
|
| 560 |
// |
|
| 558 |
// \brief Base node of the iterator |
|
| 559 |
// |
|
| 560 |
// Returns the base node (ie. the source in this case) of the iterator |
|
| 561 | 561 |
Node baseNode(const OutArcIt &arc) const {
|
| ... | ... |
@@ -563,6 +563,6 @@ |
| 563 | 563 |
} |
| 564 |
/// \brief Running node of the iterator |
|
| 565 |
/// |
|
| 566 |
/// Returns the running node (ie. the target in this case) of the |
|
| 567 |
/// iterator |
|
| 564 |
// \brief Running node of the iterator |
|
| 565 |
// |
|
| 566 |
// Returns the running node (ie. the target in this case) of the |
|
| 567 |
// iterator |
|
| 568 | 568 |
Node runningNode(const OutArcIt &arc) const {
|
| ... | ... |
@@ -571,5 +571,5 @@ |
| 571 | 571 |
|
| 572 |
/// \brief Base node of the iterator |
|
| 573 |
/// |
|
| 574 |
// |
|
| 572 |
// \brief Base node of the iterator |
|
| 573 |
// |
|
| 574 |
// Returns the base node (ie. the target in this case) of the iterator |
|
| 575 | 575 |
Node baseNode(const InArcIt &arc) const {
|
| ... | ... |
@@ -577,6 +577,6 @@ |
| 577 | 577 |
} |
| 578 |
/// \brief Running node of the iterator |
|
| 579 |
/// |
|
| 580 |
/// Returns the running node (ie. the source in this case) of the |
|
| 581 |
/// iterator |
|
| 578 |
// \brief Running node of the iterator |
|
| 579 |
// |
|
| 580 |
// Returns the running node (ie. the source in this case) of the |
|
| 581 |
// iterator |
|
| 582 | 582 |
Node runningNode(const InArcIt &arc) const {
|
| ... | ... |
@@ -585,5 +585,5 @@ |
| 585 | 585 |
|
| 586 |
/// Base node of the iterator |
|
| 587 |
/// |
|
| 588 |
// |
|
| 586 |
// Base node of the iterator |
|
| 587 |
// |
|
| 588 |
// Returns the base node of the iterator |
|
| 589 | 589 |
Node baseNode(const IncEdgeIt &edge) const {
|
| ... | ... |
@@ -591,5 +591,5 @@ |
| 591 | 591 |
} |
| 592 |
/// Running node of the iterator |
|
| 593 |
/// |
|
| 594 |
// |
|
| 592 |
// Running node of the iterator |
|
| 593 |
// |
|
| 594 |
// Returns the running node of the iterator |
|
| 595 | 595 |
Node runningNode(const IncEdgeIt &edge) const {
|
| ... | ... |
@@ -28,4 +28,4 @@ |
| 28 | 28 |
|
| 29 |
///\file |
|
| 30 |
///\brief Extenders for iterable maps. |
|
| 29 |
//\file |
|
| 30 |
//\brief Extenders for iterable maps. |
|
| 31 | 31 |
|
| ... | ... |
@@ -33,5 +33,5 @@ |
| 33 | 33 |
|
| 34 |
/// \ingroup graphbits |
|
| 35 |
/// |
|
| 36 |
// |
|
| 34 |
// \ingroup graphbits |
|
| 35 |
// |
|
| 36 |
// \brief Extender for maps |
|
| 37 | 37 |
template <typename _Map> |
| ... | ... |
@@ -173,5 +173,5 @@ |
| 173 | 173 |
|
| 174 |
/// \ingroup graphbits |
|
| 175 |
/// |
|
| 176 |
// |
|
| 174 |
// \ingroup graphbits |
|
| 175 |
// |
|
| 176 |
// \brief Extender for maps which use a subset of the items. |
|
| 177 | 177 |
template <typename _Graph, typename _Map> |
| ... | ... |
@@ -30,19 +30,19 @@ |
| 30 | 30 |
|
| 31 |
///\ingroup graphbits |
|
| 32 |
/// |
|
| 33 |
///\file |
|
| 34 |
///\brief Vector based graph maps. |
|
| 31 |
//\ingroup graphbits |
|
| 32 |
// |
|
| 33 |
//\file |
|
| 34 |
//\brief Vector based graph maps. |
|
| 35 | 35 |
namespace lemon {
|
| 36 | 36 |
|
| 37 |
/// \ingroup graphbits |
|
| 38 |
/// |
|
| 39 |
/// \brief Graph map based on the std::vector storage. |
|
| 40 |
/// |
|
| 41 |
/// The VectorMap template class is graph map structure what |
|
| 42 |
/// automatically updates the map when a key is added to or erased from |
|
| 43 |
/// the map. This map type uses the std::vector to store the values. |
|
| 44 |
/// |
|
| 45 |
/// \tparam _Graph The graph this map is attached to. |
|
| 46 |
/// \tparam _Item The item type of the graph items. |
|
| 47 |
// |
|
| 37 |
// \ingroup graphbits |
|
| 38 |
// |
|
| 39 |
// \brief Graph map based on the std::vector storage. |
|
| 40 |
// |
|
| 41 |
// The VectorMap template class is graph map structure what |
|
| 42 |
// automatically updates the map when a key is added to or erased from |
|
| 43 |
// the map. This map type uses the std::vector to store the values. |
|
| 44 |
// |
|
| 45 |
// \tparam _Graph The graph this map is attached to. |
|
| 46 |
// \tparam _Item The item type of the graph items. |
|
| 47 |
// \tparam _Value The value type of the map. |
|
| 48 | 48 |
template <typename _Graph, typename _Item, typename _Value> |
| ... | ... |
@@ -52,3 +52,3 @@ |
| 52 | 52 |
|
| 53 |
|
|
| 53 |
// The container type of the map. |
|
| 54 | 54 |
typedef std::vector<_Value> Container; |
| ... | ... |
@@ -57,25 +57,25 @@ |
| 57 | 57 |
|
| 58 |
|
|
| 58 |
// The graph type of the map. |
|
| 59 | 59 |
typedef _Graph Graph; |
| 60 |
|
|
| 60 |
// The item type of the map. |
|
| 61 | 61 |
typedef _Item Item; |
| 62 |
|
|
| 62 |
// The reference map tag. |
|
| 63 | 63 |
typedef True ReferenceMapTag; |
| 64 | 64 |
|
| 65 |
|
|
| 65 |
// The key type of the map. |
|
| 66 | 66 |
typedef _Item Key; |
| 67 |
|
|
| 67 |
// The value type of the map. |
|
| 68 | 68 |
typedef _Value Value; |
| 69 | 69 |
|
| 70 |
|
|
| 70 |
// The notifier type. |
|
| 71 | 71 |
typedef typename ItemSetTraits<_Graph, _Item>::ItemNotifier Notifier; |
| 72 | 72 |
|
| 73 |
|
|
| 73 |
// The map type. |
|
| 74 | 74 |
typedef VectorMap Map; |
| 75 |
|
|
| 75 |
// The base class of the map. |
|
| 76 | 76 |
typedef typename Notifier::ObserverBase Parent; |
| 77 | 77 |
|
| 78 |
|
|
| 78 |
// The reference type of the map; |
|
| 79 | 79 |
typedef typename Container::reference Reference; |
| 80 |
|
|
| 80 |
// The const reference type of the map; |
|
| 81 | 81 |
typedef typename Container::const_reference ConstReference; |
| ... | ... |
@@ -83,6 +83,6 @@ |
| 83 | 83 |
|
| 84 |
/// \brief Constructor to attach the new map into the notifier. |
|
| 85 |
/// |
|
| 86 |
/// It constructs a map and attachs it into the notifier. |
|
| 87 |
/// It adds all the items of the graph to the map. |
|
| 84 |
// \brief Constructor to attach the new map into the notifier. |
|
| 85 |
// |
|
| 86 |
// It constructs a map and attachs it into the notifier. |
|
| 87 |
// It adds all the items of the graph to the map. |
|
| 88 | 88 |
VectorMap(const Graph& graph) {
|
| ... | ... |
@@ -92,6 +92,6 @@ |
| 92 | 92 |
|
| 93 |
/// \brief Constructor uses given value to initialize the map. |
|
| 94 |
/// |
|
| 95 |
/// It constructs a map uses a given value to initialize the map. |
|
| 96 |
/// It adds all the items of the graph to the map. |
|
| 93 |
// \brief Constructor uses given value to initialize the map. |
|
| 94 |
// |
|
| 95 |
// It constructs a map uses a given value to initialize the map. |
|
| 96 |
// It adds all the items of the graph to the map. |
|
| 97 | 97 |
VectorMap(const Graph& graph, const Value& value) {
|
| ... | ... |
@@ -102,5 +102,5 @@ |
| 102 | 102 |
private: |
| 103 |
/// \brief Copy constructor |
|
| 104 |
/// |
|
| 105 |
// |
|
| 103 |
// \brief Copy constructor |
|
| 104 |
// |
|
| 105 |
// Copy constructor. |
|
| 106 | 106 |
VectorMap(const VectorMap& _copy) : Parent() {
|
| ... | ... |
@@ -112,9 +112,9 @@ |
| 112 | 112 |
|
| 113 |
/// \brief Assign operator. |
|
| 114 |
/// |
|
| 115 |
/// This operator assigns for each item in the map the |
|
| 116 |
/// value mapped to the same item in the copied map. |
|
| 117 |
/// The parameter map should be indiced with the same |
|
| 118 |
/// itemset because this assign operator does not change |
|
| 119 |
// |
|
| 113 |
// \brief Assign operator. |
|
| 114 |
// |
|
| 115 |
// This operator assigns for each item in the map the |
|
| 116 |
// value mapped to the same item in the copied map. |
|
| 117 |
// The parameter map should be indiced with the same |
|
| 118 |
// itemset because this assign operator does not change |
|
| 119 |
// the container of the map. |
|
| 120 | 120 |
VectorMap& operator=(const VectorMap& cmap) {
|
| ... | ... |
@@ -124,8 +124,8 @@ |
| 124 | 124 |
|
| 125 |
/// \brief Template assign operator. |
|
| 126 |
/// |
|
| 127 |
/// The given parameter should be conform to the ReadMap |
|
| 128 |
/// concecpt and could be indiced by the current item set of |
|
| 129 |
/// the NodeMap. In this case the value for each item |
|
| 130 |
/// is assigned by the value of the given ReadMap. |
|
| 125 |
// \brief Template assign operator. |
|
| 126 |
// |
|
| 127 |
// The given parameter should be conform to the ReadMap |
|
| 128 |
// concecpt and could be indiced by the current item set of |
|
| 129 |
// the NodeMap. In this case the value for each item |
|
| 130 |
// is assigned by the value of the given ReadMap. |
|
| 131 | 131 |
template <typename CMap> |
| ... | ... |
@@ -143,6 +143,6 @@ |
| 143 | 143 |
|
| 144 |
/// \brief The subcript operator. |
|
| 145 |
/// |
|
| 146 |
/// The subscript operator. The map can be subscripted by the |
|
| 147 |
/// actual items of the graph. |
|
| 144 |
// \brief The subcript operator. |
|
| 145 |
// |
|
| 146 |
// The subscript operator. The map can be subscripted by the |
|
| 147 |
// actual items of the graph. |
|
| 148 | 148 |
Reference operator[](const Key& key) {
|
| ... | ... |
@@ -151,6 +151,6 @@ |
| 151 | 151 |
|
| 152 |
/// \brief The const subcript operator. |
|
| 153 |
/// |
|
| 154 |
/// The const subscript operator. The map can be subscripted by the |
|
| 155 |
/// actual items of the graph. |
|
| 152 |
// \brief The const subcript operator. |
|
| 153 |
// |
|
| 154 |
// The const subscript operator. The map can be subscripted by the |
|
| 155 |
// actual items of the graph. |
|
| 156 | 156 |
ConstReference operator[](const Key& key) const {
|
| ... | ... |
@@ -160,5 +160,5 @@ |
| 160 | 160 |
|
| 161 |
/// \brief The setter function of the map. |
|
| 162 |
/// |
|
| 163 |
// |
|
| 161 |
// \brief The setter function of the map. |
|
| 162 |
// |
|
| 163 |
// It the same as operator[](key) = value expression. |
|
| 164 | 164 |
void set(const Key& key, const Value& value) {
|
| ... | ... |
@@ -169,6 +169,6 @@ |
| 169 | 169 |
|
| 170 |
/// \brief Adds a new key to the map. |
|
| 171 |
/// |
|
| 172 |
/// It adds a new key to the map. It called by the observer notifier |
|
| 173 |
/// and it overrides the add() member function of the observer base. |
|
| 170 |
// \brief Adds a new key to the map. |
|
| 171 |
// |
|
| 172 |
// It adds a new key to the map. It called by the observer notifier |
|
| 173 |
// and it overrides the add() member function of the observer base. |
|
| 174 | 174 |
virtual void add(const Key& key) {
|
| ... | ... |
@@ -180,6 +180,6 @@ |
| 180 | 180 |
|
| 181 |
/// \brief Adds more new keys to the map. |
|
| 182 |
/// |
|
| 183 |
/// It adds more new keys to the map. It called by the observer notifier |
|
| 184 |
/// and it overrides the add() member function of the observer base. |
|
| 181 |
// \brief Adds more new keys to the map. |
|
| 182 |
// |
|
| 183 |
// It adds more new keys to the map. It called by the observer notifier |
|
| 184 |
// and it overrides the add() member function of the observer base. |
|
| 185 | 185 |
virtual void add(const std::vector<Key>& keys) {
|
| ... | ... |
@@ -195,6 +195,6 @@ |
| 195 | 195 |
|
| 196 |
/// \brief Erase a key from the map. |
|
| 197 |
/// |
|
| 198 |
/// Erase a key from the map. It called by the observer notifier |
|
| 199 |
/// and it overrides the erase() member function of the observer base. |
|
| 196 |
// \brief Erase a key from the map. |
|
| 197 |
// |
|
| 198 |
// Erase a key from the map. It called by the observer notifier |
|
| 199 |
// and it overrides the erase() member function of the observer base. |
|
| 200 | 200 |
virtual void erase(const Key& key) {
|
| ... | ... |
@@ -203,6 +203,6 @@ |
| 203 | 203 |
|
| 204 |
/// \brief Erase more keys from the map. |
|
| 205 |
/// |
|
| 206 |
/// Erase more keys from the map. It called by the observer notifier |
|
| 207 |
/// and it overrides the erase() member function of the observer base. |
|
| 204 |
// \brief Erase more keys from the map. |
|
| 205 |
// |
|
| 206 |
// Erase more keys from the map. It called by the observer notifier |
|
| 207 |
// and it overrides the erase() member function of the observer base. |
|
| 208 | 208 |
virtual void erase(const std::vector<Key>& keys) {
|
| ... | ... |
@@ -213,6 +213,6 @@ |
| 213 | 213 |
|
| 214 |
/// \brief Buildes the map. |
|
| 215 |
/// |
|
| 216 |
/// It buildes the map. It called by the observer notifier |
|
| 217 |
/// and it overrides the build() member function of the observer base. |
|
| 214 |
// \brief Buildes the map. |
|
| 215 |
// |
|
| 216 |
// It buildes the map. It called by the observer notifier |
|
| 217 |
// and it overrides the build() member function of the observer base. |
|
| 218 | 218 |
virtual void build() {
|
| ... | ... |
@@ -223,6 +223,6 @@ |
| 223 | 223 |
|
| 224 |
/// \brief Clear the map. |
|
| 225 |
/// |
|
| 226 |
/// It erase all items from the map. It called by the observer notifier |
|
| 227 |
/// and it overrides the clear() member function of the observer base. |
|
| 224 |
// \brief Clear the map. |
|
| 225 |
// |
|
| 226 |
// It erase all items from the map. It called by the observer notifier |
|
| 227 |
// and it overrides the clear() member function of the observer base. |
|
| 228 | 228 |
virtual void clear() {
|
| ... | ... |
@@ -984,3 +984,3 @@ |
| 984 | 984 |
/// This class describes the common interface of the graph maps |
| 985 |
/// (NodeMap, ArcMap), that is |
|
| 985 |
/// (NodeMap, ArcMap), that is maps that can be used to |
|
| 986 | 986 |
/// associate data to graph descriptors (nodes or arcs). |
| ... | ... |
@@ -60,3 +60,3 @@ |
| 60 | 60 |
|
| 61 |
///Create |
|
| 61 |
///Create convenience typedefs for the digraph types and iterators |
|
| 62 | 62 |
|
| ... | ... |
@@ -82,5 +82,5 @@ |
| 82 | 82 |
typedef Digraph::ArcMap<int> IntArcMap; \ |
| 83 |
typedef Digraph::ArcMap<double> DoubleArcMap |
|
| 83 |
typedef Digraph::ArcMap<double> DoubleArcMap |
|
| 84 | 84 |
|
| 85 |
///Create |
|
| 85 |
///Create convenience typedefs for the digraph types and iterators |
|
| 86 | 86 |
|
| ... | ... |
@@ -102,5 +102,5 @@ |
| 102 | 102 |
typedef typename Digraph::template ArcMap<int> IntArcMap; \ |
| 103 |
typedef typename Digraph::template ArcMap<double> DoubleArcMap |
|
| 103 |
typedef typename Digraph::template ArcMap<double> DoubleArcMap |
|
| 104 | 104 |
|
| 105 |
///Create |
|
| 105 |
///Create convenience typedefs for the graph types and iterators |
|
| 106 | 106 |
|
| ... | ... |
@@ -121,5 +121,5 @@ |
| 121 | 121 |
typedef Graph::EdgeMap<int> IntEdgeMap; \ |
| 122 |
typedef Graph::EdgeMap<double> DoubleEdgeMap |
|
| 122 |
typedef Graph::EdgeMap<double> DoubleEdgeMap |
|
| 123 | 123 |
|
| 124 |
///Create |
|
| 124 |
///Create convenience typedefs for the graph types and iterators |
|
| 125 | 125 |
|
| ... | ... |
@@ -136,3 +136,3 @@ |
| 136 | 136 |
typedef typename Graph::template EdgeMap<int> IntEdgeMap; \ |
| 137 |
typedef typename Graph::template EdgeMap<double> DoubleEdgeMap |
|
| 137 |
typedef typename Graph::template EdgeMap<double> DoubleEdgeMap |
|
| 138 | 138 |
|
| ... | ... |
@@ -1556,3 +1556,3 @@ |
| 1556 | 1556 |
///this data structure is theoretically faster than \ref ArcLookUp |
| 1557 |
///and \ref |
|
| 1557 |
///and \ref AllArcLookUp, it often provides worse performance than |
|
| 1558 | 1558 |
///them. |
| ... | ... |
@@ -1701,4 +1701,4 @@ |
| 1701 | 1701 |
|
| 1702 |
///Find an arc between two nodes in time <em>O</em>(log<em>d</em>), where |
|
| 1703 |
///<em>d</em> is the number of outgoing arcs of \c s. |
|
| 1702 |
///Find an arc between two nodes in time <em>O</em>(log<em>d</em>), |
|
| 1703 |
///where <em>d</em> is the number of outgoing arcs of \c s. |
|
| 1704 | 1704 |
///\param s The source node. |
| ... | ... |
@@ -1819,4 +1819,4 @@ |
| 1819 | 1819 |
/// |
| 1820 |
///Finding the first arc take <em>O</em>(log<em>d</em>) time, where |
|
| 1821 |
///<em>d</em> is the number of outgoing arcs of \c s. Then, the |
|
| 1820 |
///Finding the first arc take <em>O</em>(log<em>d</em>) time, |
|
| 1821 |
///where <em>d</em> is the number of outgoing arcs of \c s. Then the |
|
| 1822 | 1822 |
///consecutive arcs are found in constant time. |
| ... | ... |
@@ -52,7 +52,7 @@ |
| 52 | 52 |
typedef typename Digraph::template NodeMap<typename Digraph::Arc> PredMap; |
| 53 |
///Instantiates a |
|
| 53 |
///Instantiates a PredMap. |
|
| 54 | 54 |
|
| 55 |
///This function instantiates a |
|
| 55 |
///This function instantiates a PredMap. |
|
| 56 | 56 |
///\param g is the digraph, to which we would like to define the |
| 57 |
/// |
|
| 57 |
///PredMap. |
|
| 58 | 58 |
static PredMap *createPredMap(const Digraph &g) |
| ... | ... |
@@ -67,7 +67,7 @@ |
| 67 | 67 |
typedef NullMap<typename Digraph::Node,bool> ProcessedMap; |
| 68 |
///Instantiates a |
|
| 68 |
///Instantiates a ProcessedMap. |
|
| 69 | 69 |
|
| 70 |
///This function instantiates a |
|
| 70 |
///This function instantiates a ProcessedMap. |
|
| 71 | 71 |
///\param g is the digraph, to which |
| 72 |
///we would like to define the |
|
| 72 |
///we would like to define the ProcessedMap |
|
| 73 | 73 |
#ifdef DOXYGEN |
| ... | ... |
@@ -86,7 +86,7 @@ |
| 86 | 86 |
typedef typename Digraph::template NodeMap<bool> ReachedMap; |
| 87 |
///Instantiates a |
|
| 87 |
///Instantiates a ReachedMap. |
|
| 88 | 88 |
|
| 89 |
///This function instantiates a |
|
| 89 |
///This function instantiates a ReachedMap. |
|
| 90 | 90 |
///\param g is the digraph, to which |
| 91 |
///we would like to define the |
|
| 91 |
///we would like to define the ReachedMap. |
|
| 92 | 92 |
static ReachedMap *createReachedMap(const Digraph &g) |
| ... | ... |
@@ -101,7 +101,7 @@ |
| 101 | 101 |
typedef typename Digraph::template NodeMap<int> DistMap; |
| 102 |
///Instantiates a |
|
| 102 |
///Instantiates a DistMap. |
|
| 103 | 103 |
|
| 104 |
///This function instantiates a |
|
| 104 |
///This function instantiates a DistMap. |
|
| 105 | 105 |
///\param g is the digraph, to which we would like to define the |
| 106 |
/// |
|
| 106 |
///DistMap. |
|
| 107 | 107 |
static DistMap *createDistMap(const Digraph &g) |
| ... | ... |
@@ -229,6 +229,6 @@ |
| 229 | 229 |
///\brief \ref named-templ-param "Named parameter" for setting |
| 230 |
/// |
|
| 230 |
///PredMap type. |
|
| 231 | 231 |
/// |
| 232 | 232 |
///\ref named-templ-param "Named parameter" for setting |
| 233 |
/// |
|
| 233 |
///PredMap type. |
|
| 234 | 234 |
template <class T> |
| ... | ... |
@@ -248,6 +248,6 @@ |
| 248 | 248 |
///\brief \ref named-templ-param "Named parameter" for setting |
| 249 |
/// |
|
| 249 |
///DistMap type. |
|
| 250 | 250 |
/// |
| 251 | 251 |
///\ref named-templ-param "Named parameter" for setting |
| 252 |
/// |
|
| 252 |
///DistMap type. |
|
| 253 | 253 |
template <class T> |
| ... | ... |
@@ -267,6 +267,6 @@ |
| 267 | 267 |
///\brief \ref named-templ-param "Named parameter" for setting |
| 268 |
/// |
|
| 268 |
///ReachedMap type. |
|
| 269 | 269 |
/// |
| 270 | 270 |
///\ref named-templ-param "Named parameter" for setting |
| 271 |
/// |
|
| 271 |
///ReachedMap type. |
|
| 272 | 272 |
template <class T> |
| ... | ... |
@@ -286,6 +286,6 @@ |
| 286 | 286 |
///\brief \ref named-templ-param "Named parameter" for setting |
| 287 |
/// |
|
| 287 |
///ProcessedMap type. |
|
| 288 | 288 |
/// |
| 289 | 289 |
///\ref named-templ-param "Named parameter" for setting |
| 290 |
/// |
|
| 290 |
///ProcessedMap type. |
|
| 291 | 291 |
template <class T> |
| ... | ... |
@@ -303,6 +303,6 @@ |
| 303 | 303 |
///\brief \ref named-templ-param "Named parameter" for setting |
| 304 |
/// |
|
| 304 |
///ProcessedMap type to be <tt>Digraph::NodeMap<bool></tt>. |
|
| 305 | 305 |
/// |
| 306 | 306 |
///\ref named-templ-param "Named parameter" for setting |
| 307 |
/// |
|
| 307 |
///ProcessedMap type to be <tt>Digraph::NodeMap<bool></tt>. |
|
| 308 | 308 |
///If you don't set it explicitly, it will be automatically allocated. |
| ... | ... |
@@ -770,7 +770,7 @@ |
| 770 | 770 |
typedef typename Digraph::template NodeMap<typename Digraph::Arc> PredMap; |
| 771 |
///Instantiates a |
|
| 771 |
///Instantiates a PredMap. |
|
| 772 | 772 |
|
| 773 |
///This function instantiates a |
|
| 773 |
///This function instantiates a PredMap. |
|
| 774 | 774 |
///\param g is the digraph, to which we would like to define the |
| 775 |
/// |
|
| 775 |
///PredMap. |
|
| 776 | 776 |
static PredMap *createPredMap(const Digraph &g) |
| ... | ... |
@@ -786,7 +786,7 @@ |
| 786 | 786 |
typedef NullMap<typename Digraph::Node,bool> ProcessedMap; |
| 787 |
///Instantiates a |
|
| 787 |
///Instantiates a ProcessedMap. |
|
| 788 | 788 |
|
| 789 |
///This function instantiates a |
|
| 789 |
///This function instantiates a ProcessedMap. |
|
| 790 | 790 |
///\param g is the digraph, to which |
| 791 |
///we would like to define the |
|
| 791 |
///we would like to define the ProcessedMap. |
|
| 792 | 792 |
#ifdef DOXYGEN |
| ... | ... |
@@ -805,7 +805,7 @@ |
| 805 | 805 |
typedef typename Digraph::template NodeMap<bool> ReachedMap; |
| 806 |
///Instantiates a |
|
| 806 |
///Instantiates a ReachedMap. |
|
| 807 | 807 |
|
| 808 |
///This function instantiates a |
|
| 808 |
///This function instantiates a ReachedMap. |
|
| 809 | 809 |
///\param g is the digraph, to which |
| 810 |
///we would like to define the |
|
| 810 |
///we would like to define the ReachedMap. |
|
| 811 | 811 |
static ReachedMap *createReachedMap(const Digraph &g) |
| ... | ... |
@@ -820,7 +820,7 @@ |
| 820 | 820 |
typedef typename Digraph::template NodeMap<int> DistMap; |
| 821 |
///Instantiates a |
|
| 821 |
///Instantiates a DistMap. |
|
| 822 | 822 |
|
| 823 |
///This function instantiates a |
|
| 823 |
///This function instantiates a DistMap. |
|
| 824 | 824 |
///\param g is the digraph, to which we would like to define |
| 825 |
///the |
|
| 825 |
///the DistMap |
|
| 826 | 826 |
static DistMap *createDistMap(const Digraph &g) |
| ... | ... |
@@ -837,3 +837,3 @@ |
| 837 | 837 |
|
| 838 |
/// Default traits class used by |
|
| 838 |
/// Default traits class used by DfsWizard |
|
| 839 | 839 |
|
| ... | ... |
@@ -1003,6 +1003,6 @@ |
| 1003 | 1003 |
///\brief \ref named-func-param "Named parameter" |
| 1004 |
///for setting |
|
| 1004 |
///for setting PredMap object. |
|
| 1005 | 1005 |
/// |
| 1006 | 1006 |
///\ref named-func-param "Named parameter" |
| 1007 |
///for setting |
|
| 1007 |
///for setting PredMap object. |
|
| 1008 | 1008 |
template<class T> |
| ... | ... |
@@ -1021,6 +1021,6 @@ |
| 1021 | 1021 |
///\brief \ref named-func-param "Named parameter" |
| 1022 |
///for setting |
|
| 1022 |
///for setting ReachedMap object. |
|
| 1023 | 1023 |
/// |
| 1024 | 1024 |
/// \ref named-func-param "Named parameter" |
| 1025 |
///for setting |
|
| 1025 |
///for setting ReachedMap object. |
|
| 1026 | 1026 |
template<class T> |
| ... | ... |
@@ -1039,6 +1039,6 @@ |
| 1039 | 1039 |
///\brief \ref named-func-param "Named parameter" |
| 1040 |
///for setting |
|
| 1040 |
///for setting DistMap object. |
|
| 1041 | 1041 |
/// |
| 1042 | 1042 |
/// \ref named-func-param "Named parameter" |
| 1043 |
///for setting |
|
| 1043 |
///for setting DistMap object. |
|
| 1044 | 1044 |
template<class T> |
| ... | ... |
@@ -1057,6 +1057,6 @@ |
| 1057 | 1057 |
///\brief \ref named-func-param "Named parameter" |
| 1058 |
///for setting |
|
| 1058 |
///for setting ProcessedMap object. |
|
| 1059 | 1059 |
/// |
| 1060 | 1060 |
/// \ref named-func-param "Named parameter" |
| 1061 |
///for setting |
|
| 1061 |
///for setting ProcessedMap object. |
|
| 1062 | 1062 |
template<class T> |
| ... | ... |
@@ -1215,7 +1215,7 @@ |
| 1215 | 1215 |
|
| 1216 |
/// \brief Instantiates a |
|
| 1216 |
/// \brief Instantiates a ReachedMap. |
|
| 1217 | 1217 |
/// |
| 1218 |
/// This function instantiates a |
|
| 1218 |
/// This function instantiates a ReachedMap. |
|
| 1219 | 1219 |
/// \param digraph is the digraph, to which |
| 1220 |
/// we would like to define the |
|
| 1220 |
/// we would like to define the ReachedMap. |
|
| 1221 | 1221 |
static ReachedMap *createReachedMap(const Digraph &digraph) {
|
| ... | ... |
@@ -141,7 +141,7 @@ |
| 141 | 141 |
typedef typename Digraph::template NodeMap<typename Digraph::Arc> PredMap; |
| 142 |
///Instantiates a |
|
| 142 |
///Instantiates a PredMap. |
|
| 143 | 143 |
|
| 144 |
///This function instantiates a |
|
| 144 |
///This function instantiates a PredMap. |
|
| 145 | 145 |
///\param g is the digraph, to which we would like to define the |
| 146 |
/// |
|
| 146 |
///PredMap. |
|
| 147 | 147 |
static PredMap *createPredMap(const Digraph &g) |
| ... | ... |
@@ -157,7 +157,7 @@ |
| 157 | 157 |
typedef NullMap<typename Digraph::Node,bool> ProcessedMap; |
| 158 |
///Instantiates a |
|
| 158 |
///Instantiates a ProcessedMap. |
|
| 159 | 159 |
|
| 160 |
///This function instantiates a |
|
| 160 |
///This function instantiates a ProcessedMap. |
|
| 161 | 161 |
///\param g is the digraph, to which |
| 162 |
///we would like to define the |
|
| 162 |
///we would like to define the ProcessedMap |
|
| 163 | 163 |
#ifdef DOXYGEN |
| ... | ... |
@@ -176,7 +176,7 @@ |
| 176 | 176 |
typedef typename Digraph::template NodeMap<typename LM::Value> DistMap; |
| 177 |
///Instantiates a |
|
| 177 |
///Instantiates a DistMap. |
|
| 178 | 178 |
|
| 179 |
///This function instantiates a |
|
| 179 |
///This function instantiates a DistMap. |
|
| 180 | 180 |
///\param g is the digraph, to which we would like to define |
| 181 |
///the |
|
| 181 |
///the DistMap |
|
| 182 | 182 |
static DistMap *createDistMap(const Digraph &g) |
| ... | ... |
@@ -329,6 +329,6 @@ |
| 329 | 329 |
///\brief \ref named-templ-param "Named parameter" for setting |
| 330 |
/// |
|
| 330 |
///PredMap type. |
|
| 331 | 331 |
/// |
| 332 | 332 |
///\ref named-templ-param "Named parameter" for setting |
| 333 |
/// |
|
| 333 |
///PredMap type. |
|
| 334 | 334 |
template <class T> |
| ... | ... |
@@ -349,6 +349,6 @@ |
| 349 | 349 |
///\brief \ref named-templ-param "Named parameter" for setting |
| 350 |
/// |
|
| 350 |
///DistMap type. |
|
| 351 | 351 |
/// |
| 352 | 352 |
///\ref named-templ-param "Named parameter" for setting |
| 353 |
/// |
|
| 353 |
///DistMap type. |
|
| 354 | 354 |
template <class T> |
| ... | ... |
@@ -369,6 +369,6 @@ |
| 369 | 369 |
///\brief \ref named-templ-param "Named parameter" for setting |
| 370 |
/// |
|
| 370 |
///ProcessedMap type. |
|
| 371 | 371 |
/// |
| 372 | 372 |
///\ref named-templ-param "Named parameter" for setting |
| 373 |
/// |
|
| 373 |
///ProcessedMap type. |
|
| 374 | 374 |
template <class T> |
| ... | ... |
@@ -387,6 +387,6 @@ |
| 387 | 387 |
///\brief \ref named-templ-param "Named parameter" for setting |
| 388 |
/// |
|
| 388 |
///ProcessedMap type to be <tt>Digraph::NodeMap<bool></tt>. |
|
| 389 | 389 |
/// |
| 390 | 390 |
///\ref named-templ-param "Named parameter" for setting |
| 391 |
/// |
|
| 391 |
///ProcessedMap type to be <tt>Digraph::NodeMap<bool></tt>. |
|
| 392 | 392 |
///If you don't set it explicitly, it will be automatically allocated. |
| ... | ... |
@@ -455,3 +455,3 @@ |
| 455 | 455 |
/// \brief \ref named-templ-param "Named parameter" for setting |
| 456 |
///\ |
|
| 456 |
///\c OperationTraits type |
|
| 457 | 457 |
/// |
| ... | ... |
@@ -988,7 +988,7 @@ |
| 988 | 988 |
typedef typename Digraph::template NodeMap<typename Digraph::Arc> PredMap; |
| 989 |
///Instantiates a |
|
| 989 |
///Instantiates a PredMap. |
|
| 990 | 990 |
|
| 991 |
///This function instantiates a |
|
| 991 |
///This function instantiates a PredMap. |
|
| 992 | 992 |
///\param g is the digraph, to which we would like to define the |
| 993 |
/// |
|
| 993 |
///PredMap. |
|
| 994 | 994 |
static PredMap *createPredMap(const Digraph &g) |
| ... | ... |
@@ -1004,7 +1004,7 @@ |
| 1004 | 1004 |
typedef NullMap<typename Digraph::Node,bool> ProcessedMap; |
| 1005 |
///Instantiates a |
|
| 1005 |
///Instantiates a ProcessedMap. |
|
| 1006 | 1006 |
|
| 1007 |
///This function instantiates a |
|
| 1007 |
///This function instantiates a ProcessedMap. |
|
| 1008 | 1008 |
///\param g is the digraph, to which |
| 1009 |
///we would like to define the |
|
| 1009 |
///we would like to define the ProcessedMap. |
|
| 1010 | 1010 |
#ifdef DOXYGEN |
| ... | ... |
@@ -1023,7 +1023,7 @@ |
| 1023 | 1023 |
typedef typename Digraph::template NodeMap<typename LM::Value> DistMap; |
| 1024 |
///Instantiates a |
|
| 1024 |
///Instantiates a DistMap. |
|
| 1025 | 1025 |
|
| 1026 |
///This function instantiates a |
|
| 1026 |
///This function instantiates a DistMap. |
|
| 1027 | 1027 |
///\param g is the digraph, to which we would like to define |
| 1028 |
///the |
|
| 1028 |
///the DistMap |
|
| 1029 | 1029 |
static DistMap *createDistMap(const Digraph &g) |
| ... | ... |
@@ -1040,3 +1040,3 @@ |
| 1040 | 1040 |
|
| 1041 |
/// Default traits class used by |
|
| 1041 |
/// Default traits class used by DijkstraWizard |
|
| 1042 | 1042 |
|
| ... | ... |
@@ -1200,6 +1200,6 @@ |
| 1200 | 1200 |
///\brief \ref named-func-param "Named parameter" |
| 1201 |
///for setting |
|
| 1201 |
///for setting PredMap object. |
|
| 1202 | 1202 |
/// |
| 1203 | 1203 |
///\ref named-func-param "Named parameter" |
| 1204 |
///for setting |
|
| 1204 |
///for setting PredMap object. |
|
| 1205 | 1205 |
template<class T> |
| ... | ... |
@@ -1218,6 +1218,6 @@ |
| 1218 | 1218 |
///\brief \ref named-func-param "Named parameter" |
| 1219 |
///for setting |
|
| 1219 |
///for setting DistMap object. |
|
| 1220 | 1220 |
/// |
| 1221 | 1221 |
///\ref named-func-param "Named parameter" |
| 1222 |
///for setting |
|
| 1222 |
///for setting DistMap object. |
|
| 1223 | 1223 |
template<class T> |
| ... | ... |
@@ -1236,6 +1236,6 @@ |
| 1236 | 1236 |
///\brief \ref named-func-param "Named parameter" |
| 1237 |
///for setting |
|
| 1237 |
///for setting ProcessedMap object. |
|
| 1238 | 1238 |
/// |
| 1239 | 1239 |
/// \ref named-func-param "Named parameter" |
| 1240 |
///for setting |
|
| 1240 |
///for setting ProcessedMap object. |
|
| 1241 | 1241 |
template<class T> |
| ... | ... |
@@ -261,6 +261,6 @@ |
| 261 | 261 |
|
| 262 |
/// Bounding box of plain vectors ( |
|
| 262 |
/// Bounding box of plain vectors (points). |
|
| 263 | 263 |
|
| 264 | 264 |
/// A class to calculate or store the bounding box of plain vectors |
| 265 |
/// (\ref Point points). |
|
| 265 |
/// (\ref Point "points"). |
|
| 266 | 266 |
template<typename T> |
| ... | ... |
@@ -575,5 +575,4 @@ |
| 575 | 575 |
|
| 576 |
///Map of x-coordinates of a |
|
| 576 |
///Map of x-coordinates of a <tt>Point</tt>-map |
|
| 577 | 577 |
|
| 578 |
///\ingroup maps |
|
| 579 | 578 |
///Map of x-coordinates of a \ref Point "Point"-map. |
| ... | ... |
@@ -594,7 +593,5 @@ |
| 594 | 593 |
|
| 595 |
///Returns an |
|
| 594 |
///Returns an XMap class |
|
| 596 | 595 |
|
| 597 |
///This function just returns an \ref XMap class. |
|
| 598 |
/// |
|
| 599 |
/// |
|
| 596 |
///This function just returns an XMap class. |
|
| 600 | 597 |
///\relates XMap |
| ... | ... |
@@ -612,6 +609,5 @@ |
| 612 | 609 |
|
| 613 |
///Constant (read only) version of |
|
| 610 |
///Constant (read only) version of XMap |
|
| 614 | 611 |
|
| 615 |
///\ingroup maps |
|
| 616 |
///Constant (read only) version of \ref XMap |
|
| 612 |
///Constant (read only) version of XMap. |
|
| 617 | 613 |
/// |
| ... | ... |
@@ -630,7 +626,5 @@ |
| 630 | 626 |
|
| 631 |
///Returns a |
|
| 627 |
///Returns a ConstXMap class |
|
| 632 | 628 |
|
| 633 |
///This function just returns a \ref ConstXMap class. |
|
| 634 |
/// |
|
| 635 |
/// |
|
| 629 |
///This function just returns a ConstXMap class. |
|
| 636 | 630 |
///\relates ConstXMap |
| ... | ... |
@@ -642,5 +636,4 @@ |
| 642 | 636 |
|
| 643 |
///Map of y-coordinates of a |
|
| 637 |
///Map of y-coordinates of a <tt>Point</tt>-map |
|
| 644 | 638 |
|
| 645 |
///\ingroup maps |
|
| 646 | 639 |
///Map of y-coordinates of a \ref Point "Point"-map. |
| ... | ... |
@@ -661,7 +654,5 @@ |
| 661 | 654 |
|
| 662 |
///Returns a |
|
| 655 |
///Returns a YMap class |
|
| 663 | 656 |
|
| 664 |
///This function just returns a \ref YMap class. |
|
| 665 |
/// |
|
| 666 |
/// |
|
| 657 |
///This function just returns a YMap class. |
|
| 667 | 658 |
///\relates YMap |
| ... | ... |
@@ -679,6 +670,5 @@ |
| 679 | 670 |
|
| 680 |
///Constant (read only) version of |
|
| 671 |
///Constant (read only) version of YMap |
|
| 681 | 672 |
|
| 682 |
///\ingroup maps |
|
| 683 |
///Constant (read only) version of \ref YMap |
|
| 673 |
///Constant (read only) version of YMap. |
|
| 684 | 674 |
/// |
| ... | ... |
@@ -697,7 +687,5 @@ |
| 697 | 687 |
|
| 698 |
///Returns a |
|
| 688 |
///Returns a ConstYMap class |
|
| 699 | 689 |
|
| 700 |
///This function just returns a \ref ConstYMap class. |
|
| 701 |
/// |
|
| 702 |
/// |
|
| 690 |
///This function just returns a ConstYMap class. |
|
| 703 | 691 |
///\relates ConstYMap |
| ... | ... |
@@ -710,4 +698,3 @@ |
| 710 | 698 |
|
| 711 |
///\brief Map of the \ref Point::normSquare() "normSquare()" |
|
| 712 |
///of a \ref Point "Point"-map |
|
| 699 |
///\brief Map of the normSquare() of a <tt>Point</tt>-map |
|
| 713 | 700 |
/// |
| ... | ... |
@@ -715,3 +702,2 @@ |
| 715 | 702 |
///of a \ref Point "Point"-map. |
| 716 |
///\ingroup maps |
|
| 717 | 703 |
template<class M> |
| ... | ... |
@@ -729,7 +715,5 @@ |
| 729 | 715 |
|
| 730 |
///Returns a |
|
| 716 |
///Returns a NormSquareMap class |
|
| 731 | 717 |
|
| 732 |
///This function just returns a \ref NormSquareMap class. |
|
| 733 |
/// |
|
| 734 |
/// |
|
| 718 |
///This function just returns a NormSquareMap class. |
|
| 735 | 719 |
///\relates NormSquareMap |
| ... | ... |
@@ -393,11 +393,33 @@ |
| 393 | 393 |
|
| 394 |
/// \brief Return a \ref DigraphReader class |
|
| 395 |
/// |
|
| 396 |
/// This function just returns a \ref DigraphReader class. |
|
| 397 |
/// \relates DigraphReader |
|
| 394 | 398 |
template <typename Digraph> |
| 395 | 399 |
DigraphReader<Digraph> digraphReader(Digraph& digraph, |
| 396 |
std::istream& is = std::cin); |
|
| 397 |
|
|
| 400 |
std::istream& is = std::cin) {
|
|
| 401 |
DigraphReader<Digraph> tmp(digraph, is); |
|
| 402 |
return tmp; |
|
| 403 |
} |
|
| 404 |
|
|
| 405 |
/// \brief Return a \ref DigraphReader class |
|
| 406 |
/// |
|
| 407 |
/// This function just returns a \ref DigraphReader class. |
|
| 408 |
/// \relates DigraphReader |
|
| 398 | 409 |
template <typename Digraph> |
| 399 |
DigraphReader<Digraph> digraphReader(Digraph& digraph, const std::string& fn); |
|
| 400 |
|
|
| 410 |
DigraphReader<Digraph> digraphReader(Digraph& digraph, |
|
| 411 |
const std::string& fn) {
|
|
| 412 |
DigraphReader<Digraph> tmp(digraph, fn); |
|
| 413 |
return tmp; |
|
| 414 |
} |
|
| 415 |
|
|
| 416 |
/// \brief Return a \ref DigraphReader class |
|
| 417 |
/// |
|
| 418 |
/// This function just returns a \ref DigraphReader class. |
|
| 419 |
/// \relates DigraphReader |
|
| 401 | 420 |
template <typename Digraph> |
| 402 |
DigraphReader<Digraph> digraphReader(Digraph& digraph, const char |
|
| 421 |
DigraphReader<Digraph> digraphReader(Digraph& digraph, const char* fn) {
|
|
| 422 |
DigraphReader<Digraph> tmp(digraph, fn); |
|
| 423 |
return tmp; |
|
| 424 |
} |
|
| 403 | 425 |
|
| ... | ... |
@@ -1191,10 +1213,12 @@ |
| 1191 | 1213 |
|
| 1192 |
|
|
| 1214 |
template <typename Graph> |
|
| 1215 |
class GraphReader; |
|
| 1216 |
|
|
| 1217 |
/// \brief Return a \ref GraphReader class |
|
| 1193 | 1218 |
/// |
| 1194 |
/// This function just returns a \ref DigraphReader class. |
|
| 1195 |
/// \relates DigraphReader |
|
| 1196 |
template <typename Digraph> |
|
| 1197 |
DigraphReader<Digraph> digraphReader(Digraph& digraph, |
|
| 1198 |
std::istream& is = std::cin) {
|
|
| 1199 |
DigraphReader<Digraph> tmp(digraph, is); |
|
| 1219 |
/// This function just returns a \ref GraphReader class. |
|
| 1220 |
/// \relates GraphReader |
|
| 1221 |
template <typename Graph> |
|
| 1222 |
GraphReader<Graph> graphReader(Graph& graph, std::istream& is = std::cin) {
|
|
| 1223 |
GraphReader<Graph> tmp(graph, is); |
|
| 1200 | 1224 |
return tmp; |
| ... | ... |
@@ -1202,10 +1226,9 @@ |
| 1202 | 1226 |
|
| 1203 |
/// \brief Return a \ref |
|
| 1227 |
/// \brief Return a \ref GraphReader class |
|
| 1204 | 1228 |
/// |
| 1205 |
/// This function just returns a \ref DigraphReader class. |
|
| 1206 |
/// \relates DigraphReader |
|
| 1207 |
template <typename Digraph> |
|
| 1208 |
DigraphReader<Digraph> digraphReader(Digraph& digraph, |
|
| 1209 |
const std::string& fn) {
|
|
| 1210 |
DigraphReader<Digraph> tmp(digraph, fn); |
|
| 1229 |
/// This function just returns a \ref GraphReader class. |
|
| 1230 |
/// \relates GraphReader |
|
| 1231 |
template <typename Graph> |
|
| 1232 |
GraphReader<Graph> graphReader(Graph& graph, const std::string& fn) {
|
|
| 1233 |
GraphReader<Graph> tmp(graph, fn); |
|
| 1211 | 1234 |
return tmp; |
| ... | ... |
@@ -1213,9 +1236,9 @@ |
| 1213 | 1236 |
|
| 1214 |
/// \brief Return a \ref |
|
| 1237 |
/// \brief Return a \ref GraphReader class |
|
| 1215 | 1238 |
/// |
| 1216 |
/// This function just returns a \ref DigraphReader class. |
|
| 1217 |
/// \relates DigraphReader |
|
| 1218 |
template <typename Digraph> |
|
| 1219 |
DigraphReader<Digraph> digraphReader(Digraph& digraph, const char* fn) {
|
|
| 1220 |
|
|
| 1239 |
/// This function just returns a \ref GraphReader class. |
|
| 1240 |
/// \relates GraphReader |
|
| 1241 |
template <typename Graph> |
|
| 1242 |
GraphReader<Graph> graphReader(Graph& graph, const char* fn) {
|
|
| 1243 |
GraphReader<Graph> tmp(graph, fn); |
|
| 1221 | 1244 |
return tmp; |
| ... | ... |
@@ -1223,15 +1246,2 @@ |
| 1223 | 1246 |
|
| 1224 |
template <typename Graph> |
|
| 1225 |
class GraphReader; |
|
| 1226 |
|
|
| 1227 |
template <typename Graph> |
|
| 1228 |
GraphReader<Graph> graphReader(Graph& graph, |
|
| 1229 |
std::istream& is = std::cin); |
|
| 1230 |
|
|
| 1231 |
template <typename Graph> |
|
| 1232 |
GraphReader<Graph> graphReader(Graph& graph, const std::string& fn); |
|
| 1233 |
|
|
| 1234 |
template <typename Graph> |
|
| 1235 |
GraphReader<Graph> graphReader(Graph& graph, const char *fn); |
|
| 1236 |
|
|
| 1237 | 1247 |
/// \ingroup lemon_io |
| ... | ... |
@@ -2033,32 +2043,2 @@ |
| 2033 | 2043 |
|
| 2034 |
/// \brief Return a \ref GraphReader class |
|
| 2035 |
/// |
|
| 2036 |
/// This function just returns a \ref GraphReader class. |
|
| 2037 |
/// \relates GraphReader |
|
| 2038 |
template <typename Graph> |
|
| 2039 |
GraphReader<Graph> graphReader(Graph& graph, std::istream& is = std::cin) {
|
|
| 2040 |
GraphReader<Graph> tmp(graph, is); |
|
| 2041 |
return tmp; |
|
| 2042 |
} |
|
| 2043 |
|
|
| 2044 |
/// \brief Return a \ref GraphReader class |
|
| 2045 |
/// |
|
| 2046 |
/// This function just returns a \ref GraphReader class. |
|
| 2047 |
/// \relates GraphReader |
|
| 2048 |
template <typename Graph> |
|
| 2049 |
GraphReader<Graph> graphReader(Graph& graph, const std::string& fn) {
|
|
| 2050 |
GraphReader<Graph> tmp(graph, fn); |
|
| 2051 |
return tmp; |
|
| 2052 |
} |
|
| 2053 |
|
|
| 2054 |
/// \brief Return a \ref GraphReader class |
|
| 2055 |
/// |
|
| 2056 |
/// This function just returns a \ref GraphReader class. |
|
| 2057 |
/// \relates GraphReader |
|
| 2058 |
template <typename Graph> |
|
| 2059 |
GraphReader<Graph> graphReader(Graph& graph, const char* fn) {
|
|
| 2060 |
GraphReader<Graph> tmp(graph, fn); |
|
| 2061 |
return tmp; |
|
| 2062 |
} |
|
| 2063 |
|
|
| 2064 | 2044 |
class SectionReader; |
| ... | ... |
@@ -353,13 +353,34 @@ |
| 353 | 353 |
|
| 354 |
/// \brief Return a \ref DigraphWriter class |
|
| 355 |
/// |
|
| 356 |
/// This function just returns a \ref DigraphWriter class. |
|
| 357 |
/// \relates DigraphWriter |
|
| 354 | 358 |
template <typename Digraph> |
| 355 | 359 |
DigraphWriter<Digraph> digraphWriter(const Digraph& digraph, |
| 356 |
std::ostream& os = std::cout) |
|
| 360 |
std::ostream& os = std::cout) {
|
|
| 361 |
DigraphWriter<Digraph> tmp(digraph, os); |
|
| 362 |
return tmp; |
|
| 363 |
} |
|
| 357 | 364 |
|
| 365 |
/// \brief Return a \ref DigraphWriter class |
|
| 366 |
/// |
|
| 367 |
/// This function just returns a \ref DigraphWriter class. |
|
| 368 |
/// \relates DigraphWriter |
|
| 358 | 369 |
template <typename Digraph> |
| 359 | 370 |
DigraphWriter<Digraph> digraphWriter(const Digraph& digraph, |
| 360 |
const std::string& fn) |
|
| 371 |
const std::string& fn) {
|
|
| 372 |
DigraphWriter<Digraph> tmp(digraph, fn); |
|
| 373 |
return tmp; |
|
| 374 |
} |
|
| 361 | 375 |
|
| 376 |
/// \brief Return a \ref DigraphWriter class |
|
| 377 |
/// |
|
| 378 |
/// This function just returns a \ref DigraphWriter class. |
|
| 379 |
/// \relates DigraphWriter |
|
| 362 | 380 |
template <typename Digraph> |
| 363 | 381 |
DigraphWriter<Digraph> digraphWriter(const Digraph& digraph, |
| 364 |
const char |
|
| 382 |
const char* fn) {
|
|
| 383 |
DigraphWriter<Digraph> tmp(digraph, fn); |
|
| 384 |
return tmp; |
|
| 385 |
} |
|
| 365 | 386 |
|
| ... | ... |
@@ -915,10 +936,13 @@ |
| 915 | 936 |
|
| 916 |
|
|
| 937 |
template <typename Graph> |
|
| 938 |
class GraphWriter; |
|
| 939 |
|
|
| 940 |
/// \brief Return a \ref GraphWriter class |
|
| 917 | 941 |
/// |
| 918 |
/// This function just returns a \ref DigraphWriter class. |
|
| 919 |
/// \relates DigraphWriter |
|
| 920 |
template <typename Digraph> |
|
| 921 |
DigraphWriter<Digraph> digraphWriter(const Digraph& digraph, |
|
| 942 |
/// This function just returns a \ref GraphWriter class. |
|
| 943 |
/// \relates GraphWriter |
|
| 944 |
template <typename Graph> |
|
| 945 |
GraphWriter<Graph> graphWriter(const Graph& graph, |
|
| 922 | 946 |
std::ostream& os = std::cout) {
|
| 923 |
|
|
| 947 |
GraphWriter<Graph> tmp(graph, os); |
|
| 924 | 948 |
return tmp; |
| ... | ... |
@@ -926,10 +950,9 @@ |
| 926 | 950 |
|
| 927 |
/// \brief Return a \ref |
|
| 951 |
/// \brief Return a \ref GraphWriter class |
|
| 928 | 952 |
/// |
| 929 |
/// This function just returns a \ref DigraphWriter class. |
|
| 930 |
/// \relates DigraphWriter |
|
| 931 |
template <typename Digraph> |
|
| 932 |
DigraphWriter<Digraph> digraphWriter(const Digraph& digraph, |
|
| 933 |
const std::string& fn) {
|
|
| 934 |
DigraphWriter<Digraph> tmp(digraph, fn); |
|
| 953 |
/// This function just returns a \ref GraphWriter class. |
|
| 954 |
/// \relates GraphWriter |
|
| 955 |
template <typename Graph> |
|
| 956 |
GraphWriter<Graph> graphWriter(const Graph& graph, const std::string& fn) {
|
|
| 957 |
GraphWriter<Graph> tmp(graph, fn); |
|
| 935 | 958 |
return tmp; |
| ... | ... |
@@ -937,10 +960,9 @@ |
| 937 | 960 |
|
| 938 |
/// \brief Return a \ref |
|
| 961 |
/// \brief Return a \ref GraphWriter class |
|
| 939 | 962 |
/// |
| 940 |
/// This function just returns a \ref DigraphWriter class. |
|
| 941 |
/// \relates DigraphWriter |
|
| 942 |
template <typename Digraph> |
|
| 943 |
DigraphWriter<Digraph> digraphWriter(const Digraph& digraph, |
|
| 944 |
const char* fn) {
|
|
| 945 |
DigraphWriter<Digraph> tmp(digraph, fn); |
|
| 963 |
/// This function just returns a \ref GraphWriter class. |
|
| 964 |
/// \relates GraphWriter |
|
| 965 |
template <typename Graph> |
|
| 966 |
GraphWriter<Graph> graphWriter(const Graph& graph, const char* fn) {
|
|
| 967 |
GraphWriter<Graph> tmp(graph, fn); |
|
| 946 | 968 |
return tmp; |
| ... | ... |
@@ -948,15 +970,2 @@ |
| 948 | 970 |
|
| 949 |
template <typename Graph> |
|
| 950 |
class GraphWriter; |
|
| 951 |
|
|
| 952 |
template <typename Graph> |
|
| 953 |
GraphWriter<Graph> graphWriter(const Graph& graph, |
|
| 954 |
std::ostream& os = std::cout); |
|
| 955 |
|
|
| 956 |
template <typename Graph> |
|
| 957 |
GraphWriter<Graph> graphWriter(const Graph& graph, const std::string& fn); |
|
| 958 |
|
|
| 959 |
template <typename Graph> |
|
| 960 |
GraphWriter<Graph> graphWriter(const Graph& graph, const char *fn); |
|
| 961 |
|
|
| 962 | 971 |
/// \ingroup lemon_io |
| ... | ... |
@@ -1528,33 +1537,2 @@ |
| 1528 | 1537 |
|
| 1529 |
/// \brief Return a \ref GraphWriter class |
|
| 1530 |
/// |
|
| 1531 |
/// This function just returns a \ref GraphWriter class. |
|
| 1532 |
/// \relates GraphWriter |
|
| 1533 |
template <typename Graph> |
|
| 1534 |
GraphWriter<Graph> graphWriter(const Graph& graph, |
|
| 1535 |
std::ostream& os = std::cout) {
|
|
| 1536 |
GraphWriter<Graph> tmp(graph, os); |
|
| 1537 |
return tmp; |
|
| 1538 |
} |
|
| 1539 |
|
|
| 1540 |
/// \brief Return a \ref GraphWriter class |
|
| 1541 |
/// |
|
| 1542 |
/// This function just returns a \ref GraphWriter class. |
|
| 1543 |
/// \relates GraphWriter |
|
| 1544 |
template <typename Graph> |
|
| 1545 |
GraphWriter<Graph> graphWriter(const Graph& graph, const std::string& fn) {
|
|
| 1546 |
GraphWriter<Graph> tmp(graph, fn); |
|
| 1547 |
return tmp; |
|
| 1548 |
} |
|
| 1549 |
|
|
| 1550 |
/// \brief Return a \ref GraphWriter class |
|
| 1551 |
/// |
|
| 1552 |
/// This function just returns a \ref GraphWriter class. |
|
| 1553 |
/// \relates GraphWriter |
|
| 1554 |
template <typename Graph> |
|
| 1555 |
GraphWriter<Graph> graphWriter(const Graph& graph, const char* fn) {
|
|
| 1556 |
GraphWriter<Graph> tmp(graph, fn); |
|
| 1557 |
return tmp; |
|
| 1558 |
} |
|
| 1559 |
|
|
| 1560 | 1538 |
class SectionWriter; |
| ... | ... |
@@ -45,3 +45,3 @@ |
| 45 | 45 |
public: |
| 46 |
/// \ |
|
| 46 |
/// \brief The key type of the map. |
|
| 47 | 47 |
typedef K Key; |
| ... | ... |
@@ -75,5 +75,5 @@ |
| 75 | 75 |
|
| 76 |
/// Returns a \ref NullMap class |
|
| 77 |
|
|
| 78 |
/// |
|
| 76 |
/// Returns a \c NullMap class |
|
| 77 |
|
|
| 78 |
/// This function just returns a \c NullMap class. |
|
| 79 | 79 |
/// \relates NullMap |
| ... | ... |
@@ -90,3 +90,3 @@ |
| 90 | 90 |
/// |
| 91 |
/// In other aspects it is equivalent to \ |
|
| 91 |
/// In other aspects it is equivalent to \c NullMap. |
|
| 92 | 92 |
/// So it conforms the \ref concepts::ReadWriteMap "ReadWriteMap" |
| ... | ... |
@@ -135,5 +135,5 @@ |
| 135 | 135 |
|
| 136 |
/// Returns a \ref ConstMap class |
|
| 137 |
|
|
| 138 |
/// |
|
| 136 |
/// Returns a \c ConstMap class |
|
| 137 |
|
|
| 138 |
/// This function just returns a \c ConstMap class. |
|
| 139 | 139 |
/// \relates ConstMap |
| ... | ... |
@@ -158,3 +158,3 @@ |
| 158 | 158 |
/// |
| 159 |
/// In other aspects it is equivalent to \ |
|
| 159 |
/// In other aspects it is equivalent to \c NullMap. |
|
| 160 | 160 |
/// So it conforms the \ref concepts::ReadWriteMap "ReadWriteMap" |
| ... | ... |
@@ -184,5 +184,5 @@ |
| 184 | 184 |
|
| 185 |
/// Returns a \ref ConstMap class with inlined constant value |
|
| 186 |
|
|
| 187 |
/// |
|
| 185 |
/// Returns a \c ConstMap class with inlined constant value |
|
| 186 |
|
|
| 187 |
/// This function just returns a \c ConstMap class with inlined |
|
| 188 | 188 |
/// constant value. |
| ... | ... |
@@ -214,5 +214,5 @@ |
| 214 | 214 |
|
| 215 |
/// Returns an \ref IdentityMap class |
|
| 216 |
|
|
| 217 |
/// |
|
| 215 |
/// Returns an \c IdentityMap class |
|
| 216 |
|
|
| 217 |
/// This function just returns an \c IdentityMap class. |
|
| 218 | 218 |
/// \relates IdentityMap |
| ... | ... |
@@ -230,3 +230,3 @@ |
| 230 | 230 |
/// It can be used with some data structures, for example |
| 231 |
/// \ |
|
| 231 |
/// \c UnionFind, \c BinHeap, when the used items are small |
|
| 232 | 232 |
/// integers. This map conforms the \ref concepts::ReferenceMap |
| ... | ... |
@@ -270,3 +270,3 @@ |
| 270 | 270 |
|
| 271 |
/// Constructs the map from another \ |
|
| 271 |
/// Constructs the map from another \c RangeMap. |
|
| 272 | 272 |
template <typename V1> |
| ... | ... |
@@ -313,5 +313,5 @@ |
| 313 | 313 |
|
| 314 |
/// Returns a \ref RangeMap class |
|
| 315 |
|
|
| 316 |
/// |
|
| 314 |
/// Returns a \c RangeMap class |
|
| 315 |
|
|
| 316 |
/// This function just returns a \c RangeMap class. |
|
| 317 | 317 |
/// \relates RangeMap |
| ... | ... |
@@ -322,6 +322,6 @@ |
| 322 | 322 |
|
| 323 |
/// \brief Returns a \ |
|
| 323 |
/// \brief Returns a \c RangeMap class created from an appropriate |
|
| 324 | 324 |
/// \c std::vector |
| 325 | 325 |
|
| 326 |
/// This function just returns a \ |
|
| 326 |
/// This function just returns a \c RangeMap class created from an |
|
| 327 | 327 |
/// appropriate \c std::vector. |
| ... | ... |
@@ -390,3 +390,3 @@ |
| 390 | 390 |
|
| 391 |
/// \brief Constructs the map from another \ |
|
| 391 |
/// \brief Constructs the map from another \c SparseMap. |
|
| 392 | 392 |
template<typename V1, typename Comp1> |
| ... | ... |
@@ -435,5 +435,5 @@ |
| 435 | 435 |
|
| 436 |
/// Returns a \ref SparseMap class |
|
| 437 |
|
|
| 438 |
/// |
|
| 436 |
/// Returns a \c SparseMap class |
|
| 437 |
|
|
| 438 |
/// This function just returns a \c SparseMap class with specified |
|
| 439 | 439 |
/// default value. |
| ... | ... |
@@ -450,6 +450,6 @@ |
| 450 | 450 |
|
| 451 |
/// \brief Returns a \ |
|
| 451 |
/// \brief Returns a \c SparseMap class created from an appropriate |
|
| 452 | 452 |
/// \c std::map |
| 453 | 453 |
|
| 454 |
/// This function just returns a \ |
|
| 454 |
/// This function just returns a \c SparseMap class created from an |
|
| 455 | 455 |
/// appropriate \c std::map. |
| ... | ... |
@@ -503,5 +503,5 @@ |
| 503 | 503 |
|
| 504 |
/// Returns a \ref ComposeMap class |
|
| 505 |
|
|
| 506 |
/// |
|
| 504 |
/// Returns a \c ComposeMap class |
|
| 505 |
|
|
| 506 |
/// This function just returns a \c ComposeMap class. |
|
| 507 | 507 |
/// |
| ... | ... |
@@ -558,5 +558,5 @@ |
| 558 | 558 |
|
| 559 |
/// Returns a \ref CombineMap class |
|
| 560 |
|
|
| 561 |
/// |
|
| 559 |
/// Returns a \c CombineMap class |
|
| 560 |
|
|
| 561 |
/// This function just returns a \c CombineMap class. |
|
| 562 | 562 |
/// |
| ... | ... |
@@ -627,5 +627,5 @@ |
| 627 | 627 |
|
| 628 |
/// Returns a \ref FunctorToMap class |
|
| 629 |
|
|
| 630 |
/// |
|
| 628 |
/// Returns a \c FunctorToMap class |
|
| 629 |
|
|
| 630 |
/// This function just returns a \c FunctorToMap class. |
|
| 631 | 631 |
/// |
| ... | ... |
@@ -686,5 +686,5 @@ |
| 686 | 686 |
|
| 687 |
/// Returns a \ref MapToFunctor class |
|
| 688 |
|
|
| 689 |
/// |
|
| 687 |
/// Returns a \c MapToFunctor class |
|
| 688 |
|
|
| 689 |
/// This function just returns a \c MapToFunctor class. |
|
| 690 | 690 |
/// \relates MapToFunctor |
| ... | ... |
@@ -725,5 +725,5 @@ |
| 725 | 725 |
|
| 726 |
/// Returns a \ref ConvertMap class |
|
| 727 |
|
|
| 728 |
/// |
|
| 726 |
/// Returns a \c ConvertMap class |
|
| 727 |
|
|
| 728 |
/// This function just returns a \c ConvertMap class. |
|
| 729 | 729 |
/// \relates ConvertMap |
| ... | ... |
@@ -765,5 +765,5 @@ |
| 765 | 765 |
|
| 766 |
/// Returns a \ref ForkMap class |
|
| 767 |
|
|
| 768 |
/// |
|
| 766 |
/// Returns a \c ForkMap class |
|
| 767 |
|
|
| 768 |
/// This function just returns a \c ForkMap class. |
|
| 769 | 769 |
/// \relates ForkMap |
| ... | ... |
@@ -809,5 +809,5 @@ |
| 809 | 809 |
|
| 810 |
/// Returns an \ref AddMap class |
|
| 811 |
|
|
| 812 |
/// |
|
| 810 |
/// Returns an \c AddMap class |
|
| 811 |
|
|
| 812 |
/// This function just returns an \c AddMap class. |
|
| 813 | 813 |
/// |
| ... | ... |
@@ -857,5 +857,5 @@ |
| 857 | 857 |
|
| 858 |
/// Returns a \ref SubMap class |
|
| 859 |
|
|
| 860 |
/// |
|
| 858 |
/// Returns a \c SubMap class |
|
| 859 |
|
|
| 860 |
/// This function just returns a \c SubMap class. |
|
| 861 | 861 |
/// |
| ... | ... |
@@ -906,5 +906,5 @@ |
| 906 | 906 |
|
| 907 |
/// Returns a \ref MulMap class |
|
| 908 |
|
|
| 909 |
/// |
|
| 907 |
/// Returns a \c MulMap class |
|
| 908 |
|
|
| 909 |
/// This function just returns a \c MulMap class. |
|
| 910 | 910 |
/// |
| ... | ... |
@@ -954,5 +954,5 @@ |
| 954 | 954 |
|
| 955 |
/// Returns a \ref DivMap class |
|
| 956 |
|
|
| 957 |
/// |
|
| 955 |
/// Returns a \c DivMap class |
|
| 956 |
|
|
| 957 |
/// This function just returns a \c DivMap class. |
|
| 958 | 958 |
/// |
| ... | ... |
@@ -1040,5 +1040,5 @@ |
| 1040 | 1040 |
|
| 1041 |
/// Returns a \ref ShiftMap class |
|
| 1042 |
|
|
| 1043 |
/// |
|
| 1041 |
/// Returns a \c ShiftMap class |
|
| 1042 |
|
|
| 1043 |
/// This function just returns a \c ShiftMap class. |
|
| 1044 | 1044 |
/// |
| ... | ... |
@@ -1054,5 +1054,5 @@ |
| 1054 | 1054 |
|
| 1055 |
/// Returns a \ref ShiftWriteMap class |
|
| 1056 |
|
|
| 1057 |
/// |
|
| 1055 |
/// Returns a \c ShiftWriteMap class |
|
| 1056 |
|
|
| 1057 |
/// This function just returns a \c ShiftWriteMap class. |
|
| 1058 | 1058 |
/// |
| ... | ... |
@@ -1142,5 +1142,5 @@ |
| 1142 | 1142 |
|
| 1143 |
/// Returns a \ref ScaleMap class |
|
| 1144 |
|
|
| 1145 |
/// |
|
| 1143 |
/// Returns a \c ScaleMap class |
|
| 1144 |
|
|
| 1145 |
/// This function just returns a \c ScaleMap class. |
|
| 1146 | 1146 |
/// |
| ... | ... |
@@ -1156,5 +1156,5 @@ |
| 1156 | 1156 |
|
| 1157 |
/// Returns a \ref ScaleWriteMap class |
|
| 1158 |
|
|
| 1159 |
/// |
|
| 1157 |
/// Returns a \c ScaleWriteMap class |
|
| 1158 |
|
|
| 1159 |
/// This function just returns a \c ScaleWriteMap class. |
|
| 1160 | 1160 |
/// |
| ... | ... |
@@ -1242,5 +1242,5 @@ |
| 1242 | 1242 |
|
| 1243 |
/// Returns a \ref NegMap class |
|
| 1244 |
|
|
| 1245 |
/// |
|
| 1243 |
/// Returns a \c NegMap class |
|
| 1244 |
|
|
| 1245 |
/// This function just returns a \c NegMap class. |
|
| 1246 | 1246 |
/// |
| ... | ... |
@@ -1255,5 +1255,5 @@ |
| 1255 | 1255 |
|
| 1256 |
/// Returns a \ref NegWriteMap class |
|
| 1257 |
|
|
| 1258 |
/// |
|
| 1256 |
/// Returns a \c NegWriteMap class |
|
| 1257 |
|
|
| 1258 |
/// This function just returns a \c NegWriteMap class. |
|
| 1259 | 1259 |
/// |
| ... | ... |
@@ -1298,5 +1298,5 @@ |
| 1298 | 1298 |
|
| 1299 |
/// Returns an \ref AbsMap class |
|
| 1300 |
|
|
| 1301 |
/// |
|
| 1299 |
/// Returns an \c AbsMap class |
|
| 1300 |
|
|
| 1301 |
/// This function just returns an \c AbsMap class. |
|
| 1302 | 1302 |
/// |
| ... | ... |
@@ -1347,5 +1347,5 @@ |
| 1347 | 1347 |
|
| 1348 |
/// Returns a \ref TrueMap class |
|
| 1349 |
|
|
| 1350 |
/// |
|
| 1348 |
/// Returns a \c TrueMap class |
|
| 1349 |
|
|
| 1350 |
/// This function just returns a \c TrueMap class. |
|
| 1351 | 1351 |
/// \relates TrueMap |
| ... | ... |
@@ -1384,5 +1384,5 @@ |
| 1384 | 1384 |
|
| 1385 |
/// Returns a \ref FalseMap class |
|
| 1386 |
|
|
| 1387 |
/// |
|
| 1385 |
/// Returns a \c FalseMap class |
|
| 1386 |
|
|
| 1387 |
/// This function just returns a \c FalseMap class. |
|
| 1388 | 1388 |
/// \relates FalseMap |
| ... | ... |
@@ -1431,5 +1431,5 @@ |
| 1431 | 1431 |
|
| 1432 |
/// Returns an \ref AndMap class |
|
| 1433 |
|
|
| 1434 |
/// |
|
| 1432 |
/// Returns an \c AndMap class |
|
| 1433 |
|
|
| 1434 |
/// This function just returns an \c AndMap class. |
|
| 1435 | 1435 |
/// |
| ... | ... |
@@ -1479,5 +1479,5 @@ |
| 1479 | 1479 |
|
| 1480 |
/// Returns an \ref OrMap class |
|
| 1481 |
|
|
| 1482 |
/// |
|
| 1480 |
/// Returns an \c OrMap class |
|
| 1481 |
|
|
| 1482 |
/// This function just returns an \c OrMap class. |
|
| 1483 | 1483 |
/// |
| ... | ... |
@@ -1546,5 +1546,5 @@ |
| 1546 | 1546 |
|
| 1547 |
/// Returns a \ref NotMap class |
|
| 1548 |
|
|
| 1549 |
/// |
|
| 1547 |
/// Returns a \c NotMap class |
|
| 1548 |
|
|
| 1549 |
/// This function just returns a \c NotMap class. |
|
| 1550 | 1550 |
/// |
| ... | ... |
@@ -1559,5 +1559,5 @@ |
| 1559 | 1559 |
|
| 1560 |
/// Returns a \ref NotWriteMap class |
|
| 1561 |
|
|
| 1562 |
/// |
|
| 1560 |
/// Returns a \c NotWriteMap class |
|
| 1561 |
|
|
| 1562 |
/// This function just returns a \c NotWriteMap class. |
|
| 1563 | 1563 |
/// |
| ... | ... |
@@ -1607,5 +1607,5 @@ |
| 1607 | 1607 |
|
| 1608 |
/// Returns an \ref EqualMap class |
|
| 1609 |
|
|
| 1610 |
/// |
|
| 1608 |
/// Returns an \c EqualMap class |
|
| 1609 |
|
|
| 1610 |
/// This function just returns an \c EqualMap class. |
|
| 1611 | 1611 |
/// |
| ... | ... |
@@ -1655,5 +1655,5 @@ |
| 1655 | 1655 |
|
| 1656 |
/// Returns an \ref LessMap class |
|
| 1657 |
|
|
| 1658 |
/// |
|
| 1656 |
/// Returns an \c LessMap class |
|
| 1657 |
|
|
| 1658 |
/// This function just returns an \c LessMap class. |
|
| 1659 | 1659 |
/// |
| ... | ... |
@@ -1685,2 +1685,7 @@ |
| 1685 | 1685 |
|
| 1686 |
/// @} |
|
| 1687 |
|
|
| 1688 |
/// \addtogroup maps |
|
| 1689 |
/// @{
|
|
| 1690 |
|
|
| 1686 | 1691 |
/// \brief Writable bool map for logging each \c true assigned element |
| ... | ... |
@@ -1747,5 +1752,5 @@ |
| 1747 | 1752 |
|
| 1748 |
/// Returns a \ref LoggerBoolMap class |
|
| 1749 |
|
|
| 1750 |
/// |
|
| 1753 |
/// Returns a \c LoggerBoolMap class |
|
| 1754 |
|
|
| 1755 |
/// This function just returns a \c LoggerBoolMap class. |
|
| 1751 | 1756 |
/// |
| ... | ... |
@@ -1769,3 +1774,3 @@ |
| 1769 | 1774 |
/// it cannot be used when a readable map is needed, for example as |
| 1770 |
/// \c ReachedMap for \ |
|
| 1775 |
/// \c ReachedMap for \c Bfs, \c Dfs and \c Dijkstra algorithms. |
|
| 1771 | 1776 |
/// |
| ... | ... |
@@ -1777,2 +1782,7 @@ |
| 1777 | 1782 |
|
| 1783 |
/// @} |
|
| 1784 |
|
|
| 1785 |
/// \addtogroup graph_maps |
|
| 1786 |
/// @{
|
|
| 1787 |
|
|
| 1778 | 1788 |
/// Provides an immutable and unique id for each item in the graph. |
| ... | ... |
@@ -1884,4 +1894,2 @@ |
| 1884 | 1894 |
|
| 1885 |
|
|
| 1886 |
|
|
| 1887 | 1895 |
/// \brief Constructor. |
| ... | ... |
@@ -2051,4 +2059,2 @@ |
| 2051 | 2059 |
|
| 2052 |
|
|
| 2053 |
|
|
| 2054 | 2060 |
}; |
| ... | ... |
@@ -2268,3 +2274,3 @@ |
| 2268 | 2274 |
/// Constructor |
| 2269 |
/// \param |
|
| 2275 |
/// \param digraph The digraph that the map belongs to. |
|
| 2270 | 2276 |
explicit SourceMap(const Digraph& digraph) : _digraph(digraph) {}
|
| ... | ... |
@@ -2284,5 +2290,5 @@ |
| 2284 | 2290 |
|
| 2285 |
/// \brief Returns a \ |
|
| 2291 |
/// \brief Returns a \c SourceMap class. |
|
| 2286 | 2292 |
/// |
| 2287 |
/// This function just returns an \ |
|
| 2293 |
/// This function just returns an \c SourceMap class. |
|
| 2288 | 2294 |
/// \relates SourceMap |
| ... | ... |
@@ -2307,3 +2313,3 @@ |
| 2307 | 2313 |
/// Constructor |
| 2308 |
/// \param |
|
| 2314 |
/// \param digraph The digraph that the map belongs to. |
|
| 2309 | 2315 |
explicit TargetMap(const Digraph& digraph) : _digraph(digraph) {}
|
| ... | ... |
@@ -2323,5 +2329,5 @@ |
| 2323 | 2329 |
|
| 2324 |
/// \brief Returns a \ |
|
| 2330 |
/// \brief Returns a \c TargetMap class. |
|
| 2325 | 2331 |
/// |
| 2326 |
/// This function just returns a \ |
|
| 2332 |
/// This function just returns a \c TargetMap class. |
|
| 2327 | 2333 |
/// \relates TargetMap |
| ... | ... |
@@ -2346,3 +2352,3 @@ |
| 2346 | 2352 |
/// Constructor |
| 2347 |
/// \param |
|
| 2353 |
/// \param graph The graph that the map belongs to. |
|
| 2348 | 2354 |
explicit ForwardMap(const Graph& graph) : _graph(graph) {}
|
| ... | ... |
@@ -2362,5 +2368,5 @@ |
| 2362 | 2368 |
|
| 2363 |
/// \brief Returns a \ |
|
| 2369 |
/// \brief Returns a \c ForwardMap class. |
|
| 2364 | 2370 |
/// |
| 2365 |
/// This function just returns an \ |
|
| 2371 |
/// This function just returns an \c ForwardMap class. |
|
| 2366 | 2372 |
/// \relates ForwardMap |
| ... | ... |
@@ -2385,3 +2391,3 @@ |
| 2385 | 2391 |
/// Constructor |
| 2386 |
/// \param |
|
| 2392 |
/// \param graph The graph that the map belongs to. |
|
| 2387 | 2393 |
explicit BackwardMap(const Graph& graph) : _graph(graph) {}
|
| ... | ... |
@@ -2401,5 +2407,5 @@ |
| 2401 | 2407 |
|
| 2402 |
/// \brief Returns a \ref BackwardMap class |
|
| 2403 |
|
|
| 2404 |
/// |
|
| 2408 |
/// \brief Returns a \c BackwardMap class |
|
| 2409 |
|
|
| 2410 |
/// This function just returns a \c BackwardMap class. |
|
| 2405 | 2411 |
/// \relates BackwardMap |
| ... | ... |
@@ -367,3 +367,3 @@ |
| 367 | 367 |
///This constructor immediately makes a snapshot of the digraph. |
| 368 |
///\param |
|
| 368 |
///\param graph The digraph we make a snapshot of. |
|
| 369 | 369 |
Snapshot(SmartDigraph &graph) : _graph(&graph) {
|
| ... | ... |
@@ -379,3 +379,3 @@ |
| 379 | 379 |
///call, the previous snapshot gets lost. |
| 380 |
///\param |
|
| 380 |
///\param graph The digraph we make the snapshot of. |
|
| 381 | 381 |
void save(SmartDigraph &graph) |
| ... | ... |
@@ -777,3 +777,3 @@ |
| 777 | 777 |
///This constructor immediately makes a snapshot of the digraph. |
| 778 |
///\param |
|
| 778 |
///\param graph The digraph we make a snapshot of. |
|
| 779 | 779 |
Snapshot(SmartGraph &graph) {
|
| ... | ... |
@@ -788,3 +788,3 @@ |
| 788 | 788 |
///call, the previous snapshot gets lost. |
| 789 |
///\param |
|
| 789 |
///\param graph The digraph we make the snapshot of. |
|
| 790 | 790 |
void save(SmartGraph &graph) |
| ... | ... |
@@ -313,8 +313,7 @@ |
| 313 | 313 |
///but it provides a bit finer control on the execution. |
| 314 |
///The \ref Timer also counts the number of \ref start() |
|
| 315 |
///executions, and is stops only after the same amount (or more) |
|
| 316 |
///\ref stop() "stop()"s. This can be useful e.g. to compute |
|
| 317 |
///the running time |
|
| 314 |
///The \ref lemon::Timer "Timer" also counts the number of |
|
| 315 |
///\ref lemon::Timer::start() "start()" executions, and it stops |
|
| 316 |
///only after the same amount (or more) \ref lemon::Timer::stop() |
|
| 317 |
///"stop()"s. This can be useful e.g. to compute the running time |
|
| 318 | 318 |
///of recursive functions. |
| 319 |
/// |
|
| 320 | 319 |
|
| ... | ... |
@@ -474,3 +473,3 @@ |
| 474 | 473 |
|
| 475 |
///Same as |
|
| 474 |
///Same as Timer but prints a report on destruction. |
|
| 476 | 475 |
|
| ... | ... |
@@ -493,4 +492,5 @@ |
| 493 | 492 |
public: |
| 494 |
/// |
|
| 493 |
///Constructor |
|
| 495 | 494 |
|
| 495 |
///Constructor. |
|
| 496 | 496 |
///\param title This text will be printed before the ellapsed time. |
| ... | ... |
@@ -498,6 +498,5 @@ |
| 498 | 498 |
///\param run Sets whether the timer should start immediately. |
| 499 |
|
|
| 500 | 499 |
TimeReport(std::string title,std::ostream &os=std::cerr,bool run=true) |
| 501 | 500 |
: Timer(run), _title(title), _os(os){}
|
| 502 |
/// |
|
| 501 |
///Destructor that prints the ellapsed time |
|
| 503 | 502 |
~TimeReport() |
| ... | ... |
@@ -508,3 +507,3 @@ |
| 508 | 507 |
|
| 509 |
///'Do nothing' version of |
|
| 508 |
///'Do nothing' version of TimeReport |
|
| 510 | 509 |
0 comments (0 inline)