lemon/lgf_reader.h
branch1.1
changeset 1258 bdfc038f364c
parent 1069 b1b534ddb539
equal deleted inserted replaced
47:f0ae74dddb27 50:7ba6769ed399
   560   private:
   560   private:
   561 
   561 
   562     template <typename TDGR>
   562     template <typename TDGR>
   563     friend DigraphReader<TDGR> digraphReader(TDGR& digraph, std::istream& is);
   563     friend DigraphReader<TDGR> digraphReader(TDGR& digraph, std::istream& is);
   564     template <typename TDGR>
   564     template <typename TDGR>
   565     friend DigraphReader<TDGR> digraphReader(TDGR& digraph, 
   565     friend DigraphReader<TDGR> digraphReader(TDGR& digraph,
   566                                              const std::string& fn);
   566                                              const std::string& fn);
   567     template <typename TDGR>
   567     template <typename TDGR>
   568     friend DigraphReader<TDGR> digraphReader(TDGR& digraph, const char *fn);
   568     friend DigraphReader<TDGR> digraphReader(TDGR& digraph, const char *fn);
   569 
   569 
   570     DigraphReader(DigraphReader& other)
   570     DigraphReader(DigraphReader& other)
  1192     }
  1192     }
  1193 
  1193 
  1194     /// @}
  1194     /// @}
  1195 
  1195 
  1196   };
  1196   };
  1197   
  1197 
  1198   /// \ingroup lemon_io
  1198   /// \ingroup lemon_io
  1199   ///
  1199   ///
  1200   /// \brief Return a \ref DigraphReader class
  1200   /// \brief Return a \ref DigraphReader class
  1201   ///
  1201   ///
  1202   /// This function just returns a \ref DigraphReader class.
  1202   /// This function just returns a \ref DigraphReader class.
  1203   ///
  1203   ///
  1204   /// With this function a digraph can be read from an 
  1204   /// With this function a digraph can be read from an
  1205   /// \ref lgf-format "LGF" file or input stream with several maps and
  1205   /// \ref lgf-format "LGF" file or input stream with several maps and
  1206   /// attributes. For example, there is network flow problem on a
  1206   /// attributes. For example, there is network flow problem on a
  1207   /// digraph, i.e. a digraph with a \e capacity map on the arcs and
  1207   /// digraph, i.e. a digraph with a \e capacity map on the arcs and
  1208   /// \e source and \e target nodes. This digraph can be read with the
  1208   /// \e source and \e target nodes. This digraph can be read with the
  1209   /// following code:
  1209   /// following code:
  1254     return tmp;
  1254     return tmp;
  1255   }
  1255   }
  1256 
  1256 
  1257   template <typename GR>
  1257   template <typename GR>
  1258   class GraphReader;
  1258   class GraphReader;
  1259  
  1259 
  1260   template <typename TGR>
  1260   template <typename TGR>
  1261   GraphReader<TGR> graphReader(TGR& graph, std::istream& is = std::cin);
  1261   GraphReader<TGR> graphReader(TGR& graph, std::istream& is = std::cin);
  1262   template <typename TGR>
  1262   template <typename TGR>
  1263   GraphReader<TGR> graphReader(TGR& graph, const std::string& fn);
  1263   GraphReader<TGR> graphReader(TGR& graph, const std::string& fn);
  1264   template <typename TGR>
  1264   template <typename TGR>
  1391 
  1391 
  1392   private:
  1392   private:
  1393     template <typename TGR>
  1393     template <typename TGR>
  1394     friend GraphReader<TGR> graphReader(TGR& graph, std::istream& is);
  1394     friend GraphReader<TGR> graphReader(TGR& graph, std::istream& is);
  1395     template <typename TGR>
  1395     template <typename TGR>
  1396     friend GraphReader<TGR> graphReader(TGR& graph, const std::string& fn); 
  1396     friend GraphReader<TGR> graphReader(TGR& graph, const std::string& fn);
  1397     template <typename TGR>
  1397     template <typename TGR>
  1398     friend GraphReader<TGR> graphReader(TGR& graph, const char *fn);
  1398     friend GraphReader<TGR> graphReader(TGR& graph, const char *fn);
  1399 
  1399 
  1400     GraphReader(GraphReader& other)
  1400     GraphReader(GraphReader& other)
  1401       : _is(other._is), local_is(other.local_is), _graph(other._graph),
  1401       : _is(other._is), local_is(other.local_is), _graph(other._graph),
  2075 
  2075 
  2076   /// \ingroup lemon_io
  2076   /// \ingroup lemon_io
  2077   ///
  2077   ///
  2078   /// \brief Return a \ref GraphReader class
  2078   /// \brief Return a \ref GraphReader class
  2079   ///
  2079   ///
  2080   /// This function just returns a \ref GraphReader class. 
  2080   /// This function just returns a \ref GraphReader class.
  2081   ///
  2081   ///
  2082   /// With this function a graph can be read from an 
  2082   /// With this function a graph can be read from an
  2083   /// \ref lgf-format "LGF" file or input stream with several maps and
  2083   /// \ref lgf-format "LGF" file or input stream with several maps and
  2084   /// attributes. For example, there is weighted matching problem on a
  2084   /// attributes. For example, there is weighted matching problem on a
  2085   /// graph, i.e. a graph with a \e weight map on the edges. This
  2085   /// graph, i.e. a graph with a \e weight map on the edges. This
  2086   /// graph can be read with the following code:
  2086   /// graph can be read with the following code:
  2087   ///
  2087   ///