Index: lemon/lgf_reader.h
===================================================================
--- lemon/lgf_reader.h	(revision 1078)
+++ lemon/lgf_reader.h	(revision 1081)
@@ -102,21 +102,21 @@
     };
 
-    template <typename _Graph, bool _dir, typename _Map,
+    template <typename _GR, bool _dir, typename _Map,
               typename _Converter = DefaultConverter<typename _Map::Value> >
-    class GraphArcMapStorage : public MapStorageBase<typename _Graph::Edge> {
+    class GraphArcMapStorage : public MapStorageBase<typename _GR::Edge> {
     public:
       typedef _Map Map;
       typedef _Converter Converter;
-      typedef _Graph Graph;
-      typedef typename Graph::Edge Item;
+      typedef _GR GR;
+      typedef typename GR::Edge Item;
       static const bool dir = _dir;
 
     private:
-      const Graph& _graph;
+      const GR& _graph;
       Map& _map;
       Converter _converter;
 
     public:
-      GraphArcMapStorage(const Graph& graph, Map& map,
+      GraphArcMapStorage(const GR& graph, Map& map,
                          const Converter& converter = Converter())
         : _graph(graph), _map(map), _converter(converter) {}
@@ -174,19 +174,19 @@
     };
 
-    template <typename Graph>
+    template <typename GR>
     struct GraphArcLookUpConverter {
-      const Graph& _graph;
-      const std::map<std::string, typename Graph::Edge>& _map;
-
-      GraphArcLookUpConverter(const Graph& graph,
+      const GR& _graph;
+      const std::map<std::string, typename GR::Edge>& _map;
+
+      GraphArcLookUpConverter(const GR& graph,
                               const std::map<std::string,
-                                             typename Graph::Edge>& map)
+                                             typename GR::Edge>& map)
         : _graph(graph), _map(map) {}
 
-      typename Graph::Arc operator()(const std::string& str) {
+      typename GR::Arc operator()(const std::string& str) {
         if (str.empty() || (str[0] != '+' && str[0] != '-')) {
           throw FormatError("Item must start with '+' or '-'");
         }
-        typename std::map<std::string, typename Graph::Edge>
+        typename std::map<std::string, typename GR::Edge>
           ::const_iterator it = _map.find(str.substr(1));
         if (it == _map.end()) {
@@ -388,14 +388,13 @@
   }
 
-  template <typename Digraph>
+  template <typename DGR>
   class DigraphReader;
 
-  template <typename Digraph>
-  DigraphReader<Digraph> digraphReader(Digraph& digraph,
-                                       std::istream& is = std::cin);
-  template <typename Digraph>
-  DigraphReader<Digraph> digraphReader(Digraph& digraph, const std::string& fn);
-  template <typename Digraph>
-  DigraphReader<Digraph> digraphReader(Digraph& digraph, const char *fn);
+  template <typename TDGR>
+  DigraphReader<TDGR> digraphReader(TDGR& digraph, std::istream& is = std::cin);
+  template <typename TDGR>
+  DigraphReader<TDGR> digraphReader(TDGR& digraph, const std::string& fn);
+  template <typename TDGR>
+  DigraphReader<TDGR> digraphReader(TDGR& digraph, const char *fn);
 
   /// \ingroup lemon_io
@@ -420,5 +419,5 @@
   ///
   ///\code
-  /// DigraphReader<Digraph>(digraph, std::cin).
+  /// DigraphReader<DGR>(digraph, std::cin).
   ///   nodeMap("coordinates", coord_map).
   ///   arcMap("capacity", cap_map).
@@ -449,13 +448,13 @@
   /// a single pass, because the arcs are not constructed when the node
   /// maps are read.
-  template <typename _Digraph>
+  template <typename DGR>
   class DigraphReader {
   public:
 
-    typedef _Digraph Digraph;
-    TEMPLATE_DIGRAPH_TYPEDEFS(Digraph);
+    typedef DGR Digraph;
 
   private:
 
+    TEMPLATE_DIGRAPH_TYPEDEFS(DGR);
 
     std::istream* _is;
@@ -463,5 +462,5 @@
     std::string _filename;
 
-    Digraph& _digraph;
+    DGR& _digraph;
 
     std::string _nodes_caption;
@@ -501,5 +500,5 @@
     /// Construct a directed graph reader, which reads from the given
     /// input stream.
-    DigraphReader(Digraph& digraph, std::istream& is = std::cin)
+    DigraphReader(DGR& digraph, std::istream& is = std::cin)
       : _is(&is), local_is(false), _digraph(digraph),
         _use_nodes(false), _use_arcs(false),
@@ -510,5 +509,5 @@
     /// Construct a directed graph reader, which reads from the given
     /// file.
-    DigraphReader(Digraph& digraph, const std::string& fn)
+    DigraphReader(DGR& digraph, const std::string& fn)
       : _is(new std::ifstream(fn.c_str())), local_is(true),
         _filename(fn), _digraph(digraph),
@@ -525,5 +524,5 @@
     /// Construct a directed graph reader, which reads from the given
     /// file.
-    DigraphReader(Digraph& digraph, const char* fn)
+    DigraphReader(DGR& digraph, const char* fn)
       : _is(new std::ifstream(fn)), local_is(true),
         _filename(fn), _digraph(digraph),
@@ -561,11 +560,11 @@
   private:
 
-    template <typename DGR>
-    friend DigraphReader<DGR> digraphReader(DGR& digraph, std::istream& is);
-    template <typename DGR>
-    friend DigraphReader<DGR> digraphReader(DGR& digraph,
-                                            const std::string& fn);
-    template <typename DGR>
-    friend DigraphReader<DGR> digraphReader(DGR& digraph, const char *fn);
+    template <typename TDGR>
+    friend DigraphReader<TDGR> digraphReader(TDGR& digraph, std::istream& is);
+    template <typename TDGR>
+    friend DigraphReader<TDGR> digraphReader(TDGR& digraph,
+                                             const std::string& fn);
+    template <typename TDGR>
+    friend DigraphReader<TDGR> digraphReader(TDGR& digraph, const char *fn);
 
     DigraphReader(DigraphReader& other)
@@ -594,5 +593,5 @@
   public:
 
-    /// \name Reading rules
+    /// \name Reading Rules
     /// @{
 
@@ -699,5 +698,5 @@
     /// @}
 
-    /// \name Select section by name
+    /// \name Select Section by Name
     /// @{
 
@@ -728,5 +727,5 @@
     /// @}
 
-    /// \name Using previously constructed node or arc set
+    /// \name Using Previously Constructed Node or Arc Set
     /// @{
 
@@ -1124,5 +1123,5 @@
   public:
 
-    /// \name Execution of the reader
+    /// \name Execution of the Reader
     /// @{
 
@@ -1197,11 +1196,49 @@
   };
 
+  /// \ingroup lemon_io
+  ///
+  /// \brief Return a \ref DigraphReader class
+  ///
+  /// This function just returns a \ref DigraphReader class.
+  ///
+  /// With this function a digraph can be read from an
+  /// \ref lgf-format "LGF" file or input stream with several maps and
+  /// attributes. For example, there is network flow problem on a
+  /// digraph, i.e. a digraph with a \e capacity map on the arcs and
+  /// \e source and \e target nodes. This digraph can be read with the
+  /// following code:
+  ///
+  ///\code
+  ///ListDigraph digraph;
+  ///ListDigraph::ArcMap<int> cm(digraph);
+  ///ListDigraph::Node src, trg;
+  ///digraphReader(digraph, std::cin).
+  ///  arcMap("capacity", cap).
+  ///  node("source", src).
+  ///  node("target", trg).
+  ///  run();
+  ///\endcode
+  ///
+  /// For a complete documentation, please see the \ref DigraphReader
+  /// class documentation.
+  /// \warning Don't forget to put the \ref DigraphReader::run() "run()"
+  /// to the end of the parameter list.
+  /// \relates DigraphReader
+  /// \sa digraphReader(TDGR& digraph, const std::string& fn)
+  /// \sa digraphReader(TDGR& digraph, const char* fn)
+  template <typename TDGR>
+  DigraphReader<TDGR> digraphReader(TDGR& digraph, std::istream& is) {
+    DigraphReader<TDGR> tmp(digraph, is);
+    return tmp;
+  }
+
   /// \brief Return a \ref DigraphReader class
   ///
   /// This function just returns a \ref DigraphReader class.
   /// \relates DigraphReader
-  template <typename Digraph>
-  DigraphReader<Digraph> digraphReader(Digraph& digraph, std::istream& is) {
-    DigraphReader<Digraph> tmp(digraph, is);
+  /// \sa digraphReader(TDGR& digraph, std::istream& is)
+  template <typename TDGR>
+  DigraphReader<TDGR> digraphReader(TDGR& digraph, const std::string& fn) {
+    DigraphReader<TDGR> tmp(digraph, fn);
     return tmp;
   }
@@ -1211,31 +1248,20 @@
   /// This function just returns a \ref DigraphReader class.
   /// \relates DigraphReader
-  template <typename Digraph>
-  DigraphReader<Digraph> digraphReader(Digraph& digraph,
-                                       const std::string& fn) {
-    DigraphReader<Digraph> tmp(digraph, fn);
+  /// \sa digraphReader(TDGR& digraph, std::istream& is)
+  template <typename TDGR>
+  DigraphReader<TDGR> digraphReader(TDGR& digraph, const char* fn) {
+    DigraphReader<TDGR> tmp(digraph, fn);
     return tmp;
   }
 
-  /// \brief Return a \ref DigraphReader class
-  ///
-  /// This function just returns a \ref DigraphReader class.
-  /// \relates DigraphReader
-  template <typename Digraph>
-  DigraphReader<Digraph> digraphReader(Digraph& digraph, const char* fn) {
-    DigraphReader<Digraph> tmp(digraph, fn);
-    return tmp;
-  }
-
-  template <typename Graph>
+  template <typename GR>
   class GraphReader;
 
-  template <typename Graph>
-  GraphReader<Graph> graphReader(Graph& graph,
-                                 std::istream& is = std::cin);
-  template <typename Graph>
-  GraphReader<Graph> graphReader(Graph& graph, const std::string& fn);
-  template <typename Graph>
-  GraphReader<Graph> graphReader(Graph& graph, const char *fn);
+  template <typename TGR>
+  GraphReader<TGR> graphReader(TGR& graph, std::istream& is = std::cin);
+  template <typename TGR>
+  GraphReader<TGR> graphReader(TGR& graph, const std::string& fn);
+  template <typename TGR>
+  GraphReader<TGR> graphReader(TGR& graph, const char *fn);
 
   /// \ingroup lemon_io
@@ -1254,12 +1280,13 @@
   /// arc map.  Similarly, an attribute can be read into an arc, if
   /// it's value is an edge label prefixed with \c '+' or \c '-'.
-  template <typename _Graph>
+  template <typename GR>
   class GraphReader {
   public:
 
-    typedef _Graph Graph;
-    TEMPLATE_GRAPH_TYPEDEFS(Graph);
+    typedef GR Graph;
 
   private:
+
+    TEMPLATE_GRAPH_TYPEDEFS(GR);
 
     std::istream* _is;
@@ -1267,5 +1294,5 @@
     std::string _filename;
 
-    Graph& _graph;
+    GR& _graph;
 
     std::string _nodes_caption;
@@ -1305,5 +1332,5 @@
     /// Construct an undirected graph reader, which reads from the given
     /// input stream.
-    GraphReader(Graph& graph, std::istream& is = std::cin)
+    GraphReader(GR& graph, std::istream& is = std::cin)
       : _is(&is), local_is(false), _graph(graph),
         _use_nodes(false), _use_edges(false),
@@ -1314,5 +1341,5 @@
     /// Construct an undirected graph reader, which reads from the given
     /// file.
-    GraphReader(Graph& graph, const std::string& fn)
+    GraphReader(GR& graph, const std::string& fn)
       : _is(new std::ifstream(fn.c_str())), local_is(true),
         _filename(fn), _graph(graph),
@@ -1329,5 +1356,5 @@
     /// Construct an undirected graph reader, which reads from the given
     /// file.
-    GraphReader(Graph& graph, const char* fn)
+    GraphReader(GR& graph, const char* fn)
       : _is(new std::ifstream(fn)), local_is(true),
         _filename(fn), _graph(graph),
@@ -1364,10 +1391,10 @@
 
   private:
-    template <typename GR>
-    friend GraphReader<GR> graphReader(GR& graph, std::istream& is);
-    template <typename GR>
-    friend GraphReader<GR> graphReader(GR& graph, const std::string& fn);
-    template <typename GR>
-    friend GraphReader<GR> graphReader(GR& graph, const char *fn);
+    template <typename TGR>
+    friend GraphReader<TGR> graphReader(TGR& graph, std::istream& is);
+    template <typename TGR>
+    friend GraphReader<TGR> graphReader(TGR& graph, const std::string& fn);
+    template <typename TGR>
+    friend GraphReader<TGR> graphReader(TGR& graph, const char *fn);
 
     GraphReader(GraphReader& other)
@@ -1396,5 +1423,5 @@
   public:
 
-    /// \name Reading rules
+    /// \name Reading Rules
     /// @{
 
@@ -1461,5 +1488,5 @@
       _edge_maps.push_back(std::make_pair('+' + caption, forward_storage));
       _reader_bits::MapStorageBase<Edge>* backward_storage =
-        new _reader_bits::GraphArcMapStorage<Graph, false, Map>(_graph, map);
+        new _reader_bits::GraphArcMapStorage<GR, false, Map>(_graph, map);
       _edge_maps.push_back(std::make_pair('-' + caption, backward_storage));
       return *this;
@@ -1475,9 +1502,9 @@
       checkConcept<concepts::WriteMap<Arc, typename Map::Value>, Map>();
       _reader_bits::MapStorageBase<Edge>* forward_storage =
-        new _reader_bits::GraphArcMapStorage<Graph, true, Map, Converter>
+        new _reader_bits::GraphArcMapStorage<GR, true, Map, Converter>
         (_graph, map, converter);
       _edge_maps.push_back(std::make_pair('+' + caption, forward_storage));
       _reader_bits::MapStorageBase<Edge>* backward_storage =
-        new _reader_bits::GraphArcMapStorage<Graph, false, Map, Converter>
+        new _reader_bits::GraphArcMapStorage<GR, false, Map, Converter>
         (_graph, map, converter);
       _edge_maps.push_back(std::make_pair('-' + caption, backward_storage));
@@ -1537,5 +1564,5 @@
     /// Add an arc reading rule to reader.
     GraphReader& arc(const std::string& caption, Arc& arc) {
-      typedef _reader_bits::GraphArcLookUpConverter<Graph> Converter;
+      typedef _reader_bits::GraphArcLookUpConverter<GR> Converter;
       Converter converter(_graph, _edge_index);
       _reader_bits::ValueStorageBase* storage =
@@ -1547,5 +1574,5 @@
     /// @}
 
-    /// \name Select section by name
+    /// \name Select Section by Name
     /// @{
 
@@ -1576,5 +1603,5 @@
     /// @}
 
-    /// \name Using previously constructed node or edge set
+    /// \name Using Previously Constructed Node or Edge Set
     /// @{
 
@@ -1973,5 +2000,5 @@
   public:
 
-    /// \name Execution of the reader
+    /// \name Execution of the Reader
     /// @{
 
@@ -2047,11 +2074,45 @@
   };
 
+  /// \ingroup lemon_io
+  ///
+  /// \brief Return a \ref GraphReader class
+  ///
+  /// This function just returns a \ref GraphReader class.
+  ///
+  /// With this function a graph can be read from an
+  /// \ref lgf-format "LGF" file or input stream with several maps and
+  /// attributes. For example, there is weighted matching problem on a
+  /// graph, i.e. a graph with a \e weight map on the edges. This
+  /// graph can be read with the following code:
+  ///
+  ///\code
+  ///ListGraph graph;
+  ///ListGraph::EdgeMap<int> weight(graph);
+  ///graphReader(graph, std::cin).
+  ///  edgeMap("weight", weight).
+  ///  run();
+  ///\endcode
+  ///
+  /// For a complete documentation, please see the \ref GraphReader
+  /// class documentation.
+  /// \warning Don't forget to put the \ref GraphReader::run() "run()"
+  /// to the end of the parameter list.
+  /// \relates GraphReader
+  /// \sa graphReader(TGR& graph, const std::string& fn)
+  /// \sa graphReader(TGR& graph, const char* fn)
+  template <typename TGR>
+  GraphReader<TGR> graphReader(TGR& graph, std::istream& is) {
+    GraphReader<TGR> tmp(graph, is);
+    return tmp;
+  }
+
   /// \brief Return a \ref GraphReader class
   ///
   /// This function just returns a \ref GraphReader class.
   /// \relates GraphReader
-  template <typename Graph>
-  GraphReader<Graph> graphReader(Graph& graph, std::istream& is) {
-    GraphReader<Graph> tmp(graph, is);
+  /// \sa graphReader(TGR& graph, std::istream& is)
+  template <typename TGR>
+  GraphReader<TGR> graphReader(TGR& graph, const std::string& fn) {
+    GraphReader<TGR> tmp(graph, fn);
     return tmp;
   }
@@ -2061,17 +2122,8 @@
   /// This function just returns a \ref GraphReader class.
   /// \relates GraphReader
-  template <typename Graph>
-  GraphReader<Graph> graphReader(Graph& graph, const std::string& fn) {
-    GraphReader<Graph> tmp(graph, fn);
-    return tmp;
-  }
-
-  /// \brief Return a \ref GraphReader class
-  ///
-  /// This function just returns a \ref GraphReader class.
-  /// \relates GraphReader
-  template <typename Graph>
-  GraphReader<Graph> graphReader(Graph& graph, const char* fn) {
-    GraphReader<Graph> tmp(graph, fn);
+  /// \sa graphReader(TGR& graph, std::istream& is)
+  template <typename TGR>
+  GraphReader<TGR> graphReader(TGR& graph, const char* fn) {
+    GraphReader<TGR> tmp(graph, fn);
     return tmp;
   }
@@ -2172,5 +2224,5 @@
   public:
 
-    /// \name Section readers
+    /// \name Section Readers
     /// @{
 
@@ -2271,5 +2323,5 @@
 
 
-    /// \name Execution of the reader
+    /// \name Execution of the Reader
     /// @{
 
@@ -2330,8 +2382,16 @@
   };
 
+  /// \ingroup lemon_io
+  ///
   /// \brief Return a \ref SectionReader class
   ///
   /// This function just returns a \ref SectionReader class.
+  ///
+  /// Please see SectionReader documentation about the custom section
+  /// input.
+  ///
   /// \relates SectionReader
+  /// \sa sectionReader(const std::string& fn)
+  /// \sa sectionReader(const char *fn)
   inline SectionReader sectionReader(std::istream& is) {
     SectionReader tmp(is);
@@ -2343,4 +2403,5 @@
   /// This function just returns a \ref SectionReader class.
   /// \relates SectionReader
+  /// \sa sectionReader(std::istream& is)
   inline SectionReader sectionReader(const std::string& fn) {
     SectionReader tmp(fn);
@@ -2352,4 +2413,5 @@
   /// This function just returns a \ref SectionReader class.
   /// \relates SectionReader
+  /// \sa sectionReader(std::istream& is)
   inline SectionReader sectionReader(const char* fn) {
     SectionReader tmp(fn);
@@ -2453,5 +2515,5 @@
 
 
-    /// \name Node sections
+    /// \name Node Sections
     /// @{
 
@@ -2479,5 +2541,5 @@
     /// @}
 
-    /// \name Arc/Edge sections
+    /// \name Arc/Edge Sections
     /// @{
 
@@ -2537,5 +2599,5 @@
     /// @}
 
-    /// \name Attribute sections
+    /// \name Attribute Sections
     /// @{
 
@@ -2563,5 +2625,5 @@
     /// @}
 
-    /// \name Extra sections
+    /// \name Extra Sections
     /// @{
 
@@ -2639,5 +2701,5 @@
   public:
 
-    /// \name Execution of the contents reader
+    /// \name Execution of the Contents Reader
     /// @{
 
