# HG changeset patch # User Alpar Juttner # Date 1223565637 -3600 # Node ID a0ab96ad65fee4bffb5ba959f9f4a0ff2433abdf # Parent 689f24ee83e6d722ebb75bb0d44db9061702b4c8# Parent c175e387da195fd9f7f2812c0ec58295e7622ac8 Merge diff -r 689f24ee83e6 -r a0ab96ad65fe Makefile.am --- a/Makefile.am Thu Oct 09 16:47:01 2008 +0200 +++ b/Makefile.am Thu Oct 09 16:20:37 2008 +0100 @@ -24,6 +24,7 @@ noinst_PROGRAMS = bin_PROGRAMS = check_PROGRAMS = +dist_bin_SCRIPTS = TESTS = XFAIL_TESTS = @@ -31,7 +32,6 @@ include test/Makefile.am include doc/Makefile.am include demo/Makefile.am -include benchmark/Makefile.am include tools/Makefile.am MRPROPERFILES = \ diff -r 689f24ee83e6 -r a0ab96ad65fe README --- a/README Thu Oct 09 16:47:01 2008 +0200 +++ b/README Thu Oct 09 16:20:37 2008 +0100 @@ -37,10 +37,6 @@ Contains programs to check the integrity and correctness of LEMON. -benchmark/ - - Contains programs for measuring the performance of algorithms. - tools/ Various utilities related to LEMON. diff -r 689f24ee83e6 -r a0ab96ad65fe benchmark/Makefile.am --- a/benchmark/Makefile.am Thu Oct 09 16:47:01 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ -if WANT_BENCHMARK - -noinst_HEADERS += - -noinst_PROGRAMS += - -endif WANT_BENCHMARK diff -r 689f24ee83e6 -r a0ab96ad65fe configure.ac --- a/configure.ac Thu Oct 09 16:47:01 2008 +0200 +++ b/configure.ac Thu Oct 09 16:20:37 2008 +0100 @@ -81,19 +81,6 @@ fi AM_CONDITIONAL([WANT_TOOLS], [test x"$enable_tools" != x"no"]) -dnl Disable/enable building the benchmarks. -AC_ARG_ENABLE([benchmark], -AS_HELP_STRING([--enable-benchmark], [build the benchmarks]) -AS_HELP_STRING([--disable-benchmark], [do not build the benchmarks @<:@default@:>@]), - [], [enable_benchmark=no]) -AC_MSG_CHECKING([whether to build the benchmarks]) -if test x"$enable_benchmark" != x"no"; then - AC_MSG_RESULT([yes]) -else - AC_MSG_RESULT([no]) -fi -AM_CONDITIONAL([WANT_BENCHMARK], [test x"$enable_benchmark" != x"no"]) - dnl Checks for header files. AC_CHECK_HEADERS(limits.h sys/time.h sys/times.h unistd.h) @@ -132,7 +119,6 @@ #echo CPLEX support................. : $lx_cplex_found #echo SOPLEX support................ : $lx_soplex_found #echo -echo Build benchmarks.............. : $enable_benchmark echo Build demo programs........... : $enable_demo echo Build additional tools........ : $enable_tools echo diff -r 689f24ee83e6 -r a0ab96ad65fe demo/arg_parser_demo.cc --- a/demo/arg_parser_demo.cc Thu Oct 09 16:47:01 2008 +0200 +++ b/demo/arg_parser_demo.cc Thu Oct 09 16:20:37 2008 +0100 @@ -27,7 +27,7 @@ #include using namespace lemon; -int main(int argc, const char **argv) +int main(int argc, char **argv) { // Initialize the argument parser ArgParser ap(argc, argv); diff -r 689f24ee83e6 -r a0ab96ad65fe demo/graph_to_eps_demo.cc --- a/demo/graph_to_eps_demo.cc Thu Oct 09 16:47:01 2008 +0200 +++ b/demo/graph_to_eps_demo.cc Thu Oct 09 16:20:37 2008 +0100 @@ -26,7 +26,7 @@ /// graphToEps(), and showing how to draw directed graphs, /// how to handle parallel egdes, how to change the properties (like /// color, shape, size, title etc.) of nodes and arcs individually -/// using appropriate \ref maps-page "graph maps". +/// using appropriate graph maps. /// /// \include graph_to_eps_demo.cc diff -r 689f24ee83e6 -r a0ab96ad65fe doc/Makefile.am --- a/doc/Makefile.am Thu Oct 09 16:47:01 2008 +0200 +++ b/doc/Makefile.am Thu Oct 09 16:20:37 2008 +0100 @@ -7,6 +7,7 @@ doc/lgf.dox \ doc/license.dox \ doc/mainpage.dox \ + doc/migration.dox \ doc/named-param.dox \ doc/namespaces.dox \ doc/html \ diff -r 689f24ee83e6 -r a0ab96ad65fe doc/groups.dox --- a/doc/groups.dox Thu Oct 09 16:47:01 2008 +0200 +++ b/doc/groups.dox Thu Oct 09 16:20:37 2008 +0100 @@ -54,7 +54,9 @@ You are free to use the graph structure that fit your requirements the best, most graph algorithms and auxiliary data structures can be used -with any graph structures. +with any graph structure. + +See also: \ref graph_concepts "Graph Structure Concepts". */ /** @@ -74,8 +76,10 @@ This group describes the map structures implemented in LEMON. -LEMON provides several special purpose maps that e.g. combine +LEMON provides several special purpose maps and map adaptors that e.g. combine new maps from existing ones. + +See also: \ref map_concepts "Map Concepts". */ /** @@ -87,7 +91,6 @@ values to the nodes and arcs of graphs. */ - /** \defgroup map_adaptors Map Adaptors \ingroup maps @@ -104,7 +107,7 @@ The typical usage of this classes is passing implicit maps to algorithms. If a function type algorithm is called then the function type map adaptors can be used comfortable. For example let's see the -usage of map adaptors with the \c digraphToEps() function. +usage of map adaptors with the \c graphToEps() function. \code Color nodeColor(int deg) { if (deg >= 2) { @@ -118,13 +121,13 @@ Digraph::NodeMap degree_map(graph); - digraphToEps(graph, "graph.eps") + graphToEps(graph, "graph.eps") .coords(coords).scaleToA4().undirected() .nodeColors(composeMap(functorToMap(nodeColor), degree_map)) .run(); \endcode The \c functorToMap() function makes an \c int to \c Color map from the -\e nodeColor() function. The \c composeMap() compose the \e degree_map +\c nodeColor() function. The \c composeMap() compose the \c degree_map and the previously created map. The composed map is a proper function to get the color of each node. @@ -173,7 +176,6 @@ any kind of path structure. \sa lemon::concepts::Path - */ /** @@ -185,7 +187,6 @@ order to make it easier to implement combinatorial algorithms. */ - /** @defgroup algs Algorithms \brief This group describes the several algorithms @@ -201,11 +202,11 @@ \brief Common graph search algorithms. This group describes the common graph search algorithms like -Breadth-first search (Bfs) and Depth-first search (Dfs). +Breadth-First Search (BFS) and Depth-First Search (DFS). */ /** -@defgroup shortest_path Shortest Path algorithms +@defgroup shortest_path Shortest Path Algorithms @ingroup algs \brief Algorithms for finding shortest paths. @@ -213,7 +214,7 @@ */ /** -@defgroup max_flow Maximum Flow algorithms +@defgroup max_flow Maximum Flow Algorithms @ingroup algs \brief Algorithms for finding maximum flows. @@ -241,11 +242,10 @@ fastest method to compute the maximum flow. All impelementations provides functions to query the minimum cut, which is the dual linear programming problem of the maximum flow. - */ /** -@defgroup min_cost_flow Minimum Cost Flow algorithms +@defgroup min_cost_flow Minimum Cost Flow Algorithms @ingroup algs \brief Algorithms for finding minimum cost flows and circulations. @@ -255,7 +255,7 @@ */ /** -@defgroup min_cut Minimum Cut algorithms +@defgroup min_cut Minimum Cut Algorithms @ingroup algs \brief Algorithms for finding minimum cut in graphs. @@ -282,11 +282,10 @@ If you want to find minimum cut just between two distinict nodes, please see the \ref max_flow "Maximum Flow page". - */ /** -@defgroup graph_prop Connectivity and other graph properties +@defgroup graph_prop Connectivity and Other Graph Properties @ingroup algs \brief Algorithms for discovering the graph properties @@ -298,7 +297,7 @@ */ /** -@defgroup planar Planarity embedding and drawing +@defgroup planar Planarity Embedding and Drawing @ingroup algs \brief Algorithms for planarity checking, embedding and drawing @@ -310,7 +309,7 @@ */ /** -@defgroup matching Matching algorithms +@defgroup matching Matching Algorithms @ingroup algs \brief Algorithms for finding matchings in graphs and bipartite graphs. @@ -348,11 +347,10 @@ \image html bipartite_matching.png \image latex bipartite_matching.eps "Bipartite Matching" width=\textwidth - */ /** -@defgroup spantree Minimum Spanning Tree algorithms +@defgroup spantree Minimum Spanning Tree Algorithms @ingroup algs \brief Algorithms for finding a minimum cost spanning tree in a graph. @@ -360,9 +358,8 @@ tree in a graph */ - /** -@defgroup auxalg Auxiliary algorithms +@defgroup auxalg Auxiliary Algorithms @ingroup algs \brief Auxiliary algorithms implemented in LEMON. @@ -371,7 +368,8 @@ */ /** -@defgroup approx Approximation algorithms +@defgroup approx Approximation Algorithms +@ingroup algs \brief Approximation algorithms. This group describes the approximation and heuristic algorithms @@ -385,22 +383,20 @@ This group describes some general optimization frameworks implemented in LEMON. - */ /** -@defgroup lp_group Lp and Mip solvers +@defgroup lp_group Lp and Mip Solvers @ingroup gen_opt_group \brief Lp and Mip solver interfaces for LEMON. This group describes Lp and Mip solver interfaces for LEMON. The various LP solvers could be used in the same manner with this interface. - */ /** -@defgroup lp_utils Tools for Lp and Mip solvers +@defgroup lp_utils Tools for Lp and Mip Solvers @ingroup lp_group \brief Helper tools to the Lp and Mip solvers. @@ -441,7 +437,7 @@ */ /** -@defgroup timecount Time measuring and Counting +@defgroup timecount Time Measuring and Counting @ingroup misc \brief Simple tools for measuring the performance of algorithms. @@ -450,15 +446,6 @@ */ /** -@defgroup graphbits Tools for Graph Implementation -@ingroup utils -\brief Tools to make it easier to create graphs. - -This group describes the tools that makes it easier to create graphs and -the maps that dynamically update with the graph changes. -*/ - -/** @defgroup exceptions Exceptions @ingroup utils \brief Exceptions defined in LEMON. @@ -471,21 +458,22 @@ \brief Graph Input-Output methods This group describes the tools for importing and exporting graphs -and graph related data. Now it supports the LEMON format, the -\c DIMACS format and the encapsulated postscript (EPS) format. +and graph related data. Now it supports the \ref lgf-format +"LEMON Graph Format", the \c DIMACS format and the encapsulated +postscript (EPS) format. */ /** @defgroup lemon_io LEMON Input-Output @ingroup io_group -\brief Reading and writing \ref lgf-format "LEMON Graph Format". +\brief Reading and writing LEMON Graph Format. This group describes methods for reading and writing \ref lgf-format "LEMON Graph Format". */ /** -@defgroup eps_io Postscript exporting +@defgroup eps_io Postscript Exporting @ingroup io_group \brief General \c EPS drawer and graph exporter @@ -493,7 +481,6 @@ graph exporting tools. */ - /** @defgroup concept Concepts \brief Skeleton classes and concept checking classes @@ -521,10 +508,8 @@ concept indeed provides all the required features. - Finally, They can serve as a skeleton of a new implementation of a concept. - */ - /** @defgroup graph_concepts Graph Structure Concepts @ingroup concept @@ -534,10 +519,12 @@ graph structures and helper classes used to implement these. */ -/* --- Unused group -@defgroup experimental Experimental Structures and Algorithms -This group describes some Experimental structures and algorithms. -The stuff here is subject to change. +/** +@defgroup map_concepts Map Concepts +@ingroup concept +\brief Skeleton and concept checking classes for maps + +This group describes the skeletons and concept checking classes of maps. */ /** diff -r 689f24ee83e6 -r a0ab96ad65fe doc/lgf.dox --- a/doc/lgf.dox Thu Oct 09 16:47:01 2008 +0200 +++ b/doc/lgf.dox Thu Oct 09 16:20:37 2008 +0100 @@ -78,7 +78,7 @@ 2 3 18 \endcode -The \c \@edges is just a synonym of \c \@arcs. The @arcs section can +The \c \@edges is just a synonym of \c \@arcs. The \@arcs section can also store the edge set of an undirected graph. In such case there is a conventional method for store arc maps in the file, if two columns has the same caption with \c '+' and \c '-' prefix, then these columns diff -r 689f24ee83e6 -r a0ab96ad65fe doc/mainpage.dox --- a/doc/mainpage.dox Thu Oct 09 16:47:01 2008 +0200 +++ b/doc/mainpage.dox Thu Oct 09 16:20:37 2008 +0100 @@ -50,11 +50,12 @@ If you want to see how LEMON works, see -some \ref demoprograms "demo programs"! +some \ref demoprograms "demo programs". If you know what you are looking for then try to find it under the Modules section. - +If you are a user of the old (0.x) series of LEMON, please check out the +\ref migration "Migration Guide" for the backward incompatibilities. */ diff -r 689f24ee83e6 -r a0ab96ad65fe doc/migration.dox --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/migration.dox Thu Oct 09 16:20:37 2008 +0100 @@ -0,0 +1,143 @@ +/* -*- mode: C++; indent-tabs-mode: nil; -*- + * + * This file is a part of LEMON, a generic C++ optimization library. + * + * Copyright (C) 2003-2008 + * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport + * (Egervary Research Group on Combinatorial Optimization, EGRES). + * + * Permission to use, modify and distribute this software is granted + * provided that this copyright notice appears in all copies. For + * precise terms see the accompanying LICENSE file. + * + * This software is provided "AS IS" with no warranty of any kind, + * express or implied, and with no claim as to its suitability for any + * purpose. + * + */ + +namespace lemon { +/*! + +\page migration Migration from the 0.x Series + +This guide gives an in depth description on what has changed compared +to the 0.x release series. + +Many of these changes adjusted automatically by the +script/lemon-0.x-to-1.x.sh tool. Those requiring manual +update are typeset boldface. + +\section migration-graph Graph Related Name Changes + +- \ref concepts::Digraph "Directed graphs" are called \c Digraph and + they have Arcs (instead of Edges), while + \ref concepts::Graph "undirected graphs" are called \c Graph + (instead of \c UGraph) and they have Edges (instead of + UEdges). These changes reflected thoroughly everywhere in + the library. Namely, + - \c Graph -> \c Digraph + - \c %ListGraph -> \c ListDigraph, \c %SmartGraph -> \c SmartDigraph etc. + - \c UGraph -> \c Graph + - \c ListUGraph -> \c ListGraph, \c SmartUGraph -> \c SmartGraph etc. + - \c Edge -> \c Arc, \c UEdge -> \c Edge + - \c EdgeMap -> \c ArcMap, \c UEdgeMap -> \c EdgeMap + - \c EdgeIt -> \c ArcIt, \c UEdgeIt -> \c EdgeIt + - Class names and function names containing the words \c graph, + \c ugraph, \e edge or \e arc should also be updated. +- The two endpoints of an (\e undirected) \c Edge can be obtained by the + u() and v() member function of the graph + (instead of source() and target()). This change + must be done by hand. + \n Of course, you can still use source() and target() + for Arcs (directed edges). + +\warning +The script/lemon-0.x-to-1.x.sh tool replaces all instances of +the words \c graph, \c digraph, \c edge and \c arc, so it replaces them +in strings, comments etc. as well as in all identifiers. + +\section migration-lgf LGF tools + - The \ref lgf-format "LGF file format" has changed, + \@nodeset has changed to \@nodes, + \@edgeset and \@uedgeset to \@arcs or + \@edges, which become completely equivalents. The + \@nodes, \@edges and \@uedges sections are + removed from the format, the content of them should be + the part of \@attributes section. The data fields in + the sections must follow a strict format, they must be either character + sequences without whitespaces or quoted strings. + - The LemonReader and LemonWriter core interfaces + are no longer available. + - The implementation of the general section readers and writers has changed + they are simple functors now. Beside the old + stream based section handling, currently line oriented section + reading and writing are also supported. In the + section readers the lines must be counted manually. The sections + should be read and written with the SectionWriter and SectionReader + classes. + - Instead of the item readers and writers, item converters should be + used. The converters are functors, which map the type to + std::string or std::string to the type. The converters for standard + containers hasn't yet been implemented in the new LEMON. The converters + can return strings in any format, because if it is necessary, the LGF + writer and reader will quote and unquote the given value. + - The DigraphReader and DigraphWriter can used similarly to the + 0.x series, however the read or write prefix of + the member functions are removed. + - The new LEMON supports the function like interface, the \c + digraphReader and \c digraphWriter functions are more convenient than + using the classes directly. + +\section migration-search BFS, DFS and Dijkstra +- Using the function interface of BFS, DFS and %Dijkstra both source and + target nodes can be given as parameters of the run() function + (instead of \c bfs(), \c dfs() or \c dijkstra() itself). +- \ref named-templ-param "Named class template parameters" of \c Bfs, + \c Dfs, \c Dijkstra, \c BfsVisit, \c DfsVisit are renamed to start + with "Set" instead of "Def". Namely, + - \c DefPredMap -> \c SetPredMap + - \c DefDistMap -> \c SetDistMap + - \c DefReachedMap -> \c SetReachedMap + - \c DefProcessedMap -> \c SetProcessedMap + - \c DefHeap -> \c SetHeap + - \c DefStandardHeap -> \c SetStandardHeap + - \c DefOperationTraits -> \c SetOperationTraits + - \c DefProcessedMapToBeDefaultMap -> \c SetStandardProcessedMap + +\section migration-error Exceptions and Debug tools + +The class hierarchy of exceptions has largely been simplified. Now, +only the i/o related tools may throw exceptions. All other exceptions +have been replaced with either the \c LEMON_ASSERT or the \c LEMON_DEBUG +macros. + +On the other hand, the parameter order of constructors of the +exceptions has been changed. See \ref IoError and \ref FormatError for +more details. + +\section migration-other Others +- The contents of graph_utils.h are moved to core.h + and maps.h. core.h is included by all graph types, + therefore it usually do not have to be included directly. +- path_utils.h is merged to \c path.h. +- The semantic of the assignment operations and copy constructors of maps + are still under discussion. So, you must copy them by hand (i.e. copy + each entry one-by-one) +- The parameters of the graph copying tools (i.e. \c GraphCopy, + \c DigraphCopy) have to be given in the from-to order. +- \c copyDigraph() and \c copyGraph() are renamed to \c digraphCopy() + and \c graphCopy(), respectively. +- The interface of \ref DynArcLookUp has changed. It is now the same as + of \ref ArcLookUp and \ref AllArcLookUp +- Some map types should also been renamed. Namely, + - \c IntegerMap -> \c RangeMap + - \c StdMap -> \c SparseMap + - \c FunctorMap -> \c FunctorToMap + - \c MapFunctor -> \c MapToFunctor + - \c ForkWriteMap -> \c ForkMap + - \c StoreBoolMap -> \c LoggerBoolMap +- \c dim2::BoundingBox -> \c dim2::Box + +*/ +} diff -r 689f24ee83e6 -r a0ab96ad65fe lemon/arg_parser.cc --- a/lemon/arg_parser.cc Thu Oct 09 16:47:01 2008 +0200 +++ b/lemon/arg_parser.cc Thu Oct 09 16:20:37 2008 +0100 @@ -26,12 +26,11 @@ exit(1); } - ArgParser::ArgParser(int argc, const char **argv) :_argc(argc), _argv(argv), - _command_name(argv[0]) { + ArgParser::ArgParser(int argc, const char * const *argv) + :_argc(argc), _argv(argv), _command_name(argv[0]) { funcOption("-help","Print a short help message",_showHelp,this); synonym("help","-help"); synonym("h","-help"); - } ArgParser::~ArgParser() diff -r 689f24ee83e6 -r a0ab96ad65fe lemon/arg_parser.h --- a/lemon/arg_parser.h Thu Oct 09 16:47:01 2008 +0200 +++ b/lemon/arg_parser.h Thu Oct 09 16:20:37 2008 +0100 @@ -46,7 +46,7 @@ protected: int _argc; - const char **_argv; + const char * const *_argv; enum OptType { UNKNOWN=0, BOOL=1, STRING=2, DOUBLE=3, INTEGER=4, FUNC=5 }; @@ -119,7 +119,7 @@ public: ///Constructor - ArgParser(int argc, const char **argv); + ArgParser(int argc, const char * const *argv); ~ArgParser(); diff -r 689f24ee83e6 -r a0ab96ad65fe lemon/bfs.h --- a/lemon/bfs.h Thu Oct 09 16:47:01 2008 +0200 +++ b/lemon/bfs.h Thu Oct 09 16:20:37 2008 +0100 @@ -49,11 +49,11 @@ ///arcs of the shortest paths. ///It must meet the \ref concepts::WriteMap "WriteMap" concept. typedef typename Digraph::template NodeMap PredMap; - ///Instantiates a \ref PredMap. + ///Instantiates a PredMap. - ///This function instantiates a \ref PredMap. + ///This function instantiates a PredMap. ///\param g is the digraph, to which we would like to define the - ///\ref PredMap. + ///PredMap. static PredMap *createPredMap(const Digraph &g) { return new PredMap(g); @@ -64,11 +64,11 @@ ///The type of the map that indicates which nodes are processed. ///It must meet the \ref concepts::WriteMap "WriteMap" concept. typedef NullMap ProcessedMap; - ///Instantiates a \ref ProcessedMap. + ///Instantiates a ProcessedMap. - ///This function instantiates a \ref ProcessedMap. + ///This function instantiates a ProcessedMap. ///\param g is the digraph, to which - ///we would like to define the \ref ProcessedMap + ///we would like to define the ProcessedMap #ifdef DOXYGEN static ProcessedMap *createProcessedMap(const Digraph &g) #else @@ -83,11 +83,11 @@ ///The type of the map that indicates which nodes are reached. ///It must meet the \ref concepts::ReadWriteMap "ReadWriteMap" concept. typedef typename Digraph::template NodeMap ReachedMap; - ///Instantiates a \ref ReachedMap. + ///Instantiates a ReachedMap. - ///This function instantiates a \ref ReachedMap. + ///This function instantiates a ReachedMap. ///\param g is the digraph, to which - ///we would like to define the \ref ReachedMap. + ///we would like to define the ReachedMap. static ReachedMap *createReachedMap(const Digraph &g) { return new ReachedMap(g); @@ -98,11 +98,11 @@ ///The type of the map that stores the distances of the nodes. ///It must meet the \ref concepts::WriteMap "WriteMap" concept. typedef typename Digraph::template NodeMap DistMap; - ///Instantiates a \ref DistMap. + ///Instantiates a DistMap. - ///This function instantiates a \ref DistMap. + ///This function instantiates a DistMap. ///\param g is the digraph, to which we would like to define the - ///\ref DistMap. + ///DistMap. static DistMap *createDistMap(const Digraph &g) { return new DistMap(g); @@ -227,10 +227,10 @@ } }; ///\brief \ref named-templ-param "Named parameter" for setting - ///\ref PredMap type. + ///PredMap type. /// ///\ref named-templ-param "Named parameter" for setting - ///\ref PredMap type. + ///PredMap type. template struct SetPredMap : public Bfs< Digraph, SetPredMapTraits > { typedef Bfs< Digraph, SetPredMapTraits > Create; @@ -246,10 +246,10 @@ } }; ///\brief \ref named-templ-param "Named parameter" for setting - ///\ref DistMap type. + ///DistMap type. /// ///\ref named-templ-param "Named parameter" for setting - ///\ref DistMap type. + ///DistMap type. template struct SetDistMap : public Bfs< Digraph, SetDistMapTraits > { typedef Bfs< Digraph, SetDistMapTraits > Create; @@ -265,10 +265,10 @@ } }; ///\brief \ref named-templ-param "Named parameter" for setting - ///\ref ReachedMap type. + ///ReachedMap type. /// ///\ref named-templ-param "Named parameter" for setting - ///\ref ReachedMap type. + ///ReachedMap type. template struct SetReachedMap : public Bfs< Digraph, SetReachedMapTraits > { typedef Bfs< Digraph, SetReachedMapTraits > Create; @@ -284,10 +284,10 @@ } }; ///\brief \ref named-templ-param "Named parameter" for setting - ///\ref ProcessedMap type. + ///ProcessedMap type. /// ///\ref named-templ-param "Named parameter" for setting - ///\ref ProcessedMap type. + ///ProcessedMap type. template struct SetProcessedMap : public Bfs< Digraph, SetProcessedMapTraits > { typedef Bfs< Digraph, SetProcessedMapTraits > Create; @@ -302,10 +302,10 @@ } }; ///\brief \ref named-templ-param "Named parameter" for setting - ///\ref ProcessedMap type to be Digraph::NodeMap. + ///ProcessedMap type to be Digraph::NodeMap. /// ///\ref named-templ-param "Named parameter" for setting - ///\ref ProcessedMap type to be Digraph::NodeMap. + ///ProcessedMap type to be Digraph::NodeMap. ///If you don't set it explicitly, it will be automatically allocated. struct SetStandardProcessedMap : public Bfs< Digraph, SetStandardProcessedMapTraits > { @@ -835,11 +835,11 @@ ///arcs of the shortest paths. ///It must meet the \ref concepts::WriteMap "WriteMap" concept. typedef typename Digraph::template NodeMap PredMap; - ///Instantiates a \ref PredMap. + ///Instantiates a PredMap. - ///This function instantiates a \ref PredMap. + ///This function instantiates a PredMap. ///\param g is the digraph, to which we would like to define the - ///\ref PredMap. + ///PredMap. static PredMap *createPredMap(const Digraph &g) { return new PredMap(g); @@ -851,11 +851,11 @@ ///It must meet the \ref concepts::WriteMap "WriteMap" concept. ///By default it is a NullMap. typedef NullMap ProcessedMap; - ///Instantiates a \ref ProcessedMap. + ///Instantiates a ProcessedMap. - ///This function instantiates a \ref ProcessedMap. + ///This function instantiates a ProcessedMap. ///\param g is the digraph, to which - ///we would like to define the \ref ProcessedMap. + ///we would like to define the ProcessedMap. #ifdef DOXYGEN static ProcessedMap *createProcessedMap(const Digraph &g) #else @@ -870,11 +870,11 @@ ///The type of the map that indicates which nodes are reached. ///It must meet the \ref concepts::ReadWriteMap "ReadWriteMap" concept. typedef typename Digraph::template NodeMap ReachedMap; - ///Instantiates a \ref ReachedMap. + ///Instantiates a ReachedMap. - ///This function instantiates a \ref ReachedMap. + ///This function instantiates a ReachedMap. ///\param g is the digraph, to which - ///we would like to define the \ref ReachedMap. + ///we would like to define the ReachedMap. static ReachedMap *createReachedMap(const Digraph &g) { return new ReachedMap(g); @@ -885,11 +885,11 @@ ///The type of the map that stores the distances of the nodes. ///It must meet the \ref concepts::WriteMap "WriteMap" concept. typedef typename Digraph::template NodeMap DistMap; - ///Instantiates a \ref DistMap. + ///Instantiates a DistMap. - ///This function instantiates a \ref DistMap. + ///This function instantiates a DistMap. ///\param g is the digraph, to which we would like to define - ///the \ref DistMap + ///the DistMap static DistMap *createDistMap(const Digraph &g) { return new DistMap(g); @@ -902,7 +902,7 @@ typedef lemon::Path Path; }; - /// Default traits class used by \ref BfsWizard + /// Default traits class used by BfsWizard /// To make it easier to use Bfs algorithm /// we have created a wizard class. @@ -1068,10 +1068,10 @@ SetPredMapBase(const TR &b) : TR(b) {} }; ///\brief \ref named-func-param "Named parameter" - ///for setting \ref PredMap object. + ///for setting PredMap object. /// ///\ref named-func-param "Named parameter" - ///for setting \ref PredMap object. + ///for setting PredMap object. template BfsWizard > predMap(const T &t) { @@ -1086,10 +1086,10 @@ SetReachedMapBase(const TR &b) : TR(b) {} }; ///\brief \ref named-func-param "Named parameter" - ///for setting \ref ReachedMap object. + ///for setting ReachedMap object. /// /// \ref named-func-param "Named parameter" - ///for setting \ref ReachedMap object. + ///for setting ReachedMap object. template BfsWizard > reachedMap(const T &t) { @@ -1104,10 +1104,10 @@ SetDistMapBase(const TR &b) : TR(b) {} }; ///\brief \ref named-func-param "Named parameter" - ///for setting \ref DistMap object. + ///for setting DistMap object. /// /// \ref named-func-param "Named parameter" - ///for setting \ref DistMap object. + ///for setting DistMap object. template BfsWizard > distMap(const T &t) { @@ -1122,10 +1122,10 @@ SetProcessedMapBase(const TR &b) : TR(b) {} }; ///\brief \ref named-func-param "Named parameter" - ///for setting \ref ProcessedMap object. + ///for setting ProcessedMap object. /// /// \ref named-func-param "Named parameter" - ///for setting \ref ProcessedMap object. + ///for setting ProcessedMap object. template BfsWizard > processedMap(const T &t) { @@ -1267,11 +1267,11 @@ /// It must meet the \ref concepts::ReadWriteMap "ReadWriteMap" concept. typedef typename Digraph::template NodeMap ReachedMap; - /// \brief Instantiates a \ref ReachedMap. + /// \brief Instantiates a ReachedMap. /// - /// This function instantiates a \ref ReachedMap. + /// This function instantiates a ReachedMap. /// \param digraph is the digraph, to which - /// we would like to define the \ref ReachedMap. + /// we would like to define the ReachedMap. static ReachedMap *createReachedMap(const Digraph &digraph) { return new ReachedMap(digraph); } diff -r 689f24ee83e6 -r a0ab96ad65fe lemon/bits/alteration_notifier.h --- a/lemon/bits/alteration_notifier.h Thu Oct 09 16:47:01 2008 +0200 +++ b/lemon/bits/alteration_notifier.h Thu Oct 09 16:20:37 2008 +0100 @@ -24,76 +24,75 @@ #include -///\ingroup graphbits -///\file -///\brief Observer notifier for graph alteration observers. +//\ingroup graphbits +//\file +//\brief Observer notifier for graph alteration observers. namespace lemon { - /// \ingroup graphbits - /// - /// \brief Notifier class to notify observes about alterations in - /// a container. - /// - /// The simple graph's can be refered as two containers, one node container - /// and one edge container. But they are not standard containers they - /// does not store values directly they are just key continars for more - /// value containers which are the node and edge maps. - /// - /// The graph's node and edge sets can be changed as we add or erase - /// nodes and edges in the graph. LEMON would like to handle easily - /// that the node and edge maps should contain values for all nodes or - /// edges. If we want to check on every indicing if the map contains - /// the current indicing key that cause a drawback in the performance - /// in the library. We use another solution we notify all maps about - /// an alteration in the graph, which cause only drawback on the - /// alteration of the graph. - /// - /// This class provides an interface to the container. The \e first() and \e - /// next() member functions make possible to iterate on the keys of the - /// container. The \e id() function returns an integer id for each key. - /// The \e maxId() function gives back an upper bound of the ids. - /// - /// For the proper functonality of this class, we should notify it - /// about each alteration in the container. The alterations have four type - /// as \e add(), \e erase(), \e build() and \e clear(). The \e add() and - /// \e erase() signals that only one or few items added or erased to or - /// from the graph. If all items are erased from the graph or from an empty - /// graph a new graph is builded then it can be signaled with the - /// clear() and build() members. Important rule that if we erase items - /// from graph we should first signal the alteration and after that erase - /// them from the container, on the other way on item addition we should - /// first extend the container and just after that signal the alteration. - /// - /// The alteration can be observed with a class inherited from the - /// \e ObserverBase nested class. The signals can be handled with - /// overriding the virtual functions defined in the base class. The - /// observer base can be attached to the notifier with the - /// \e attach() member and can be detached with detach() function. The - /// alteration handlers should not call any function which signals - /// an other alteration in the same notifier and should not - /// detach any observer from the notifier. - /// - /// Alteration observers try to be exception safe. If an \e add() or - /// a \e clear() function throws an exception then the remaining - /// observeres will not be notified and the fulfilled additions will - /// be rolled back by calling the \e erase() or \e clear() - /// functions. Thence the \e erase() and \e clear() should not throw - /// exception. Actullay, it can be throw only - /// \ref AlterationObserver::ImmediateDetach ImmediateDetach - /// exception which detach the observer from the notifier. - /// - /// There are some place when the alteration observing is not completly - /// reliable. If we want to carry out the node degree in the graph - /// as in the \ref InDegMap and we use the reverseEdge that cause - /// unreliable functionality. Because the alteration observing signals - /// only erasing and adding but not the reversing it will stores bad - /// degrees. The sub graph adaptors cannot signal the alterations because - /// just a setting in the filter map can modify the graph and this cannot - /// be watched in any way. - /// - /// \param _Container The container which is observed. - /// \param _Item The item type which is obserbved. + // \ingroup graphbits + // + // \brief Notifier class to notify observes about alterations in + // a container. + // + // The simple graph's can be refered as two containers, one node container + // and one edge container. But they are not standard containers they + // does not store values directly they are just key continars for more + // value containers which are the node and edge maps. + // + // The graph's node and edge sets can be changed as we add or erase + // nodes and edges in the graph. LEMON would like to handle easily + // that the node and edge maps should contain values for all nodes or + // edges. If we want to check on every indicing if the map contains + // the current indicing key that cause a drawback in the performance + // in the library. We use another solution we notify all maps about + // an alteration in the graph, which cause only drawback on the + // alteration of the graph. + // + // This class provides an interface to the container. The \e first() and \e + // next() member functions make possible to iterate on the keys of the + // container. The \e id() function returns an integer id for each key. + // The \e maxId() function gives back an upper bound of the ids. + // + // For the proper functonality of this class, we should notify it + // about each alteration in the container. The alterations have four type + // as \e add(), \e erase(), \e build() and \e clear(). The \e add() and + // \e erase() signals that only one or few items added or erased to or + // from the graph. If all items are erased from the graph or from an empty + // graph a new graph is builded then it can be signaled with the + // clear() and build() members. Important rule that if we erase items + // from graph we should first signal the alteration and after that erase + // them from the container, on the other way on item addition we should + // first extend the container and just after that signal the alteration. + // + // The alteration can be observed with a class inherited from the + // \e ObserverBase nested class. The signals can be handled with + // overriding the virtual functions defined in the base class. The + // observer base can be attached to the notifier with the + // \e attach() member and can be detached with detach() function. The + // alteration handlers should not call any function which signals + // an other alteration in the same notifier and should not + // detach any observer from the notifier. + // + // Alteration observers try to be exception safe. If an \e add() or + // a \e clear() function throws an exception then the remaining + // observeres will not be notified and the fulfilled additions will + // be rolled back by calling the \e erase() or \e clear() + // functions. Thence the \e erase() and \e clear() should not throw + // exception. Actullay, it can be throw only \ref ImmediateDetach + // exception which detach the observer from the notifier. + // + // There are some place when the alteration observing is not completly + // reliable. If we want to carry out the node degree in the graph + // as in the \ref InDegMap and we use the reverseEdge that cause + // unreliable functionality. Because the alteration observing signals + // only erasing and adding but not the reversing it will stores bad + // degrees. The sub graph adaptors cannot signal the alterations because + // just a setting in the filter map can modify the graph and this cannot + // be watched in any way. + // + // \param _Container The container which is observed. + // \param _Item The item type which is obserbved. template class AlterationNotifier { @@ -104,92 +103,87 @@ typedef _Container Container; typedef _Item Item; - /// \brief Exception which can be called from \e clear() and - /// \e erase(). - /// - /// From the \e clear() and \e erase() function only this - /// exception is allowed to throw. The exception immediatly - /// detaches the current observer from the notifier. Because the - /// \e clear() and \e erase() should not throw other exceptions - /// it can be used to invalidate the observer. + // \brief Exception which can be called from \e clear() and + // \e erase(). + // + // From the \e clear() and \e erase() function only this + // exception is allowed to throw. The exception immediatly + // detaches the current observer from the notifier. Because the + // \e clear() and \e erase() should not throw other exceptions + // it can be used to invalidate the observer. struct ImmediateDetach {}; - /// \brief ObserverBase is the base class for the observers. - /// - /// ObserverBase is the abstract base class for the observers. - /// It will be notified about an item was inserted into or - /// erased from the graph. - /// - /// The observer interface contains some pure virtual functions - /// to override. The add() and erase() functions are - /// to notify the oberver when one item is added or - /// erased. - /// - /// The build() and clear() members are to notify the observer - /// about the container is built from an empty container or - /// is cleared to an empty container. - + // \brief ObserverBase is the base class for the observers. + // + // ObserverBase is the abstract base class for the observers. + // It will be notified about an item was inserted into or + // erased from the graph. + // + // The observer interface contains some pure virtual functions + // to override. The add() and erase() functions are + // to notify the oberver when one item is added or + // erased. + // + // The build() and clear() members are to notify the observer + // about the container is built from an empty container or + // is cleared to an empty container. class ObserverBase { protected: typedef AlterationNotifier Notifier; friend class AlterationNotifier; - /// \brief Default constructor. - /// - /// Default constructor for ObserverBase. - /// + // \brief Default constructor. + // + // Default constructor for ObserverBase. ObserverBase() : _notifier(0) {} - /// \brief Constructor which attach the observer into notifier. - /// - /// Constructor which attach the observer into notifier. + // \brief Constructor which attach the observer into notifier. + // + // Constructor which attach the observer into notifier. ObserverBase(AlterationNotifier& nf) { attach(nf); } - /// \brief Constructor which attach the obserever to the same notifier. - /// - /// Constructor which attach the obserever to the same notifier as - /// the other observer is attached to. + // \brief Constructor which attach the obserever to the same notifier. + // + // Constructor which attach the obserever to the same notifier as + // the other observer is attached to. ObserverBase(const ObserverBase& copy) { if (copy.attached()) { attach(*copy.notifier()); } } - /// \brief Destructor + // \brief Destructor virtual ~ObserverBase() { if (attached()) { detach(); } } - /// \brief Attaches the observer into an AlterationNotifier. - /// - /// This member attaches the observer into an AlterationNotifier. - /// + // \brief Attaches the observer into an AlterationNotifier. + // + // This member attaches the observer into an AlterationNotifier. void attach(AlterationNotifier& nf) { nf.attach(*this); } - /// \brief Detaches the observer into an AlterationNotifier. - /// - /// This member detaches the observer from an AlterationNotifier. - /// + // \brief Detaches the observer into an AlterationNotifier. + // + // This member detaches the observer from an AlterationNotifier. void detach() { _notifier->detach(*this); } - /// \brief Gives back a pointer to the notifier which the map - /// attached into. - /// - /// This function gives back a pointer to the notifier which the map - /// attached into. - /// + // \brief Gives back a pointer to the notifier which the map + // attached into. + // + // This function gives back a pointer to the notifier which the map + // attached into. Notifier* notifier() const { return const_cast(_notifier); } - /// Gives back true when the observer is attached into a notifier. + // Gives back true when the observer is attached into a notifier. bool attached() const { return _notifier != 0; } private: @@ -201,53 +195,52 @@ Notifier* _notifier; typename std::list::iterator _index; - /// \brief The member function to notificate the observer about an - /// item is added to the container. - /// - /// The add() member function notificates the observer about an item - /// is added to the container. It have to be overrided in the - /// subclasses. + // \brief The member function to notificate the observer about an + // item is added to the container. + // + // The add() member function notificates the observer about an item + // is added to the container. It have to be overrided in the + // subclasses. virtual void add(const Item&) = 0; - /// \brief The member function to notificate the observer about - /// more item is added to the container. - /// - /// The add() member function notificates the observer about more item - /// is added to the container. It have to be overrided in the - /// subclasses. + // \brief The member function to notificate the observer about + // more item is added to the container. + // + // The add() member function notificates the observer about more item + // is added to the container. It have to be overrided in the + // subclasses. virtual void add(const std::vector& items) = 0; - /// \brief The member function to notificate the observer about an - /// item is erased from the container. - /// - /// The erase() member function notificates the observer about an - /// item is erased from the container. It have to be overrided in - /// the subclasses. + // \brief The member function to notificate the observer about an + // item is erased from the container. + // + // The erase() member function notificates the observer about an + // item is erased from the container. It have to be overrided in + // the subclasses. virtual void erase(const Item&) = 0; - /// \brief The member function to notificate the observer about - /// more item is erased from the container. - /// - /// The erase() member function notificates the observer about more item - /// is erased from the container. It have to be overrided in the - /// subclasses. + // \brief The member function to notificate the observer about + // more item is erased from the container. + // + // The erase() member function notificates the observer about more item + // is erased from the container. It have to be overrided in the + // subclasses. virtual void erase(const std::vector& items) = 0; - /// \brief The member function to notificate the observer about the - /// container is built. - /// - /// The build() member function notificates the observer about the - /// container is built from an empty container. It have to be - /// overrided in the subclasses. - + // \brief The member function to notificate the observer about the + // container is built. + // + // The build() member function notificates the observer about the + // container is built from an empty container. It have to be + // overrided in the subclasses. virtual void build() = 0; - /// \brief The member function to notificate the observer about all - /// items are erased from the container. - /// - /// The clear() member function notificates the observer about all - /// items are erased from the container. It have to be overrided in - /// the subclasses. + // \brief The member function to notificate the observer about all + // items are erased from the container. + // + // The clear() member function notificates the observer about all + // items are erased from the container. It have to be overrided in + // the subclasses. virtual void clear() = 0; }; @@ -262,31 +255,30 @@ public: - /// \brief Default constructor. - /// - /// The default constructor of the AlterationNotifier. - /// It creates an empty notifier. + // \brief Default constructor. + // + // The default constructor of the AlterationNotifier. + // It creates an empty notifier. AlterationNotifier() : container(0) {} - /// \brief Constructor. - /// - /// Constructor with the observed container parameter. + // \brief Constructor. + // + // Constructor with the observed container parameter. AlterationNotifier(const Container& _container) : container(&_container) {} - /// \brief Copy Constructor of the AlterationNotifier. - /// - /// Copy constructor of the AlterationNotifier. - /// It creates only an empty notifier because the copiable - /// notifier's observers have to be registered still into that notifier. + // \brief Copy Constructor of the AlterationNotifier. + // + // Copy constructor of the AlterationNotifier. + // It creates only an empty notifier because the copiable + // notifier's observers have to be registered still into that notifier. AlterationNotifier(const AlterationNotifier& _notifier) : container(_notifier.container) {} - /// \brief Destructor. - /// - /// Destructor of the AlterationNotifier. - /// + // \brief Destructor. + // + // Destructor of the AlterationNotifier. ~AlterationNotifier() { typename Observers::iterator it; for (it = _observers.begin(); it != _observers.end(); ++it) { @@ -294,9 +286,9 @@ } } - /// \brief Sets the container. - /// - /// Sets the container. + // \brief Sets the container. + // + // Sets the container. void setContainer(const Container& _container) { container = &_container; } @@ -307,34 +299,32 @@ public: - - - /// \brief First item in the container. - /// - /// Returns the first item in the container. It is - /// for start the iteration on the container. + // \brief First item in the container. + // + // Returns the first item in the container. It is + // for start the iteration on the container. void first(Item& item) const { container->first(item); } - /// \brief Next item in the container. - /// - /// Returns the next item in the container. It is - /// for iterate on the container. + // \brief Next item in the container. + // + // Returns the next item in the container. It is + // for iterate on the container. void next(Item& item) const { container->next(item); } - /// \brief Returns the id of the item. - /// - /// Returns the id of the item provided by the container. + // \brief Returns the id of the item. + // + // Returns the id of the item provided by the container. int id(const Item& item) const { return container->id(item); } - /// \brief Returns the maximum id of the container. - /// - /// Returns the maximum id of the container. + // \brief Returns the maximum id of the container. + // + // Returns the maximum id of the container. int maxId() const { return container->maxId(Item()); } @@ -354,12 +344,11 @@ public: - /// \brief Notifies all the registed observers about an item added to - /// the container. - /// - /// It notifies all the registed observers about an item added to - /// the container. - /// + // \brief Notifies all the registed observers about an item added to + // the container. + // + // It notifies all the registed observers about an item added to + // the container. void add(const Item& item) { typename Observers::reverse_iterator it; try { @@ -375,12 +364,11 @@ } } - /// \brief Notifies all the registed observers about more item added to - /// the container. - /// - /// It notifies all the registed observers about more item added to - /// the container. - /// + // \brief Notifies all the registed observers about more item added to + // the container. + // + // It notifies all the registed observers about more item added to + // the container. void add(const std::vector& items) { typename Observers::reverse_iterator it; try { @@ -396,12 +384,11 @@ } } - /// \brief Notifies all the registed observers about an item erased from - /// the container. - /// - /// It notifies all the registed observers about an item erased from - /// the container. - /// + // \brief Notifies all the registed observers about an item erased from + // the container. + // + // It notifies all the registed observers about an item erased from + // the container. void erase(const Item& item) throw() { typename Observers::iterator it = _observers.begin(); while (it != _observers.end()) { @@ -416,12 +403,11 @@ } } - /// \brief Notifies all the registed observers about more item erased - /// from the container. - /// - /// It notifies all the registed observers about more item erased from - /// the container. - /// + // \brief Notifies all the registed observers about more item erased + // from the container. + // + // It notifies all the registed observers about more item erased from + // the container. void erase(const std::vector& items) { typename Observers::iterator it = _observers.begin(); while (it != _observers.end()) { @@ -436,11 +422,11 @@ } } - /// \brief Notifies all the registed observers about the container is - /// built. - /// - /// Notifies all the registed observers about the container is built - /// from an empty container. + // \brief Notifies all the registed observers about the container is + // built. + // + // Notifies all the registed observers about the container is built + // from an empty container. void build() { typename Observers::reverse_iterator it; try { @@ -456,11 +442,11 @@ } } - /// \brief Notifies all the registed observers about all items are - /// erased. - /// - /// Notifies all the registed observers about all items are erased - /// from the container. + // \brief Notifies all the registed observers about all items are + // erased. + // + // Notifies all the registed observers about all items are erased + // from the container. void clear() { typename Observers::iterator it = _observers.begin(); while (it != _observers.end()) { diff -r 689f24ee83e6 -r a0ab96ad65fe lemon/bits/array_map.h --- a/lemon/bits/array_map.h Thu Oct 09 16:47:01 2008 +0200 +++ b/lemon/bits/array_map.h Thu Oct 09 16:20:37 2008 +0100 @@ -26,48 +26,48 @@ #include #include -/// \ingroup graphbits -/// \file -/// \brief Graph map based on the array storage. +// \ingroup graphbits +// \file +// \brief Graph map based on the array storage. namespace lemon { - /// \ingroup graphbits - /// - /// \brief Graph map based on the array storage. - /// - /// The ArrayMap template class is graph map structure what - /// automatically updates the map when a key is added to or erased from - /// the map. This map uses the allocators to implement - /// the container functionality. - /// - /// The template parameters are the Graph the current Item type and - /// the Value type of the map. + // \ingroup graphbits + // + // \brief Graph map based on the array storage. + // + // The ArrayMap template class is graph map structure what + // automatically updates the map when a key is added to or erased from + // the map. This map uses the allocators to implement + // the container functionality. + // + // The template parameters are the Graph the current Item type and + // the Value type of the map. template class ArrayMap : public ItemSetTraits<_Graph, _Item>::ItemNotifier::ObserverBase { public: - /// The graph type of the maps. + // The graph type of the maps. typedef _Graph Graph; - /// The item type of the map. + // The item type of the map. typedef _Item Item; - /// The reference map tag. + // The reference map tag. typedef True ReferenceMapTag; - /// The key type of the maps. + // The key type of the maps. typedef _Item Key; - /// The value type of the map. + // The value type of the map. typedef _Value Value; - /// The const reference type of the map. + // The const reference type of the map. typedef const _Value& ConstReference; - /// The reference type of the map. + // The reference type of the map. typedef _Value& Reference; - /// The notifier type. + // The notifier type. typedef typename ItemSetTraits<_Graph, _Item>::ItemNotifier Notifier; - /// The MapBase of the Map which imlements the core regisitry function. + // The MapBase of the Map which imlements the core regisitry function. typedef typename Notifier::ObserverBase Parent; private: @@ -75,9 +75,9 @@ public: - /// \brief Graph initialized map constructor. - /// - /// Graph initialized map constructor. + // \brief Graph initialized map constructor. + // + // Graph initialized map constructor. explicit ArrayMap(const Graph& graph) { Parent::attach(graph.notifier(Item())); allocate_memory(); @@ -89,9 +89,9 @@ } } - /// \brief Constructor to use default value to initialize the map. - /// - /// It constructs a map and initialize all of the the map. + // \brief Constructor to use default value to initialize the map. + // + // It constructs a map and initialize all of the the map. ArrayMap(const Graph& graph, const Value& value) { Parent::attach(graph.notifier(Item())); allocate_memory(); @@ -104,9 +104,9 @@ } private: - /// \brief Constructor to copy a map of the same map type. - /// - /// Constructor to copy a map of the same map type. + // \brief Constructor to copy a map of the same map type. + // + // Constructor to copy a map of the same map type. ArrayMap(const ArrayMap& copy) : Parent() { if (copy.attached()) { attach(*copy.notifier()); @@ -122,24 +122,24 @@ } } - /// \brief Assign operator. - /// - /// This operator assigns for each item in the map the - /// value mapped to the same item in the copied map. - /// The parameter map should be indiced with the same - /// itemset because this assign operator does not change - /// the container of the map. + // \brief Assign operator. + // + // This operator assigns for each item in the map the + // value mapped to the same item in the copied map. + // The parameter map should be indiced with the same + // itemset because this assign operator does not change + // the container of the map. ArrayMap& operator=(const ArrayMap& cmap) { return operator=(cmap); } - /// \brief Template assign operator. - /// - /// The given parameter should be conform to the ReadMap - /// concecpt and could be indiced by the current item set of - /// the NodeMap. In this case the value for each item - /// is assigned by the value of the given ReadMap. + // \brief Template assign operator. + // + // The given parameter should be conform to the ReadMap + // concecpt and could be indiced by the current item set of + // the NodeMap. In this case the value for each item + // is assigned by the value of the given ReadMap. template ArrayMap& operator=(const CMap& cmap) { checkConcept, CMap>(); @@ -152,9 +152,9 @@ } public: - /// \brief The destructor of the map. - /// - /// The destructor of the map. + // \brief The destructor of the map. + // + // The destructor of the map. virtual ~ArrayMap() { if (attached()) { clear(); @@ -170,38 +170,38 @@ public: - /// \brief The subscript operator. - /// - /// The subscript operator. The map can be subscripted by the - /// actual keys of the graph. + // \brief The subscript operator. + // + // The subscript operator. The map can be subscripted by the + // actual keys of the graph. Value& operator[](const Key& key) { int id = Parent::notifier()->id(key); return values[id]; } - /// \brief The const subscript operator. - /// - /// The const subscript operator. The map can be subscripted by the - /// actual keys of the graph. + // \brief The const subscript operator. + // + // The const subscript operator. The map can be subscripted by the + // actual keys of the graph. const Value& operator[](const Key& key) const { int id = Parent::notifier()->id(key); return values[id]; } - /// \brief Setter function of the map. - /// - /// Setter function of the map. Equivalent with map[key] = val. - /// This is a compatibility feature with the not dereferable maps. + // \brief Setter function of the map. + // + // Setter function of the map. Equivalent with map[key] = val. + // This is a compatibility feature with the not dereferable maps. void set(const Key& key, const Value& val) { (*this)[key] = val; } protected: - /// \brief Adds a new key to the map. - /// - /// It adds a new key to the map. It called by the observer notifier - /// and it overrides the add() member function of the observer base. + // \brief Adds a new key to the map. + // + // It adds a new key to the map. It called by the observer notifier + // and it overrides the add() member function of the observer base. virtual void add(const Key& key) { Notifier* nf = Parent::notifier(); int id = nf->id(key); @@ -226,10 +226,10 @@ allocator.construct(&(values[id]), Value()); } - /// \brief Adds more new keys to the map. - /// - /// It adds more new keys to the map. It called by the observer notifier - /// and it overrides the add() member function of the observer base. + // \brief Adds more new keys to the map. + // + // It adds more new keys to the map. It called by the observer notifier + // and it overrides the add() member function of the observer base. virtual void add(const std::vector& keys) { Notifier* nf = Parent::notifier(); int max_id = -1; @@ -270,19 +270,19 @@ } } - /// \brief Erase a key from the map. - /// - /// Erase a key from the map. It called by the observer notifier - /// and it overrides the erase() member function of the observer base. + // \brief Erase a key from the map. + // + // Erase a key from the map. It called by the observer notifier + // and it overrides the erase() member function of the observer base. virtual void erase(const Key& key) { int id = Parent::notifier()->id(key); allocator.destroy(&(values[id])); } - /// \brief Erase more keys from the map. - /// - /// Erase more keys from the map. It called by the observer notifier - /// and it overrides the erase() member function of the observer base. + // \brief Erase more keys from the map. + // + // Erase more keys from the map. It called by the observer notifier + // and it overrides the erase() member function of the observer base. virtual void erase(const std::vector& keys) { for (int i = 0; i < int(keys.size()); ++i) { int id = Parent::notifier()->id(keys[i]); @@ -290,10 +290,10 @@ } } - /// \brief Buildes the map. - /// - /// It buildes the map. It called by the observer notifier - /// and it overrides the build() member function of the observer base. + // \brief Buildes the map. + // + // It buildes the map. It called by the observer notifier + // and it overrides the build() member function of the observer base. virtual void build() { Notifier* nf = Parent::notifier(); allocate_memory(); @@ -304,10 +304,10 @@ } } - /// \brief Clear the map. - /// - /// It erase all items from the map. It called by the observer notifier - /// and it overrides the clear() member function of the observer base. + // \brief Clear the map. + // + // It erase all items from the map. It called by the observer notifier + // and it overrides the clear() member function of the observer base. virtual void clear() { Notifier* nf = Parent::notifier(); if (capacity != 0) { diff -r 689f24ee83e6 -r a0ab96ad65fe lemon/bits/base_extender.h --- a/lemon/bits/base_extender.h Thu Oct 09 16:47:01 2008 +0200 +++ b/lemon/bits/base_extender.h Thu Oct 09 16:20:37 2008 +0100 @@ -28,14 +28,14 @@ #include #include -///\ingroup digraphbits -///\file -///\brief Extenders for the digraph types +//\ingroup digraphbits +//\file +//\brief Extenders for the digraph types namespace lemon { - /// \ingroup digraphbits - /// - /// \brief BaseDigraph to BaseGraph extender + // \ingroup digraphbits + // + // \brief BaseDigraph to BaseGraph extender template class UndirDigraphExtender : public Base { @@ -74,37 +74,37 @@ } }; - /// First node of the edge + // First node of the edge Node u(const Edge &e) const { return Parent::source(e); } - /// Source of the given arc + // Source of the given arc Node source(const Arc &e) const { return e.forward ? Parent::source(e) : Parent::target(e); } - /// Second node of the edge + // Second node of the edge Node v(const Edge &e) const { return Parent::target(e); } - /// Target of the given arc + // Target of the given arc Node target(const Arc &e) const { return e.forward ? Parent::target(e) : Parent::source(e); } - /// \brief Directed arc from an edge. - /// - /// Returns a directed arc corresponding to the specified edge. - /// If the given bool is true, the first node of the given edge and - /// the source node of the returned arc are the same. + // \brief Directed arc from an edge. + // + // Returns a directed arc corresponding to the specified edge. + // If the given bool is true, the first node of the given edge and + // the source node of the returned arc are the same. static Arc direct(const Edge &e, bool d) { return Arc(e, d); } - /// Returns whether the given directed arc has the same orientation - /// as the corresponding edge. + // Returns whether the given directed arc has the same orientation + // as the corresponding edge. static bool direction(const Arc &a) { return a.forward; } using Parent::first; diff -r 689f24ee83e6 -r a0ab96ad65fe lemon/bits/bezier.h --- a/lemon/bits/bezier.h Thu Oct 09 16:47:01 2008 +0200 +++ b/lemon/bits/bezier.h Thu Oct 09 16:20:37 2008 +0100 @@ -19,11 +19,11 @@ #ifndef LEMON_BEZIER_H #define LEMON_BEZIER_H -///\ingroup misc -///\file -///\brief Classes to compute with Bezier curves. -/// -///Up to now this file is used internally by \ref graph_to_eps.h +//\ingroup misc +//\file +//\brief Classes to compute with Bezier curves. +// +//Up to now this file is used internally by \ref graph_to_eps.h #include diff -r 689f24ee83e6 -r a0ab96ad65fe lemon/bits/default_map.h --- a/lemon/bits/default_map.h Thu Oct 09 16:47:01 2008 +0200 +++ b/lemon/bits/default_map.h Thu Oct 09 16:20:37 2008 +0100 @@ -19,14 +19,13 @@ #ifndef LEMON_BITS_DEFAULT_MAP_H #define LEMON_BITS_DEFAULT_MAP_H - #include #include //#include -///\ingroup graphbits -///\file -///\brief Graph maps that construct and destruct their elements dynamically. +//\ingroup graphbits +//\file +//\brief Graph maps that construct and destruct their elements dynamically. namespace lemon { @@ -149,7 +148,7 @@ // #endif - /// \e + // DefaultMap class template class DefaultMap : public DefaultMapSelector<_Graph, _Item, _Value>::Map { diff -r 689f24ee83e6 -r a0ab96ad65fe lemon/bits/enable_if.h --- a/lemon/bits/enable_if.h Thu Oct 09 16:47:01 2008 +0200 +++ b/lemon/bits/enable_if.h Thu Oct 09 16:20:37 2008 +0100 @@ -35,29 +35,29 @@ #ifndef LEMON_BITS_ENABLE_IF_H #define LEMON_BITS_ENABLE_IF_H -///\file -///\brief Miscellaneous basic utilities +//\file +//\brief Miscellaneous basic utilities namespace lemon { - /// Basic type for defining "tags". A "YES" condition for \c enable_if. + // Basic type for defining "tags". A "YES" condition for \c enable_if. - /// Basic type for defining "tags". A "YES" condition for \c enable_if. - /// - ///\sa False + // Basic type for defining "tags". A "YES" condition for \c enable_if. + // + //\sa False struct True { - ///\e + //\e static const bool value = true; }; - /// Basic type for defining "tags". A "NO" condition for \c enable_if. + // Basic type for defining "tags". A "NO" condition for \c enable_if. - /// Basic type for defining "tags". A "NO" condition for \c enable_if. - /// - ///\sa True + // Basic type for defining "tags". A "NO" condition for \c enable_if. + // + //\sa True struct False { - ///\e + //\e static const bool value = false; }; diff -r 689f24ee83e6 -r a0ab96ad65fe lemon/bits/graph_extender.h --- a/lemon/bits/graph_extender.h Thu Oct 09 16:47:01 2008 +0200 +++ b/lemon/bits/graph_extender.h Thu Oct 09 16:20:37 2008 +0100 @@ -27,14 +27,14 @@ #include #include -///\ingroup graphbits -///\file -///\brief Extenders for the digraph types +//\ingroup graphbits +//\file +//\brief Extenders for the digraph types namespace lemon { - /// \ingroup graphbits - /// - /// \brief Extender for the Digraphs + // \ingroup graphbits + // + // \brief Extender for the Digraphs template class DigraphExtender : public Base { public: @@ -186,30 +186,30 @@ }; - /// \brief Base node of the iterator - /// - /// Returns the base node (i.e. the source in this case) of the iterator + // \brief Base node of the iterator + // + // Returns the base node (i.e. the source in this case) of the iterator Node baseNode(const OutArcIt &arc) const { return Parent::source(arc); } - /// \brief Running node of the iterator - /// - /// Returns the running node (i.e. the target in this case) of the - /// iterator + // \brief Running node of the iterator + // + // Returns the running node (i.e. the target in this case) of the + // iterator Node runningNode(const OutArcIt &arc) const { return Parent::target(arc); } - /// \brief Base node of the iterator - /// - /// Returns the base node (i.e. the target in this case) of the iterator + // \brief Base node of the iterator + // + // Returns the base node (i.e. the target in this case) of the iterator Node baseNode(const InArcIt &arc) const { return Parent::target(arc); } - /// \brief Running node of the iterator - /// - /// Returns the running node (i.e. the source in this case) of the - /// iterator + // \brief Running node of the iterator + // + // Returns the running node (i.e. the source in this case) of the + // iterator Node runningNode(const InArcIt &arc) const { return Parent::source(arc); } @@ -325,9 +325,9 @@ } }; - /// \ingroup _graphbits - /// - /// \brief Extender for the Graphs + // \ingroup _graphbits + // + // \brief Extender for the Graphs template class GraphExtender : public Base { public: @@ -555,43 +555,43 @@ } }; - /// \brief Base node of the iterator - /// - /// Returns the base node (ie. the source in this case) of the iterator + // \brief Base node of the iterator + // + // Returns the base node (ie. the source in this case) of the iterator Node baseNode(const OutArcIt &arc) const { return Parent::source(static_cast(arc)); } - /// \brief Running node of the iterator - /// - /// Returns the running node (ie. the target in this case) of the - /// iterator + // \brief Running node of the iterator + // + // Returns the running node (ie. the target in this case) of the + // iterator Node runningNode(const OutArcIt &arc) const { return Parent::target(static_cast(arc)); } - /// \brief Base node of the iterator - /// - /// Returns the base node (ie. the target in this case) of the iterator + // \brief Base node of the iterator + // + // Returns the base node (ie. the target in this case) of the iterator Node baseNode(const InArcIt &arc) const { return Parent::target(static_cast(arc)); } - /// \brief Running node of the iterator - /// - /// Returns the running node (ie. the source in this case) of the - /// iterator + // \brief Running node of the iterator + // + // Returns the running node (ie. the source in this case) of the + // iterator Node runningNode(const InArcIt &arc) const { return Parent::source(static_cast(arc)); } - /// Base node of the iterator - /// - /// Returns the base node of the iterator + // Base node of the iterator + // + // Returns the base node of the iterator Node baseNode(const IncEdgeIt &edge) const { return edge._direction ? u(edge) : v(edge); } - /// Running node of the iterator - /// - /// Returns the running node of the iterator + // Running node of the iterator + // + // Returns the running node of the iterator Node runningNode(const IncEdgeIt &edge) const { return edge._direction ? v(edge) : u(edge); } diff -r 689f24ee83e6 -r a0ab96ad65fe lemon/bits/map_extender.h --- a/lemon/bits/map_extender.h Thu Oct 09 16:47:01 2008 +0200 +++ b/lemon/bits/map_extender.h Thu Oct 09 16:20:37 2008 +0100 @@ -26,14 +26,14 @@ #include #include -///\file -///\brief Extenders for iterable maps. +//\file +//\brief Extenders for iterable maps. namespace lemon { - /// \ingroup graphbits - /// - /// \brief Extender for maps + // \ingroup graphbits + // + // \brief Extender for maps template class MapExtender : public _Map { public: @@ -171,9 +171,9 @@ }; }; - /// \ingroup graphbits - /// - /// \brief Extender for maps which use a subset of the items. + // \ingroup graphbits + // + // \brief Extender for maps which use a subset of the items. template class SubMapExtender : public _Map { public: diff -r 689f24ee83e6 -r a0ab96ad65fe lemon/bits/traits.h --- a/lemon/bits/traits.h Thu Oct 09 16:47:01 2008 +0200 +++ b/lemon/bits/traits.h Thu Oct 09 16:20:37 2008 +0100 @@ -19,9 +19,9 @@ #ifndef LEMON_BITS_TRAITS_H #define LEMON_BITS_TRAITS_H -///\file -///\brief Traits for graphs and maps -/// +//\file +//\brief Traits for graphs and maps +// #include diff -r 689f24ee83e6 -r a0ab96ad65fe lemon/bits/vector_map.h --- a/lemon/bits/vector_map.h Thu Oct 09 16:47:01 2008 +0200 +++ b/lemon/bits/vector_map.h Thu Oct 09 16:20:37 2008 +0100 @@ -28,81 +28,81 @@ #include #include -///\ingroup graphbits -/// -///\file -///\brief Vector based graph maps. +//\ingroup graphbits +// +//\file +//\brief Vector based graph maps. namespace lemon { - /// \ingroup graphbits - /// - /// \brief Graph map based on the std::vector storage. - /// - /// The VectorMap template class is graph map structure what - /// automatically updates the map when a key is added to or erased from - /// the map. This map type uses the std::vector to store the values. - /// - /// \tparam _Graph The graph this map is attached to. - /// \tparam _Item The item type of the graph items. - /// \tparam _Value The value type of the map. + // \ingroup graphbits + // + // \brief Graph map based on the std::vector storage. + // + // The VectorMap template class is graph map structure what + // automatically updates the map when a key is added to or erased from + // the map. This map type uses the std::vector to store the values. + // + // \tparam _Graph The graph this map is attached to. + // \tparam _Item The item type of the graph items. + // \tparam _Value The value type of the map. template class VectorMap : public ItemSetTraits<_Graph, _Item>::ItemNotifier::ObserverBase { private: - /// The container type of the map. + // The container type of the map. typedef std::vector<_Value> Container; public: - /// The graph type of the map. + // The graph type of the map. typedef _Graph Graph; - /// The item type of the map. + // The item type of the map. typedef _Item Item; - /// The reference map tag. + // The reference map tag. typedef True ReferenceMapTag; - /// The key type of the map. + // The key type of the map. typedef _Item Key; - /// The value type of the map. + // The value type of the map. typedef _Value Value; - /// The notifier type. + // The notifier type. typedef typename ItemSetTraits<_Graph, _Item>::ItemNotifier Notifier; - /// The map type. + // The map type. typedef VectorMap Map; - /// The base class of the map. + // The base class of the map. typedef typename Notifier::ObserverBase Parent; - /// The reference type of the map; + // The reference type of the map; typedef typename Container::reference Reference; - /// The const reference type of the map; + // The const reference type of the map; typedef typename Container::const_reference ConstReference; - /// \brief Constructor to attach the new map into the notifier. - /// - /// It constructs a map and attachs it into the notifier. - /// It adds all the items of the graph to the map. + // \brief Constructor to attach the new map into the notifier. + // + // It constructs a map and attachs it into the notifier. + // It adds all the items of the graph to the map. VectorMap(const Graph& graph) { Parent::attach(graph.notifier(Item())); container.resize(Parent::notifier()->maxId() + 1); } - /// \brief Constructor uses given value to initialize the map. - /// - /// It constructs a map uses a given value to initialize the map. - /// It adds all the items of the graph to the map. + // \brief Constructor uses given value to initialize the map. + // + // It constructs a map uses a given value to initialize the map. + // It adds all the items of the graph to the map. VectorMap(const Graph& graph, const Value& value) { Parent::attach(graph.notifier(Item())); container.resize(Parent::notifier()->maxId() + 1, value); } private: - /// \brief Copy constructor - /// - /// Copy constructor. + // \brief Copy constructor + // + // Copy constructor. VectorMap(const VectorMap& _copy) : Parent() { if (_copy.attached()) { Parent::attach(*_copy.notifier()); @@ -110,24 +110,24 @@ } } - /// \brief Assign operator. - /// - /// This operator assigns for each item in the map the - /// value mapped to the same item in the copied map. - /// The parameter map should be indiced with the same - /// itemset because this assign operator does not change - /// the container of the map. + // \brief Assign operator. + // + // This operator assigns for each item in the map the + // value mapped to the same item in the copied map. + // The parameter map should be indiced with the same + // itemset because this assign operator does not change + // the container of the map. VectorMap& operator=(const VectorMap& cmap) { return operator=(cmap); } - /// \brief Template assign operator. - /// - /// The given parameter should be conform to the ReadMap - /// concecpt and could be indiced by the current item set of - /// the NodeMap. In this case the value for each item - /// is assigned by the value of the given ReadMap. + // \brief Template assign operator. + // + // The given parameter should be conform to the ReadMap + // concecpt and could be indiced by the current item set of + // the NodeMap. In this case the value for each item + // is assigned by the value of the given ReadMap. template VectorMap& operator=(const CMap& cmap) { checkConcept, CMap>(); @@ -141,36 +141,36 @@ public: - /// \brief The subcript operator. - /// - /// The subscript operator. The map can be subscripted by the - /// actual items of the graph. + // \brief The subcript operator. + // + // The subscript operator. The map can be subscripted by the + // actual items of the graph. Reference operator[](const Key& key) { return container[Parent::notifier()->id(key)]; } - /// \brief The const subcript operator. - /// - /// The const subscript operator. The map can be subscripted by the - /// actual items of the graph. + // \brief The const subcript operator. + // + // The const subscript operator. The map can be subscripted by the + // actual items of the graph. ConstReference operator[](const Key& key) const { return container[Parent::notifier()->id(key)]; } - /// \brief The setter function of the map. - /// - /// It the same as operator[](key) = value expression. + // \brief The setter function of the map. + // + // It the same as operator[](key) = value expression. void set(const Key& key, const Value& value) { (*this)[key] = value; } protected: - /// \brief Adds a new key to the map. - /// - /// It adds a new key to the map. It called by the observer notifier - /// and it overrides the add() member function of the observer base. + // \brief Adds a new key to the map. + // + // It adds a new key to the map. It called by the observer notifier + // and it overrides the add() member function of the observer base. virtual void add(const Key& key) { int id = Parent::notifier()->id(key); if (id >= int(container.size())) { @@ -178,10 +178,10 @@ } } - /// \brief Adds more new keys to the map. - /// - /// It adds more new keys to the map. It called by the observer notifier - /// and it overrides the add() member function of the observer base. + // \brief Adds more new keys to the map. + // + // It adds more new keys to the map. It called by the observer notifier + // and it overrides the add() member function of the observer base. virtual void add(const std::vector& keys) { int max = container.size() - 1; for (int i = 0; i < int(keys.size()); ++i) { @@ -193,38 +193,38 @@ container.resize(max + 1); } - /// \brief Erase a key from the map. - /// - /// Erase a key from the map. It called by the observer notifier - /// and it overrides the erase() member function of the observer base. + // \brief Erase a key from the map. + // + // Erase a key from the map. It called by the observer notifier + // and it overrides the erase() member function of the observer base. virtual void erase(const Key& key) { container[Parent::notifier()->id(key)] = Value(); } - /// \brief Erase more keys from the map. - /// - /// Erase more keys from the map. It called by the observer notifier - /// and it overrides the erase() member function of the observer base. + // \brief Erase more keys from the map. + // + // Erase more keys from the map. It called by the observer notifier + // and it overrides the erase() member function of the observer base. virtual void erase(const std::vector& keys) { for (int i = 0; i < int(keys.size()); ++i) { container[Parent::notifier()->id(keys[i])] = Value(); } } - /// \brief Buildes the map. - /// - /// It buildes the map. It called by the observer notifier - /// and it overrides the build() member function of the observer base. + // \brief Buildes the map. + // + // It buildes the map. It called by the observer notifier + // and it overrides the build() member function of the observer base. virtual void build() { int size = Parent::notifier()->maxId() + 1; container.reserve(size); container.resize(size); } - /// \brief Clear the map. - /// - /// It erase all items from the map. It called by the observer notifier - /// and it overrides the clear() member function of the observer base. + // \brief Clear the map. + // + // It erase all items from the map. It called by the observer notifier + // and it overrides the clear() member function of the observer base. virtual void clear() { container.clear(); } diff -r 689f24ee83e6 -r a0ab96ad65fe lemon/color.h --- a/lemon/color.h Thu Oct 09 16:47:01 2008 +0200 +++ b/lemon/color.h Thu Oct 09 16:20:37 2008 +0100 @@ -92,7 +92,7 @@ /// Dark cyan color constant extern const Color DARK_CYAN; - ///Map ints to different \ref Color "Color"s + ///Map ints to different Colors ///This map assigns one of the predefined \ref Color "Color"s to ///each int. It is possible to change the colors as well as diff -r 689f24ee83e6 -r a0ab96ad65fe lemon/concepts/graph_components.h --- a/lemon/concepts/graph_components.h Thu Oct 09 16:47:01 2008 +0200 +++ b/lemon/concepts/graph_components.h Thu Oct 09 16:20:37 2008 +0100 @@ -982,7 +982,7 @@ /// \brief Class describing the concept of graph maps /// /// This class describes the common interface of the graph maps - /// (NodeMap, ArcMap), that is \ref maps-page "maps" which can be used to + /// (NodeMap, ArcMap), that is maps that can be used to /// associate data to graph descriptors (nodes or arcs). template class GraphMap : public ReadWriteMap<_Item, _Value> { diff -r 689f24ee83e6 -r a0ab96ad65fe lemon/concepts/maps.h --- a/lemon/concepts/maps.h Thu Oct 09 16:47:01 2008 +0200 +++ b/lemon/concepts/maps.h Thu Oct 09 16:20:37 2008 +0100 @@ -22,7 +22,7 @@ #include #include -///\ingroup concept +///\ingroup map_concepts ///\file ///\brief The concept of maps. @@ -30,7 +30,7 @@ namespace concepts { - /// \addtogroup concept + /// \addtogroup map_concepts /// @{ /// Readable map concept diff -r 689f24ee83e6 -r a0ab96ad65fe lemon/core.h --- a/lemon/core.h Thu Oct 09 16:47:01 2008 +0200 +++ b/lemon/core.h Thu Oct 09 16:20:37 2008 +0100 @@ -58,7 +58,7 @@ /// \addtogroup gutils /// @{ - ///Create convenient typedefs for the digraph types and iterators + ///Create convenience typedefs for the digraph types and iterators ///This \c \#define creates convenient type definitions for the following ///types of \c Digraph: \c Node, \c NodeIt, \c Arc, \c ArcIt, \c InArcIt, @@ -80,9 +80,9 @@ typedef Digraph::NodeMap DoubleNodeMap; \ typedef Digraph::ArcMap BoolArcMap; \ typedef Digraph::ArcMap IntArcMap; \ - typedef Digraph::ArcMap DoubleArcMap; + typedef Digraph::ArcMap DoubleArcMap - ///Create convenient typedefs for the digraph types and iterators + ///Create convenience typedefs for the digraph types and iterators ///\see DIGRAPH_TYPEDEFS /// @@ -100,9 +100,9 @@ typedef typename Digraph::template NodeMap DoubleNodeMap; \ typedef typename Digraph::template ArcMap BoolArcMap; \ typedef typename Digraph::template ArcMap IntArcMap; \ - typedef typename Digraph::template ArcMap DoubleArcMap; + typedef typename Digraph::template ArcMap DoubleArcMap - ///Create convenient typedefs for the graph types and iterators + ///Create convenience typedefs for the graph types and iterators ///This \c \#define creates the same convenient type definitions as defined ///by \ref DIGRAPH_TYPEDEFS(Graph) and six more, namely it creates @@ -119,9 +119,9 @@ typedef Graph::IncEdgeIt IncEdgeIt; \ typedef Graph::EdgeMap BoolEdgeMap; \ typedef Graph::EdgeMap IntEdgeMap; \ - typedef Graph::EdgeMap DoubleEdgeMap; + typedef Graph::EdgeMap DoubleEdgeMap - ///Create convenient typedefs for the graph types and iterators + ///Create convenience typedefs for the graph types and iterators ///\see GRAPH_TYPEDEFS /// @@ -134,7 +134,7 @@ typedef typename Graph::IncEdgeIt IncEdgeIt; \ typedef typename Graph::template EdgeMap BoolEdgeMap; \ typedef typename Graph::template EdgeMap IntEdgeMap; \ - typedef typename Graph::template EdgeMap DoubleEdgeMap; + typedef typename Graph::template EdgeMap DoubleEdgeMap /// \brief Function to count the items in a graph. /// @@ -1554,7 +1554,7 @@ ///\note This is a dynamic data structure, therefore the data ///structure is updated after each graph alteration. Thus although ///this data structure is theoretically faster than \ref ArcLookUp - ///and \ref AllArcLookup, it often provides worse performance than + ///and \ref AllArcLookUp, it often provides worse performance than ///them. Arc operator()(Node s, Node t, Arc p = INVALID) const { if (p == INVALID) { @@ -1699,8 +1699,8 @@ ///Find an arc between two nodes. - ///Find an arc between two nodes in time O(logd), where - ///d is the number of outgoing arcs of \c s. + ///Find an arc between two nodes in time O(logd), + ///where d is the number of outgoing arcs of \c s. ///\param s The source node. ///\param t The target node. ///\return An arc from \c s to \c t if there exists, @@ -1817,8 +1817,8 @@ ///for(Arc a = ae(u,v); a != INVALID; a=ae(u,v,a)) n++; ///\endcode /// - ///Finding the first arc take O(logd) time, where - ///d is the number of outgoing arcs of \c s. Then, the + ///Finding the first arc take O(logd) time, + ///where d is the number of outgoing arcs of \c s. Then the ///consecutive arcs are found in constant time. /// ///\warning If you change the digraph, refresh() must be called before using diff -r 689f24ee83e6 -r a0ab96ad65fe lemon/dfs.h --- a/lemon/dfs.h Thu Oct 09 16:47:01 2008 +0200 +++ b/lemon/dfs.h Thu Oct 09 16:20:37 2008 +0100 @@ -50,11 +50,11 @@ ///arcs of the %DFS paths. ///It must meet the \ref concepts::WriteMap "WriteMap" concept. typedef typename Digraph::template NodeMap PredMap; - ///Instantiates a \ref PredMap. + ///Instantiates a PredMap. - ///This function instantiates a \ref PredMap. + ///This function instantiates a PredMap. ///\param g is the digraph, to which we would like to define the - ///\ref PredMap. + ///PredMap. static PredMap *createPredMap(const Digraph &g) { return new PredMap(g); @@ -65,11 +65,11 @@ ///The type of the map that indicates which nodes are processed. ///It must meet the \ref concepts::WriteMap "WriteMap" concept. typedef NullMap ProcessedMap; - ///Instantiates a \ref ProcessedMap. + ///Instantiates a ProcessedMap. - ///This function instantiates a \ref ProcessedMap. + ///This function instantiates a ProcessedMap. ///\param g is the digraph, to which - ///we would like to define the \ref ProcessedMap + ///we would like to define the ProcessedMap #ifdef DOXYGEN static ProcessedMap *createProcessedMap(const Digraph &g) #else @@ -84,11 +84,11 @@ ///The type of the map that indicates which nodes are reached. ///It must meet the \ref concepts::ReadWriteMap "ReadWriteMap" concept. typedef typename Digraph::template NodeMap ReachedMap; - ///Instantiates a \ref ReachedMap. + ///Instantiates a ReachedMap. - ///This function instantiates a \ref ReachedMap. + ///This function instantiates a ReachedMap. ///\param g is the digraph, to which - ///we would like to define the \ref ReachedMap. + ///we would like to define the ReachedMap. static ReachedMap *createReachedMap(const Digraph &g) { return new ReachedMap(g); @@ -99,11 +99,11 @@ ///The type of the map that stores the distances of the nodes. ///It must meet the \ref concepts::WriteMap "WriteMap" concept. typedef typename Digraph::template NodeMap DistMap; - ///Instantiates a \ref DistMap. + ///Instantiates a DistMap. - ///This function instantiates a \ref DistMap. + ///This function instantiates a DistMap. ///\param g is the digraph, to which we would like to define the - ///\ref DistMap. + ///DistMap. static DistMap *createDistMap(const Digraph &g) { return new DistMap(g); @@ -227,10 +227,10 @@ } }; ///\brief \ref named-templ-param "Named parameter" for setting - ///\ref PredMap type. + ///PredMap type. /// ///\ref named-templ-param "Named parameter" for setting - ///\ref PredMap type. + ///PredMap type. template struct SetPredMap : public Dfs > { typedef Dfs > Create; @@ -246,10 +246,10 @@ } }; ///\brief \ref named-templ-param "Named parameter" for setting - ///\ref DistMap type. + ///DistMap type. /// ///\ref named-templ-param "Named parameter" for setting - ///\ref DistMap type. + ///DistMap type. template struct SetDistMap : public Dfs< Digraph, SetDistMapTraits > { typedef Dfs > Create; @@ -265,10 +265,10 @@ } }; ///\brief \ref named-templ-param "Named parameter" for setting - ///\ref ReachedMap type. + ///ReachedMap type. /// ///\ref named-templ-param "Named parameter" for setting - ///\ref ReachedMap type. + ///ReachedMap type. template struct SetReachedMap : public Dfs< Digraph, SetReachedMapTraits > { typedef Dfs< Digraph, SetReachedMapTraits > Create; @@ -284,10 +284,10 @@ } }; ///\brief \ref named-templ-param "Named parameter" for setting - ///\ref ProcessedMap type. + ///ProcessedMap type. /// ///\ref named-templ-param "Named parameter" for setting - ///\ref ProcessedMap type. + ///ProcessedMap type. template struct SetProcessedMap : public Dfs< Digraph, SetProcessedMapTraits > { typedef Dfs< Digraph, SetProcessedMapTraits > Create; @@ -301,10 +301,10 @@ } }; ///\brief \ref named-templ-param "Named parameter" for setting - ///\ref ProcessedMap type to be Digraph::NodeMap. + ///ProcessedMap type to be Digraph::NodeMap. /// ///\ref named-templ-param "Named parameter" for setting - ///\ref ProcessedMap type to be Digraph::NodeMap. + ///ProcessedMap type to be Digraph::NodeMap. ///If you don't set it explicitly, it will be automatically allocated. struct SetStandardProcessedMap : public Dfs< Digraph, SetStandardProcessedMapTraits > { @@ -768,11 +768,11 @@ ///arcs of the %DFS paths. ///It must meet the \ref concepts::WriteMap "WriteMap" concept. typedef typename Digraph::template NodeMap PredMap; - ///Instantiates a \ref PredMap. + ///Instantiates a PredMap. - ///This function instantiates a \ref PredMap. + ///This function instantiates a PredMap. ///\param g is the digraph, to which we would like to define the - ///\ref PredMap. + ///PredMap. static PredMap *createPredMap(const Digraph &g) { return new PredMap(g); @@ -784,11 +784,11 @@ ///It must meet the \ref concepts::WriteMap "WriteMap" concept. ///By default it is a NullMap. typedef NullMap ProcessedMap; - ///Instantiates a \ref ProcessedMap. + ///Instantiates a ProcessedMap. - ///This function instantiates a \ref ProcessedMap. + ///This function instantiates a ProcessedMap. ///\param g is the digraph, to which - ///we would like to define the \ref ProcessedMap. + ///we would like to define the ProcessedMap. #ifdef DOXYGEN static ProcessedMap *createProcessedMap(const Digraph &g) #else @@ -803,11 +803,11 @@ ///The type of the map that indicates which nodes are reached. ///It must meet the \ref concepts::ReadWriteMap "ReadWriteMap" concept. typedef typename Digraph::template NodeMap ReachedMap; - ///Instantiates a \ref ReachedMap. + ///Instantiates a ReachedMap. - ///This function instantiates a \ref ReachedMap. + ///This function instantiates a ReachedMap. ///\param g is the digraph, to which - ///we would like to define the \ref ReachedMap. + ///we would like to define the ReachedMap. static ReachedMap *createReachedMap(const Digraph &g) { return new ReachedMap(g); @@ -818,11 +818,11 @@ ///The type of the map that stores the distances of the nodes. ///It must meet the \ref concepts::WriteMap "WriteMap" concept. typedef typename Digraph::template NodeMap DistMap; - ///Instantiates a \ref DistMap. + ///Instantiates a DistMap. - ///This function instantiates a \ref DistMap. + ///This function instantiates a DistMap. ///\param g is the digraph, to which we would like to define - ///the \ref DistMap + ///the DistMap static DistMap *createDistMap(const Digraph &g) { return new DistMap(g); @@ -835,7 +835,7 @@ typedef lemon::Path Path; }; - /// Default traits class used by \ref DfsWizard + /// Default traits class used by DfsWizard /// To make it easier to use Dfs algorithm /// we have created a wizard class. @@ -1001,10 +1001,10 @@ SetPredMapBase(const TR &b) : TR(b) {} }; ///\brief \ref named-func-param "Named parameter" - ///for setting \ref PredMap object. + ///for setting PredMap object. /// ///\ref named-func-param "Named parameter" - ///for setting \ref PredMap object. + ///for setting PredMap object. template DfsWizard > predMap(const T &t) { @@ -1019,10 +1019,10 @@ SetReachedMapBase(const TR &b) : TR(b) {} }; ///\brief \ref named-func-param "Named parameter" - ///for setting \ref ReachedMap object. + ///for setting ReachedMap object. /// /// \ref named-func-param "Named parameter" - ///for setting \ref ReachedMap object. + ///for setting ReachedMap object. template DfsWizard > reachedMap(const T &t) { @@ -1037,10 +1037,10 @@ SetDistMapBase(const TR &b) : TR(b) {} }; ///\brief \ref named-func-param "Named parameter" - ///for setting \ref DistMap object. + ///for setting DistMap object. /// /// \ref named-func-param "Named parameter" - ///for setting \ref DistMap object. + ///for setting DistMap object. template DfsWizard > distMap(const T &t) { @@ -1055,10 +1055,10 @@ SetProcessedMapBase(const TR &b) : TR(b) {} }; ///\brief \ref named-func-param "Named parameter" - ///for setting \ref ProcessedMap object. + ///for setting ProcessedMap object. /// /// \ref named-func-param "Named parameter" - ///for setting \ref ProcessedMap object. + ///for setting ProcessedMap object. template DfsWizard > processedMap(const T &t) { @@ -1213,11 +1213,11 @@ /// It must meet the \ref concepts::ReadWriteMap "ReadWriteMap" concept. typedef typename Digraph::template NodeMap ReachedMap; - /// \brief Instantiates a \ref ReachedMap. + /// \brief Instantiates a ReachedMap. /// - /// This function instantiates a \ref ReachedMap. + /// This function instantiates a ReachedMap. /// \param digraph is the digraph, to which - /// we would like to define the \ref ReachedMap. + /// we would like to define the ReachedMap. static ReachedMap *createReachedMap(const Digraph &digraph) { return new ReachedMap(digraph); } diff -r 689f24ee83e6 -r a0ab96ad65fe lemon/dijkstra.h --- a/lemon/dijkstra.h Thu Oct 09 16:47:01 2008 +0200 +++ b/lemon/dijkstra.h Thu Oct 09 16:20:37 2008 +0100 @@ -139,11 +139,11 @@ ///arcs of the shortest paths. ///It must meet the \ref concepts::WriteMap "WriteMap" concept. typedef typename Digraph::template NodeMap PredMap; - ///Instantiates a \ref PredMap. + ///Instantiates a PredMap. - ///This function instantiates a \ref PredMap. + ///This function instantiates a PredMap. ///\param g is the digraph, to which we would like to define the - ///\ref PredMap. + ///PredMap. static PredMap *createPredMap(const Digraph &g) { return new PredMap(g); @@ -155,11 +155,11 @@ ///It must meet the \ref concepts::WriteMap "WriteMap" concept. ///By default it is a NullMap. typedef NullMap ProcessedMap; - ///Instantiates a \ref ProcessedMap. + ///Instantiates a ProcessedMap. - ///This function instantiates a \ref ProcessedMap. + ///This function instantiates a ProcessedMap. ///\param g is the digraph, to which - ///we would like to define the \ref ProcessedMap + ///we would like to define the ProcessedMap #ifdef DOXYGEN static ProcessedMap *createProcessedMap(const Digraph &g) #else @@ -174,11 +174,11 @@ ///The type of the map that stores the distances of the nodes. ///It must meet the \ref concepts::WriteMap "WriteMap" concept. typedef typename Digraph::template NodeMap DistMap; - ///Instantiates a \ref DistMap. + ///Instantiates a DistMap. - ///This function instantiates a \ref DistMap. + ///This function instantiates a DistMap. ///\param g is the digraph, to which we would like to define - ///the \ref DistMap + ///the DistMap static DistMap *createDistMap(const Digraph &g) { return new DistMap(g); @@ -327,10 +327,10 @@ } }; ///\brief \ref named-templ-param "Named parameter" for setting - ///\ref PredMap type. + ///PredMap type. /// ///\ref named-templ-param "Named parameter" for setting - ///\ref PredMap type. + ///PredMap type. template struct SetPredMap : public Dijkstra< Digraph, LengthMap, SetPredMapTraits > { @@ -347,10 +347,10 @@ } }; ///\brief \ref named-templ-param "Named parameter" for setting - ///\ref DistMap type. + ///DistMap type. /// ///\ref named-templ-param "Named parameter" for setting - ///\ref DistMap type. + ///DistMap type. template struct SetDistMap : public Dijkstra< Digraph, LengthMap, SetDistMapTraits > { @@ -367,10 +367,10 @@ } }; ///\brief \ref named-templ-param "Named parameter" for setting - ///\ref ProcessedMap type. + ///ProcessedMap type. /// ///\ref named-templ-param "Named parameter" for setting - ///\ref ProcessedMap type. + ///ProcessedMap type. template struct SetProcessedMap : public Dijkstra< Digraph, LengthMap, SetProcessedMapTraits > { @@ -385,10 +385,10 @@ } }; ///\brief \ref named-templ-param "Named parameter" for setting - ///\ref ProcessedMap type to be Digraph::NodeMap. + ///ProcessedMap type to be Digraph::NodeMap. /// ///\ref named-templ-param "Named parameter" for setting - ///\ref ProcessedMap type to be Digraph::NodeMap. + ///ProcessedMap type to be Digraph::NodeMap. ///If you don't set it explicitly, it will be automatically allocated. struct SetStandardProcessedMap : public Dijkstra< Digraph, LengthMap, SetStandardProcessedMapTraits > { @@ -453,7 +453,7 @@ }; /// \brief \ref named-templ-param "Named parameter" for setting - ///\ref OperationTraits type + ///\c OperationTraits type /// ///\ref named-templ-param "Named parameter" for setting ///\ref OperationTraits type. @@ -986,11 +986,11 @@ ///arcs of the shortest paths. ///It must meet the \ref concepts::WriteMap "WriteMap" concept. typedef typename Digraph::template NodeMap PredMap; - ///Instantiates a \ref PredMap. + ///Instantiates a PredMap. - ///This function instantiates a \ref PredMap. + ///This function instantiates a PredMap. ///\param g is the digraph, to which we would like to define the - ///\ref PredMap. + ///PredMap. static PredMap *createPredMap(const Digraph &g) { return new PredMap(g); @@ -1002,11 +1002,11 @@ ///It must meet the \ref concepts::WriteMap "WriteMap" concept. ///By default it is a NullMap. typedef NullMap ProcessedMap; - ///Instantiates a \ref ProcessedMap. + ///Instantiates a ProcessedMap. - ///This function instantiates a \ref ProcessedMap. + ///This function instantiates a ProcessedMap. ///\param g is the digraph, to which - ///we would like to define the \ref ProcessedMap. + ///we would like to define the ProcessedMap. #ifdef DOXYGEN static ProcessedMap *createProcessedMap(const Digraph &g) #else @@ -1021,11 +1021,11 @@ ///The type of the map that stores the distances of the nodes. ///It must meet the \ref concepts::WriteMap "WriteMap" concept. typedef typename Digraph::template NodeMap DistMap; - ///Instantiates a \ref DistMap. + ///Instantiates a DistMap. - ///This function instantiates a \ref DistMap. + ///This function instantiates a DistMap. ///\param g is the digraph, to which we would like to define - ///the \ref DistMap + ///the DistMap static DistMap *createDistMap(const Digraph &g) { return new DistMap(g); @@ -1038,7 +1038,7 @@ typedef lemon::Path Path; }; - /// Default traits class used by \ref DijkstraWizard + /// Default traits class used by DijkstraWizard /// To make it easier to use Dijkstra algorithm /// we have created a wizard class. @@ -1198,10 +1198,10 @@ SetPredMapBase(const TR &b) : TR(b) {} }; ///\brief \ref named-func-param "Named parameter" - ///for setting \ref PredMap object. + ///for setting PredMap object. /// ///\ref named-func-param "Named parameter" - ///for setting \ref PredMap object. + ///for setting PredMap object. template DijkstraWizard > predMap(const T &t) { @@ -1216,10 +1216,10 @@ SetDistMapBase(const TR &b) : TR(b) {} }; ///\brief \ref named-func-param "Named parameter" - ///for setting \ref DistMap object. + ///for setting DistMap object. /// ///\ref named-func-param "Named parameter" - ///for setting \ref DistMap object. + ///for setting DistMap object. template DijkstraWizard > distMap(const T &t) { @@ -1234,10 +1234,10 @@ SetProcessedMapBase(const TR &b) : TR(b) {} }; ///\brief \ref named-func-param "Named parameter" - ///for setting \ref ProcessedMap object. + ///for setting ProcessedMap object. /// /// \ref named-func-param "Named parameter" - ///for setting \ref ProcessedMap object. + ///for setting ProcessedMap object. template DijkstraWizard > processedMap(const T &t) { diff -r 689f24ee83e6 -r a0ab96ad65fe lemon/dim2.h --- a/lemon/dim2.h Thu Oct 09 16:47:01 2008 +0200 +++ b/lemon/dim2.h Thu Oct 09 16:20:37 2008 +0100 @@ -259,10 +259,10 @@ - /// Bounding box of plain vectors (\ref Point points). + /// Bounding box of plain vectors (points). /// A class to calculate or store the bounding box of plain vectors - /// (\ref Point points). + /// (\ref Point "points"). template class Box { Point _bottom_left, _top_right; @@ -573,9 +573,8 @@ return os; } - ///Map of x-coordinates of a \ref Point "Point"-map + ///Map of x-coordinates of a Point-map - ///\ingroup maps ///Map of x-coordinates of a \ref Point "Point"-map. /// template @@ -592,11 +591,9 @@ void set(Key k,Value v) {_map.set(k,typename M::Value(v,_map[k].y));} }; - ///Returns an \ref XMap class + ///Returns an XMap class - ///This function just returns an \ref XMap class. - /// - ///\ingroup maps + ///This function just returns an XMap class. ///\relates XMap template inline XMap xMap(M &m) @@ -610,10 +607,9 @@ return XMap(m); } - ///Constant (read only) version of \ref XMap + ///Constant (read only) version of XMap - ///\ingroup maps - ///Constant (read only) version of \ref XMap + ///Constant (read only) version of XMap. /// template class ConstXMap @@ -628,11 +624,9 @@ Value operator[](Key k) const {return _map[k].x;} }; - ///Returns a \ref ConstXMap class + ///Returns a ConstXMap class - ///This function just returns a \ref ConstXMap class. - /// - ///\ingroup maps + ///This function just returns a ConstXMap class. ///\relates ConstXMap template inline ConstXMap xMap(const M &m) @@ -640,9 +634,8 @@ return ConstXMap(m); } - ///Map of y-coordinates of a \ref Point "Point"-map + ///Map of y-coordinates of a Point-map - ///\ingroup maps ///Map of y-coordinates of a \ref Point "Point"-map. /// template @@ -659,11 +652,9 @@ void set(Key k,Value v) {_map.set(k,typename M::Value(_map[k].x,v));} }; - ///Returns a \ref YMap class + ///Returns a YMap class - ///This function just returns a \ref YMap class. - /// - ///\ingroup maps + ///This function just returns a YMap class. ///\relates YMap template inline YMap yMap(M &m) @@ -677,10 +668,9 @@ return YMap(m); } - ///Constant (read only) version of \ref YMap + ///Constant (read only) version of YMap - ///\ingroup maps - ///Constant (read only) version of \ref YMap + ///Constant (read only) version of YMap. /// template class ConstYMap @@ -695,11 +685,9 @@ Value operator[](Key k) const {return _map[k].y;} }; - ///Returns a \ref ConstYMap class + ///Returns a ConstYMap class - ///This function just returns a \ref ConstYMap class. - /// - ///\ingroup maps + ///This function just returns a ConstYMap class. ///\relates ConstYMap template inline ConstYMap yMap(const M &m) @@ -708,12 +696,10 @@ } - ///\brief Map of the \ref Point::normSquare() "normSquare()" - ///of a \ref Point "Point"-map + ///\brief Map of the normSquare() of a Point-map /// ///Map of the \ref Point::normSquare() "normSquare()" ///of a \ref Point "Point"-map. - ///\ingroup maps template class NormSquareMap { @@ -727,11 +713,9 @@ Value operator[](Key k) const {return _map[k].normSquare();} }; - ///Returns a \ref NormSquareMap class + ///Returns a NormSquareMap class - ///This function just returns a \ref NormSquareMap class. - /// - ///\ingroup maps + ///This function just returns a NormSquareMap class. ///\relates NormSquareMap template inline NormSquareMap normSquareMap(const M &m) diff -r 689f24ee83e6 -r a0ab96ad65fe lemon/graph_to_eps.h --- a/lemon/graph_to_eps.h Thu Oct 09 16:47:01 2008 +0200 +++ b/lemon/graph_to_eps.h Thu Oct 09 16:20:37 2008 +0100 @@ -62,7 +62,7 @@ }; } -///Default traits class of \ref GraphToEps +///Default traits class of GraphToEps ///Default traits class of \ref GraphToEps. /// diff -r 689f24ee83e6 -r a0ab96ad65fe lemon/lgf_reader.h --- a/lemon/lgf_reader.h Thu Oct 09 16:47:01 2008 +0200 +++ b/lemon/lgf_reader.h Thu Oct 09 16:20:37 2008 +0100 @@ -391,15 +391,37 @@ template class DigraphReader; + /// \brief Return a \ref DigraphReader class + /// + /// This function just returns a \ref DigraphReader class. + /// \relates DigraphReader template DigraphReader digraphReader(Digraph& digraph, - std::istream& is = std::cin); - + std::istream& is = std::cin) { + DigraphReader tmp(digraph, is); + return tmp; + } + + /// \brief Return a \ref DigraphReader class + /// + /// This function just returns a \ref DigraphReader class. + /// \relates DigraphReader template - DigraphReader digraphReader(Digraph& digraph, const std::string& fn); - + DigraphReader digraphReader(Digraph& digraph, + const std::string& fn) { + DigraphReader tmp(digraph, fn); + return tmp; + } + + /// \brief Return a \ref DigraphReader class + /// + /// This function just returns a \ref DigraphReader class. + /// \relates DigraphReader template - DigraphReader digraphReader(Digraph& digraph, const char *fn); + DigraphReader digraphReader(Digraph& digraph, const char* fn) { + DigraphReader tmp(digraph, fn); + return tmp; + } /// \ingroup lemon_io /// @@ -1189,51 +1211,39 @@ }; - /// \brief Return a \ref DigraphReader class + template + class GraphReader; + + /// \brief Return a \ref GraphReader class /// - /// This function just returns a \ref DigraphReader class. - /// \relates DigraphReader - template - DigraphReader digraphReader(Digraph& digraph, - std::istream& is = std::cin) { - DigraphReader tmp(digraph, is); + /// This function just returns a \ref GraphReader class. + /// \relates GraphReader + template + GraphReader graphReader(Graph& graph, std::istream& is = std::cin) { + GraphReader tmp(graph, is); return tmp; } - /// \brief Return a \ref DigraphReader class + /// \brief Return a \ref GraphReader class /// - /// This function just returns a \ref DigraphReader class. - /// \relates DigraphReader - template - DigraphReader digraphReader(Digraph& digraph, - const std::string& fn) { - DigraphReader tmp(digraph, fn); + /// This function just returns a \ref GraphReader class. + /// \relates GraphReader + template + GraphReader graphReader(Graph& graph, const std::string& fn) { + GraphReader tmp(graph, fn); return tmp; } - /// \brief Return a \ref DigraphReader class + /// \brief Return a \ref GraphReader class /// - /// This function just returns a \ref DigraphReader class. - /// \relates DigraphReader - template - DigraphReader digraphReader(Digraph& digraph, const char* fn) { - DigraphReader tmp(digraph, fn); + /// This function just returns a \ref GraphReader class. + /// \relates GraphReader + template + GraphReader graphReader(Graph& graph, const char* fn) { + GraphReader tmp(graph, fn); return tmp; } - template - class GraphReader; - - template - GraphReader graphReader(Graph& graph, - std::istream& is = std::cin); - - template - GraphReader graphReader(Graph& graph, const std::string& fn); - - template - GraphReader graphReader(Graph& graph, const char *fn); - /// \ingroup lemon_io /// /// \brief \ref lgf-format "LGF" reader for undirected graphs @@ -2031,36 +2041,6 @@ }; - /// \brief Return a \ref GraphReader class - /// - /// This function just returns a \ref GraphReader class. - /// \relates GraphReader - template - GraphReader graphReader(Graph& graph, std::istream& is = std::cin) { - GraphReader tmp(graph, is); - return tmp; - } - - /// \brief Return a \ref GraphReader class - /// - /// This function just returns a \ref GraphReader class. - /// \relates GraphReader - template - GraphReader graphReader(Graph& graph, const std::string& fn) { - GraphReader tmp(graph, fn); - return tmp; - } - - /// \brief Return a \ref GraphReader class - /// - /// This function just returns a \ref GraphReader class. - /// \relates GraphReader - template - GraphReader graphReader(Graph& graph, const char* fn) { - GraphReader tmp(graph, fn); - return tmp; - } - class SectionReader; SectionReader sectionReader(std::istream& is); diff -r 689f24ee83e6 -r a0ab96ad65fe lemon/lgf_writer.h --- a/lemon/lgf_writer.h Thu Oct 09 16:47:01 2008 +0200 +++ b/lemon/lgf_writer.h Thu Oct 09 16:20:37 2008 +0100 @@ -351,17 +351,38 @@ template class DigraphWriter; + /// \brief Return a \ref DigraphWriter class + /// + /// This function just returns a \ref DigraphWriter class. + /// \relates DigraphWriter template DigraphWriter digraphWriter(const Digraph& digraph, - std::ostream& os = std::cout); + std::ostream& os = std::cout) { + DigraphWriter tmp(digraph, os); + return tmp; + } + /// \brief Return a \ref DigraphWriter class + /// + /// This function just returns a \ref DigraphWriter class. + /// \relates DigraphWriter template DigraphWriter digraphWriter(const Digraph& digraph, - const std::string& fn); + const std::string& fn) { + DigraphWriter tmp(digraph, fn); + return tmp; + } + /// \brief Return a \ref DigraphWriter class + /// + /// This function just returns a \ref DigraphWriter class. + /// \relates DigraphWriter template DigraphWriter digraphWriter(const Digraph& digraph, - const char *fn); + const char* fn) { + DigraphWriter tmp(digraph, fn); + return tmp; + } /// \ingroup lemon_io /// @@ -913,52 +934,40 @@ /// @} }; - /// \brief Return a \ref DigraphWriter class + template + class GraphWriter; + + /// \brief Return a \ref GraphWriter class /// - /// This function just returns a \ref DigraphWriter class. - /// \relates DigraphWriter - template - DigraphWriter digraphWriter(const Digraph& digraph, - std::ostream& os = std::cout) { - DigraphWriter tmp(digraph, os); + /// This function just returns a \ref GraphWriter class. + /// \relates GraphWriter + template + GraphWriter graphWriter(const Graph& graph, + std::ostream& os = std::cout) { + GraphWriter tmp(graph, os); return tmp; } - /// \brief Return a \ref DigraphWriter class + /// \brief Return a \ref GraphWriter class /// - /// This function just returns a \ref DigraphWriter class. - /// \relates DigraphWriter - template - DigraphWriter digraphWriter(const Digraph& digraph, - const std::string& fn) { - DigraphWriter tmp(digraph, fn); + /// This function just returns a \ref GraphWriter class. + /// \relates GraphWriter + template + GraphWriter graphWriter(const Graph& graph, const std::string& fn) { + GraphWriter tmp(graph, fn); return tmp; } - /// \brief Return a \ref DigraphWriter class + /// \brief Return a \ref GraphWriter class /// - /// This function just returns a \ref DigraphWriter class. - /// \relates DigraphWriter - template - DigraphWriter digraphWriter(const Digraph& digraph, - const char* fn) { - DigraphWriter tmp(digraph, fn); + /// This function just returns a \ref GraphWriter class. + /// \relates GraphWriter + template + GraphWriter graphWriter(const Graph& graph, const char* fn) { + GraphWriter tmp(graph, fn); return tmp; } - template - class GraphWriter; - - template - GraphWriter graphWriter(const Graph& graph, - std::ostream& os = std::cout); - - template - GraphWriter graphWriter(const Graph& graph, const std::string& fn); - - template - GraphWriter graphWriter(const Graph& graph, const char *fn); - /// \ingroup lemon_io /// /// \brief \ref lgf-format "LGF" writer for directed graphs @@ -1526,37 +1535,6 @@ /// @} }; - /// \brief Return a \ref GraphWriter class - /// - /// This function just returns a \ref GraphWriter class. - /// \relates GraphWriter - template - GraphWriter graphWriter(const Graph& graph, - std::ostream& os = std::cout) { - GraphWriter tmp(graph, os); - return tmp; - } - - /// \brief Return a \ref GraphWriter class - /// - /// This function just returns a \ref GraphWriter class. - /// \relates GraphWriter - template - GraphWriter graphWriter(const Graph& graph, const std::string& fn) { - GraphWriter tmp(graph, fn); - return tmp; - } - - /// \brief Return a \ref GraphWriter class - /// - /// This function just returns a \ref GraphWriter class. - /// \relates GraphWriter - template - GraphWriter graphWriter(const Graph& graph, const char* fn) { - GraphWriter tmp(graph, fn); - return tmp; - } - class SectionWriter; SectionWriter sectionWriter(std::istream& is); diff -r 689f24ee83e6 -r a0ab96ad65fe lemon/list_graph.h --- a/lemon/list_graph.h Thu Oct 09 16:47:01 2008 +0200 +++ b/lemon/list_graph.h Thu Oct 09 16:20:37 2008 +0100 @@ -413,7 +413,7 @@ /// Change the source of \c a to \c n /// ///\note The InArcIts referencing the changed arc remain - ///valid. However the ArcIts and OutArcIts are + ///valid. However the ArcIts and OutArcIts are ///invalidated. /// ///\warning This functionality cannot be used together with the Snapshot diff -r 689f24ee83e6 -r a0ab96ad65fe lemon/maps.h --- a/lemon/maps.h Thu Oct 09 16:47:01 2008 +0200 +++ b/lemon/maps.h Thu Oct 09 16:20:37 2008 +0100 @@ -43,7 +43,7 @@ template class MapBase { public: - /// \biref The key type of the map. + /// \brief The key type of the map. typedef K Key; /// \brief The value type of the map. /// (The type of objects associated with the keys). @@ -73,9 +73,9 @@ void set(const Key&, const Value&) {} }; - /// Returns a \ref NullMap class - - /// This function just returns a \ref NullMap class. + /// Returns a \c NullMap class + + /// This function just returns a \c NullMap class. /// \relates NullMap template NullMap nullMap() { @@ -88,7 +88,7 @@ /// This \ref concepts::ReadMap "readable map" assigns a specified /// value to each key. /// - /// In other aspects it is equivalent to \ref NullMap. + /// In other aspects it is equivalent to \c NullMap. /// So it conforms the \ref concepts::ReadWriteMap "ReadWriteMap" /// concept, but it absorbs the data written to it. /// @@ -133,9 +133,9 @@ ConstMap(const ConstMap &, const Value &v) : _value(v) {} }; - /// Returns a \ref ConstMap class - - /// This function just returns a \ref ConstMap class. + /// Returns a \c ConstMap class + + /// This function just returns a \c ConstMap class. /// \relates ConstMap template inline ConstMap constMap(const V &v) { @@ -156,7 +156,7 @@ /// This \ref concepts::ReadMap "readable map" assigns a specified /// value to each key. /// - /// In other aspects it is equivalent to \ref NullMap. + /// In other aspects it is equivalent to \c NullMap. /// So it conforms the \ref concepts::ReadWriteMap "ReadWriteMap" /// concept, but it absorbs the data written to it. /// @@ -182,9 +182,9 @@ void set(const Key&, const Value&) {} }; - /// Returns a \ref ConstMap class with inlined constant value - - /// This function just returns a \ref ConstMap class with inlined + /// Returns a \c ConstMap class with inlined constant value + + /// This function just returns a \c ConstMap class with inlined /// constant value. /// \relates ConstMap template @@ -212,9 +212,9 @@ } }; - /// Returns an \ref IdentityMap class - - /// This function just returns an \ref IdentityMap class. + /// Returns an \c IdentityMap class + + /// This function just returns an \c IdentityMap class. /// \relates IdentityMap template inline IdentityMap identityMap() { @@ -228,7 +228,7 @@ /// This map is essentially a wrapper for \c std::vector. It assigns /// values to integer keys from the range [0..size-1]. /// It can be used with some data structures, for example - /// \ref UnionFind, \ref BinHeap, when the used items are small + /// \c UnionFind, \c BinHeap, when the used items are small /// integers. This map conforms the \ref concepts::ReferenceMap /// "ReferenceMap" concept. /// @@ -268,7 +268,7 @@ RangeMap(const std::vector& vector) : _vector(vector.begin(), vector.end()) {} - /// Constructs the map from another \ref RangeMap. + /// Constructs the map from another \c RangeMap. template RangeMap(const RangeMap &c) : _vector(c._vector.begin(), c._vector.end()) {} @@ -311,19 +311,19 @@ } }; - /// Returns a \ref RangeMap class - - /// This function just returns a \ref RangeMap class. + /// Returns a \c RangeMap class + + /// This function just returns a \c RangeMap class. /// \relates RangeMap template inline RangeMap rangeMap(int size = 0, const V &value = V()) { return RangeMap(size, value); } - /// \brief Returns a \ref RangeMap class created from an appropriate + /// \brief Returns a \c RangeMap class created from an appropriate /// \c std::vector - /// This function just returns a \ref RangeMap class created from an + /// This function just returns a \c RangeMap class created from an /// appropriate \c std::vector. /// \relates RangeMap template @@ -388,7 +388,7 @@ const Value &value = Value()) : _map(map.begin(), map.end()), _value(value) {} - /// \brief Constructs the map from another \ref SparseMap. + /// \brief Constructs the map from another \c SparseMap. template SparseMap(const SparseMap &c) : _map(c._map.begin(), c._map.end()), _value(c._value) {} @@ -433,9 +433,9 @@ } }; - /// Returns a \ref SparseMap class - - /// This function just returns a \ref SparseMap class with specified + /// Returns a \c SparseMap class + + /// This function just returns a \c SparseMap class with specified /// default value. /// \relates SparseMap template @@ -448,10 +448,10 @@ return SparseMap >(value); } - /// \brief Returns a \ref SparseMap class created from an appropriate + /// \brief Returns a \c SparseMap class created from an appropriate /// \c std::map - /// This function just returns a \ref SparseMap class created from an + /// This function just returns a \c SparseMap class created from an /// appropriate \c std::map. /// \relates SparseMap template @@ -501,9 +501,9 @@ operator[](const Key &k) const { return _m1[_m2[k]]; } }; - /// Returns a \ref ComposeMap class - - /// This function just returns a \ref ComposeMap class. + /// Returns a \c ComposeMap class + + /// This function just returns a \c ComposeMap class. /// /// If \c m1 and \c m2 are maps and the \c Value type of \c m2 is /// convertible to the \c Key of \c m1, then composeMap(m1,m2)[x] @@ -556,9 +556,9 @@ Value operator[](const Key &k) const { return _f(_m1[k],_m2[k]); } }; - /// Returns a \ref CombineMap class - - /// This function just returns a \ref CombineMap class. + /// Returns a \c CombineMap class + + /// This function just returns a \c CombineMap class. /// /// For example, if \c m1 and \c m2 are both maps with \c double /// values, then @@ -625,9 +625,9 @@ Value operator[](const Key &k) const { return _f(k); } }; - /// Returns a \ref FunctorToMap class - - /// This function just returns a \ref FunctorToMap class. + /// Returns a \c FunctorToMap class + + /// This function just returns a \c FunctorToMap class. /// /// This function is specialized for adaptable binary function /// classes and C++ functions. @@ -684,9 +684,9 @@ Value operator[](const Key &k) const { return _m[k]; } }; - /// Returns a \ref MapToFunctor class - - /// This function just returns a \ref MapToFunctor class. + /// Returns a \c MapToFunctor class + + /// This function just returns a \c MapToFunctor class. /// \relates MapToFunctor template inline MapToFunctor mapToFunctor(const M &m) { @@ -723,9 +723,9 @@ Value operator[](const Key &k) const { return _m[k]; } }; - /// Returns a \ref ConvertMap class - - /// This function just returns a \ref ConvertMap class. + /// Returns a \c ConvertMap class + + /// This function just returns a \c ConvertMap class. /// \relates ConvertMap template inline ConvertMap convertMap(const M &map) { @@ -763,9 +763,9 @@ void set(const Key &k, const Value &v) { _m1.set(k,v); _m2.set(k,v); } }; - /// Returns a \ref ForkMap class - - /// This function just returns a \ref ForkMap class. + /// Returns a \c ForkMap class + + /// This function just returns a \c ForkMap class. /// \relates ForkMap template inline ForkMap forkMap(M1 &m1, M2 &m2) { @@ -807,9 +807,9 @@ Value operator[](const Key &k) const { return _m1[k]+_m2[k]; } }; - /// Returns an \ref AddMap class - - /// This function just returns an \ref AddMap class. + /// Returns an \c AddMap class + + /// This function just returns an \c AddMap class. /// /// For example, if \c m1 and \c m2 are both maps with \c double /// values, then addMap(m1,m2)[x] will be equal to @@ -855,9 +855,9 @@ Value operator[](const Key &k) const { return _m1[k]-_m2[k]; } }; - /// Returns a \ref SubMap class - - /// This function just returns a \ref SubMap class. + /// Returns a \c SubMap class + + /// This function just returns a \c SubMap class. /// /// For example, if \c m1 and \c m2 are both maps with \c double /// values, then subMap(m1,m2)[x] will be equal to @@ -904,9 +904,9 @@ Value operator[](const Key &k) const { return _m1[k]*_m2[k]; } }; - /// Returns a \ref MulMap class - - /// This function just returns a \ref MulMap class. + /// Returns a \c MulMap class + + /// This function just returns a \c MulMap class. /// /// For example, if \c m1 and \c m2 are both maps with \c double /// values, then mulMap(m1,m2)[x] will be equal to @@ -952,9 +952,9 @@ Value operator[](const Key &k) const { return _m1[k]/_m2[k]; } }; - /// Returns a \ref DivMap class - - /// This function just returns a \ref DivMap class. + /// Returns a \c DivMap class + + /// This function just returns a \c DivMap class. /// /// For example, if \c m1 and \c m2 are both maps with \c double /// values, then divMap(m1,m2)[x] will be equal to @@ -1038,9 +1038,9 @@ void set(const Key &k, const Value &v) { _m.set(k, v-_v); } }; - /// Returns a \ref ShiftMap class - - /// This function just returns a \ref ShiftMap class. + /// Returns a \c ShiftMap class + + /// This function just returns a \c ShiftMap class. /// /// For example, if \c m is a map with \c double values and \c v is /// \c double, then shiftMap(m,v)[x] will be equal to @@ -1052,9 +1052,9 @@ return ShiftMap(m,v); } - /// Returns a \ref ShiftWriteMap class - - /// This function just returns a \ref ShiftWriteMap class. + /// Returns a \c ShiftWriteMap class + + /// This function just returns a \c ShiftWriteMap class. /// /// For example, if \c m is a map with \c double values and \c v is /// \c double, then shiftWriteMap(m,v)[x] will be equal to @@ -1140,9 +1140,9 @@ void set(const Key &k, const Value &v) { _m.set(k, v/_v); } }; - /// Returns a \ref ScaleMap class - - /// This function just returns a \ref ScaleMap class. + /// Returns a \c ScaleMap class + + /// This function just returns a \c ScaleMap class. /// /// For example, if \c m is a map with \c double values and \c v is /// \c double, then scaleMap(m,v)[x] will be equal to @@ -1154,9 +1154,9 @@ return ScaleMap(m,v); } - /// Returns a \ref ScaleWriteMap class - - /// This function just returns a \ref ScaleWriteMap class. + /// Returns a \c ScaleWriteMap class + + /// This function just returns a \c ScaleWriteMap class. /// /// For example, if \c m is a map with \c double values and \c v is /// \c double, then scaleWriteMap(m,v)[x] will be equal to @@ -1240,9 +1240,9 @@ void set(const Key &k, const Value &v) { _m.set(k, -v); } }; - /// Returns a \ref NegMap class - - /// This function just returns a \ref NegMap class. + /// Returns a \c NegMap class + + /// This function just returns a \c NegMap class. /// /// For example, if \c m is a map with \c double values, then /// negMap(m)[x] will be equal to -m[x]. @@ -1253,9 +1253,9 @@ return NegMap(m); } - /// Returns a \ref NegWriteMap class - - /// This function just returns a \ref NegWriteMap class. + /// Returns a \c NegWriteMap class + + /// This function just returns a \c NegWriteMap class. /// /// For example, if \c m is a map with \c double values, then /// negWriteMap(m)[x] will be equal to -m[x]. @@ -1296,9 +1296,9 @@ }; - /// Returns an \ref AbsMap class - - /// This function just returns an \ref AbsMap class. + /// Returns an \c AbsMap class + + /// This function just returns an \c AbsMap class. /// /// For example, if \c m is a map with \c double values, then /// absMap(m)[x] will be equal to m[x] if @@ -1345,9 +1345,9 @@ Value operator[](const Key&) const { return true; } }; - /// Returns a \ref TrueMap class - - /// This function just returns a \ref TrueMap class. + /// Returns a \c TrueMap class + + /// This function just returns a \c TrueMap class. /// \relates TrueMap template inline TrueMap trueMap() { @@ -1382,9 +1382,9 @@ Value operator[](const Key&) const { return false; } }; - /// Returns a \ref FalseMap class - - /// This function just returns a \ref FalseMap class. + /// Returns a \c FalseMap class + + /// This function just returns a \c FalseMap class. /// \relates FalseMap template inline FalseMap falseMap() { @@ -1429,9 +1429,9 @@ Value operator[](const Key &k) const { return _m1[k]&&_m2[k]; } }; - /// Returns an \ref AndMap class - - /// This function just returns an \ref AndMap class. + /// Returns an \c AndMap class + + /// This function just returns an \c AndMap class. /// /// For example, if \c m1 and \c m2 are both maps with \c bool values, /// then andMap(m1,m2)[x] will be equal to @@ -1477,9 +1477,9 @@ Value operator[](const Key &k) const { return _m1[k]||_m2[k]; } }; - /// Returns an \ref OrMap class - - /// This function just returns an \ref OrMap class. + /// Returns an \c OrMap class + + /// This function just returns an \c OrMap class. /// /// For example, if \c m1 and \c m2 are both maps with \c bool values, /// then orMap(m1,m2)[x] will be equal to @@ -1544,9 +1544,9 @@ void set(const Key &k, bool v) { _m.set(k, !v); } }; - /// Returns a \ref NotMap class - - /// This function just returns a \ref NotMap class. + /// Returns a \c NotMap class + + /// This function just returns a \c NotMap class. /// /// For example, if \c m is a map with \c bool values, then /// notMap(m)[x] will be equal to !m[x]. @@ -1557,9 +1557,9 @@ return NotMap(m); } - /// Returns a \ref NotWriteMap class - - /// This function just returns a \ref NotWriteMap class. + /// Returns a \c NotWriteMap class + + /// This function just returns a \c NotWriteMap class. /// /// For example, if \c m is a map with \c bool values, then /// notWriteMap(m)[x] will be equal to !m[x]. @@ -1605,9 +1605,9 @@ Value operator[](const Key &k) const { return _m1[k]==_m2[k]; } }; - /// Returns an \ref EqualMap class - - /// This function just returns an \ref EqualMap class. + /// Returns an \c EqualMap class + + /// This function just returns an \c EqualMap class. /// /// For example, if \c m1 and \c m2 are maps with keys and values of /// the same type, then equalMap(m1,m2)[x] will be equal to @@ -1653,9 +1653,9 @@ Value operator[](const Key &k) const { return _m1[k]<_m2[k]; } }; - /// Returns an \ref LessMap class - - /// This function just returns an \ref LessMap class. + /// Returns an \c LessMap class + + /// This function just returns an \c LessMap class. /// /// For example, if \c m1 and \c m2 are maps with keys and values of /// the same type, then lessMap(m1,m2)[x] will be equal to @@ -1683,6 +1683,11 @@ } + /// @} + + /// \addtogroup maps + /// @{ + /// \brief Writable bool map for logging each \c true assigned element /// /// A \ref concepts::WriteMap "writable" bool map for logging @@ -1745,9 +1750,9 @@ Iterator _end; }; - /// Returns a \ref LoggerBoolMap class - - /// This function just returns a \ref LoggerBoolMap class. + /// Returns a \c LoggerBoolMap class + + /// This function just returns a \c LoggerBoolMap class. /// /// The most important usage of it is storing certain nodes or arcs /// that were marked \c true by an algorithm. @@ -1767,7 +1772,7 @@ /// /// \note LoggerBoolMap is just \ref concepts::WriteMap "writable", so /// it cannot be used when a readable map is needed, for example as - /// \c ReachedMap for \ref Bfs, \ref Dfs and \ref Dijkstra algorithms. + /// \c ReachedMap for \c Bfs, \c Dfs and \c Dijkstra algorithms. /// /// \relates LoggerBoolMap template @@ -1775,6 +1780,11 @@ return LoggerBoolMap(it); } + /// @} + + /// \addtogroup graph_maps + /// @{ + /// Provides an immutable and unique id for each item in the graph. /// The IdMap class provides a unique and immutable id for each item of the @@ -1882,8 +1892,6 @@ /// The value type of the InvertableMap. typedef typename Map::Value Value; - - /// \brief Constructor. /// /// Construct a new InvertableMap for the graph. @@ -2049,8 +2057,6 @@ return InverseMap(*this); } - - }; /// \brief Provides a mutable, continuous and unique descriptor for each @@ -2266,7 +2272,7 @@ /// \brief Constructor /// /// Constructor - /// \param _digraph The digraph that the map belongs to. + /// \param digraph The digraph that the map belongs to. explicit SourceMap(const Digraph& digraph) : _digraph(digraph) {} /// \brief The subscript operator. @@ -2282,9 +2288,9 @@ const Digraph& _digraph; }; - /// \brief Returns a \ref SourceMap class. + /// \brief Returns a \c SourceMap class. /// - /// This function just returns an \ref SourceMap class. + /// This function just returns an \c SourceMap class. /// \relates SourceMap template inline SourceMap sourceMap(const Digraph& digraph) { @@ -2305,7 +2311,7 @@ /// \brief Constructor /// /// Constructor - /// \param _digraph The digraph that the map belongs to. + /// \param digraph The digraph that the map belongs to. explicit TargetMap(const Digraph& digraph) : _digraph(digraph) {} /// \brief The subscript operator. @@ -2321,9 +2327,9 @@ const Digraph& _digraph; }; - /// \brief Returns a \ref TargetMap class. + /// \brief Returns a \c TargetMap class. /// - /// This function just returns a \ref TargetMap class. + /// This function just returns a \c TargetMap class. /// \relates TargetMap template inline TargetMap targetMap(const Digraph& digraph) { @@ -2344,7 +2350,7 @@ /// \brief Constructor /// /// Constructor - /// \param _graph The graph that the map belongs to. + /// \param graph The graph that the map belongs to. explicit ForwardMap(const Graph& graph) : _graph(graph) {} /// \brief The subscript operator. @@ -2360,9 +2366,9 @@ const Graph& _graph; }; - /// \brief Returns a \ref ForwardMap class. + /// \brief Returns a \c ForwardMap class. /// - /// This function just returns an \ref ForwardMap class. + /// This function just returns an \c ForwardMap class. /// \relates ForwardMap template inline ForwardMap forwardMap(const Graph& graph) { @@ -2383,7 +2389,7 @@ /// \brief Constructor /// /// Constructor - /// \param _graph The graph that the map belongs to. + /// \param graph The graph that the map belongs to. explicit BackwardMap(const Graph& graph) : _graph(graph) {} /// \brief The subscript operator. @@ -2399,9 +2405,9 @@ const Graph& _graph; }; - /// \brief Returns a \ref BackwardMap class - - /// This function just returns a \ref BackwardMap class. + /// \brief Returns a \c BackwardMap class + + /// This function just returns a \c BackwardMap class. /// \relates BackwardMap template inline BackwardMap backwardMap(const Graph& graph) { diff -r 689f24ee83e6 -r a0ab96ad65fe lemon/path.h --- a/lemon/path.h Thu Oct 09 16:47:01 2008 +0200 +++ b/lemon/path.h Thu Oct 09 16:20:37 2008 +0100 @@ -849,7 +849,7 @@ /// \brief Return true when the path is empty. int empty() const { return len == 0; } - /// \break Erase all arcs in the digraph. + /// \brief Erase all arcs in the digraph. void clear() { len = 0; if (arcs) delete[] arcs; diff -r 689f24ee83e6 -r a0ab96ad65fe lemon/smart_graph.h --- a/lemon/smart_graph.h Thu Oct 09 16:47:01 2008 +0200 +++ b/lemon/smart_graph.h Thu Oct 09 16:20:37 2008 +0100 @@ -365,7 +365,7 @@ ///Constructor that immediately makes a snapshot ///This constructor immediately makes a snapshot of the digraph. - ///\param _g The digraph we make a snapshot of. + ///\param graph The digraph we make a snapshot of. Snapshot(SmartDigraph &graph) : _graph(&graph) { node_num=_graph->nodes.size(); arc_num=_graph->arcs.size(); @@ -377,7 +377,7 @@ /// ///This function can be called more than once. In case of a repeated ///call, the previous snapshot gets lost. - ///\param _g The digraph we make the snapshot of. + ///\param graph The digraph we make the snapshot of. void save(SmartDigraph &graph) { _graph=&graph; @@ -775,7 +775,7 @@ ///Constructor that immediately makes a snapshot ///This constructor immediately makes a snapshot of the digraph. - ///\param g The digraph we make a snapshot of. + ///\param graph The digraph we make a snapshot of. Snapshot(SmartGraph &graph) { graph.saveSnapshot(*this); } @@ -786,7 +786,7 @@ /// ///This function can be called more than once. In case of a repeated ///call, the previous snapshot gets lost. - ///\param g The digraph we make the snapshot of. + ///\param graph The digraph we make the snapshot of. void save(SmartGraph &graph) { graph.saveSnapshot(*this); diff -r 689f24ee83e6 -r a0ab96ad65fe lemon/time_measure.h --- a/lemon/time_measure.h Thu Oct 09 16:47:01 2008 +0200 +++ b/lemon/time_measure.h Thu Oct 09 16:20:37 2008 +0100 @@ -311,12 +311,11 @@ ///\name Control the state of the timer ///Basically a Timer can be either running or stopped, ///but it provides a bit finer control on the execution. - ///The \ref Timer also counts the number of \ref start() - ///executions, and is stops only after the same amount (or more) - ///\ref stop() "stop()"s. This can be useful e.g. to compute - ///the running time + ///The \ref lemon::Timer "Timer" also counts the number of + ///\ref lemon::Timer::start() "start()" executions, and it stops + ///only after the same amount (or more) \ref lemon::Timer::stop() + ///"stop()"s. This can be useful e.g. to compute the running time ///of recursive functions. - /// ///@{ @@ -472,7 +471,7 @@ ///@} }; - ///Same as \ref Timer but prints a report on destruction. + ///Same as Timer but prints a report on destruction. ///Same as \ref Timer but prints a report on destruction. ///This example shows its usage. @@ -491,22 +490,22 @@ std::string _title; std::ostream &_os; public: - ///\e + ///Constructor + ///Constructor. ///\param title This text will be printed before the ellapsed time. ///\param os The stream to print the report to. ///\param run Sets whether the timer should start immediately. - TimeReport(std::string title,std::ostream &os=std::cerr,bool run=true) : Timer(run), _title(title), _os(os){} - ///\e Prints the ellapsed time on destruction. + ///Destructor that prints the ellapsed time ~TimeReport() { _os << _title << *this << std::endl; } }; - ///'Do nothing' version of \ref TimeReport + ///'Do nothing' version of TimeReport ///\sa TimeReport /// diff -r 689f24ee83e6 -r a0ab96ad65fe tools/Makefile.am --- a/tools/Makefile.am Thu Oct 09 16:47:01 2008 +0200 +++ b/tools/Makefile.am Thu Oct 09 16:20:37 2008 +0100 @@ -1,5 +1,6 @@ if WANT_TOOLS bin_PROGRAMS += +dist_bin_SCRIPTS += tools/lemon-0.x-to-1.x.sh endif WANT_TOOLS diff -r 689f24ee83e6 -r a0ab96ad65fe tools/lemon-0.x-to-1.x.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/lemon-0.x-to-1.x.sh Thu Oct 09 16:20:37 2008 +0100 @@ -0,0 +1,127 @@ +#!/bin/bash + +set -e + +if [ $# -eq 0 -o x$1 = "x-h" -o x$1 = "x-help" -o x$1 = "x--help" ]; then + echo "Usage:" + echo " $0 source-file" + exit +fi + +TMP=`mktemp` + +sed -e "s/undirected graph/_gr_aph_label_/g"\ + -e "s/undirected edge/_ed_ge_label_/g"\ + -e "s/graph_/_gr_aph_label__/g"\ + -e "s/_graph/__gr_aph_label_/g"\ + -e "s/UGraph/_Gr_aph_label_/g"\ + -e "s/uGraph/_gr_aph_label_/g"\ + -e "s/ugraph/_gr_aph_label_/g"\ + -e "s/Graph/_Digr_aph_label_/g"\ + -e "s/graph/_digr_aph_label_/g"\ + -e "s/UEdge/_Ed_ge_label_/g"\ + -e "s/uEdge/_ed_ge_label_/g"\ + -e "s/uedge/_ed_ge_label_/g"\ + -e "s/IncEdgeIt/_In_cEd_geIt_label_/g"\ + -e "s/Edge/_Ar_c_label_/g"\ + -e "s/edge/_ar_c_label_/g"\ + -e "s/ANode/_Re_d_label_/g"\ + -e "s/BNode/_Blu_e_label_/g"\ + -e "s/A-Node/_Re_d_label_/g"\ + -e "s/B-Node/_Blu_e_label_/g"\ + -e "s/anode/_re_d_label_/g"\ + -e "s/bnode/_blu_e_label_/g"\ + -e "s/aNode/_re_d_label_/g"\ + -e "s/bNode/_blu_e_label_/g"\ + -e "s/_Digr_aph_label_/Digraph/g"\ + -e "s/_digr_aph_label_/digraph/g"\ + -e "s/_Gr_aph_label_/Graph/g"\ + -e "s/_gr_aph_label_/graph/g"\ + -e "s/_Ar_c_label_/Arc/g"\ + -e "s/_ar_c_label_/arc/g"\ + -e "s/_Ed_ge_label_/Edge/g"\ + -e "s/_ed_ge_label_/edge/g"\ + -e "s/_In_cEd_geIt_label_/IncEdgeIt/g"\ + -e "s/_Re_d_label_/Red/g"\ + -e "s/_Blu_e_label_/Blue/g"\ + -e "s/_re_d_label_/red/g"\ + -e "s/_blu_e_label_/blue/g"\ + -e "s/\(\W\)DefPredMap\(\W\)/\1SetPredMap\2/g"\ + -e "s/\(\W\)DefPredMap$/\1SetPredMap/g"\ + -e "s/^DefPredMap\(\W\)/SetPredMap\1/g"\ + -e "s/^DefPredMap$/SetPredMap/g"\ + -e "s/\(\W\)DefDistMap\(\W\)/\1SetDistMap\2/g"\ + -e "s/\(\W\)DefDistMap$/\1SetDistMap/g"\ + -e "s/^DefDistMap\(\W\)/SetDistMap\1/g"\ + -e "s/^DefDistMap$/SetDistMap/g"\ + -e "s/\(\W\)DefReachedMap\(\W\)/\1SetReachedMap\2/g"\ + -e "s/\(\W\)DefReachedMap$/\1SetReachedMap/g"\ + -e "s/^DefReachedMap\(\W\)/SetReachedMap\1/g"\ + -e "s/^DefReachedMap$/SetReachedMap/g"\ + -e "s/\(\W\)DefProcessedMap\(\W\)/\1SetProcessedMap\2/g"\ + -e "s/\(\W\)DefProcessedMap$/\1SetProcessedMap/g"\ + -e "s/^DefProcessedMap\(\W\)/SetProcessedMap\1/g"\ + -e "s/^DefProcessedMap$/SetProcessedMap/g"\ + -e "s/\(\W\)DefHeap\(\W\)/\1SetHeap\2/g"\ + -e "s/\(\W\)DefHeap$/\1SetHeap/g"\ + -e "s/^DefHeap\(\W\)/SetHeap\1/g"\ + -e "s/^DefHeap$/SetHeap/g"\ + -e "s/\(\W\)DefStandardHeap\(\W\)/\1SetStandradHeap\2/g"\ + -e "s/\(\W\)DefStandardHeap$/\1SetStandradHeap/g"\ + -e "s/^DefStandardHeap\(\W\)/SetStandradHeap\1/g"\ + -e "s/^DefStandardHeap$/SetStandradHeap/g"\ + -e "s/\(\W\)DefOperationTraits\(\W\)/\1SetOperationTraits\2/g"\ + -e "s/\(\W\)DefOperationTraits$/\1SetOperationTraits/g"\ + -e "s/^DefOperationTraits\(\W\)/SetOperationTraits\1/g"\ + -e "s/^DefOperationTraits$/SetOperationTraits/g"\ + -e "s/\(\W\)DefProcessedMapToBeDefaultMap\(\W\)/\1SetStandardProcessedMap\2/g"\ + -e "s/\(\W\)DefProcessedMapToBeDefaultMap$/\1SetStandardProcessedMap/g"\ + -e "s/^DefProcessedMapToBeDefaultMap\(\W\)/SetStandardProcessedMap\1/g"\ + -e "s/^DefProcessedMapToBeDefaultMap$/SetStandardProcessedMap/g"\ + -e "s/\(\W\)IntegerMap\(\W\)/\1RangeMap\2/g"\ + -e "s/\(\W\)IntegerMap$/\1RangeMap/g"\ + -e "s/^IntegerMap\(\W\)/RangeMap\1/g"\ + -e "s/^IntegerMap$/RangeMap/g"\ + -e "s/\(\W\)integerMap\(\W\)/\1rangeMap\2/g"\ + -e "s/\(\W\)integerMap$/\1rangeMap/g"\ + -e "s/^integerMap\(\W\)/rangeMap\1/g"\ + -e "s/^integerMap$/rangeMap/g"\ + -e "s/\(\W\)copyGraph\(\W\)/\1graphCopy\2/g"\ + -e "s/\(\W\)copyGraph$/\1graphCopy/g"\ + -e "s/^copyGraph\(\W\)/graphCopy\1/g"\ + -e "s/^copyGraph$/graphCopy/g"\ + -e "s/\(\W\)copyDigraph\(\W\)/\1digraphCopy\2/g"\ + -e "s/\(\W\)copyDigraph$/\1digraphCopy/g"\ + -e "s/^copyDigraph\(\W\)/digraphCopy\1/g"\ + -e "s/^copyDigraph$/digraphCopy/g"\ + -e "s/\(\W\)\([sS]\)tdMap\(\W\)/\1\2parseMap\3/g"\ + -e "s/\(\W\)\([sS]\)tdMap$/\1\2parseMap/g"\ + -e "s/^\([sS]\)tdMap\(\W\)/\1parseMap\2/g"\ + -e "s/^\([sS]\)tdMap$/\1parseMap/g"\ + -e "s/\(\W\)\([Ff]\)unctorMap\(\W\)/\1\2unctorToMap\3/g"\ + -e "s/\(\W\)\([Ff]\)unctorMap$/\1\2unctorToMap/g"\ + -e "s/^\([Ff]\)unctorMap\(\W\)/\1unctorToMap\2/g"\ + -e "s/^\([Ff]\)unctorMap$/\1unctorToMap/g"\ + -e "s/\(\W\)\([Mm]\)apFunctor\(\W\)/\1\2apToFunctor\3/g"\ + -e "s/\(\W\)\([Mm]\)apFunctor$/\1\2apToFunctor/g"\ + -e "s/^\([Mm]\)apFunctor\(\W\)/\1apToFunctor\2/g"\ + -e "s/^\([Mm]\)apFunctor$/\1apToFunctor/g"\ + -e "s/\(\W\)\([Ff]\)orkWriteMap\(\W\)/\1\2orkMap\3/g"\ + -e "s/\(\W\)\([Ff]\)orkWriteMap$/\1\2orkMap/g"\ + -e "s/^\([Ff]\)orkWriteMap\(\W\)/\1orkMap\2/g"\ + -e "s/^\([Ff]\)orkWriteMap$/\1orkMap/g"\ + -e "s/\(\W\)StoreBoolMap\(\W\)/\1LoggerBoolMap\2/g"\ + -e "s/\(\W\)StoreBoolMap$/\1LoggerBoolMap/g"\ + -e "s/^StoreBoolMap\(\W\)/LoggerBoolMap\1/g"\ + -e "s/^StoreBoolMap$/LoggerBoolMap/g"\ + -e "s/\(\W\)storeBoolMap\(\W\)/\1loggerBoolMap\2/g"\ + -e "s/\(\W\)storeBoolMap$/\1loggerBoolMap/g"\ + -e "s/^storeBoolMap\(\W\)/loggerBoolMap\1/g"\ + -e "s/^storeBoolMap$/loggerBoolMap/g"\ + -e "s/\(\W\)BoundingBox\(\W\)/\1Box\2/g"\ + -e "s/\(\W\)BoundingBox$/\1Box/g"\ + -e "s/^BoundingBox\(\W\)/Box\1/g"\ + -e "s/^BoundingBox$/Box/g"\ +<$1 > $TMP + +mv $TMP $1 \ No newline at end of file