lemon/graph_reader.h
changeset 2226 0411ac8a2d87
parent 2100 6fbe90faf02a
child 2334 c1e936e6a46b
equal deleted inserted replaced
14:7c56f002f7f7 15:a97d7f1ae075
   342     
   342     
   343     AttributeReader<ReaderTraits> attribute_reader;
   343     AttributeReader<ReaderTraits> attribute_reader;
   344   };
   344   };
   345 
   345 
   346 
   346 
   347   /// \brief Read a graph from the input.
       
   348   ///
       
   349   /// It is a helper function to read a graph from the given input
       
   350   /// stream. It gives back an GraphReader object and this object
       
   351   /// can read more maps, labeled nodes, edges and attributes.
       
   352   ///
       
   353   /// \warning Do not forget to call the \c run() function.
       
   354   ///
       
   355   /// \param is The input stream.
       
   356   /// \param g The graph.
       
   357   template<typename Graph>
       
   358   GraphReader<Graph> graphReader(std::istream& is, Graph &g) {
       
   359     return GraphReader<Graph>(is, g);
       
   360   }
       
   361 
       
   362   /// \brief Read a graph from the input.
       
   363   ///
       
   364   /// It is a helper function to read a graph from the given input
       
   365   /// file. It gives back an GraphReader object and this object
       
   366   /// can read more maps, labeled nodes, edges and attributes.
       
   367   ///
       
   368   /// \warning Do not forget to call the \c run() function.
       
   369   ///
       
   370   /// \param fn The input filename.
       
   371   /// \param g The graph.
       
   372   template<typename Graph>
       
   373   GraphReader<Graph> graphReader(const std::string& fn, Graph &g) {
       
   374     return GraphReader<Graph>(fn, g);
       
   375   }
       
   376 
       
   377   /// \brief The undirected graph reader class.
   347   /// \brief The undirected graph reader class.
   378   ///
   348   ///
   379   /// The \c UGraphReader class provides the graph input. 
   349   /// The \c UGraphReader class provides the graph input. 
   380   /// Before you read this documentation it might be useful to read the general
   350   /// Before you read this documentation it might be useful to read the general
   381   /// description of  \ref graph-io-page "Graph Input-Output".
   351   /// description of  \ref graph-io-page "Graph Input-Output".
   753     UEdgeReader<Graph> u_edge_reader;
   723     UEdgeReader<Graph> u_edge_reader;
   754     
   724     
   755     AttributeReader<ReaderTraits> attribute_reader;
   725     AttributeReader<ReaderTraits> attribute_reader;
   756   };
   726   };
   757 
   727 
   758   /// \brief Read an undirected graph from the input.
       
   759   ///
       
   760   /// It is a helper function to read an undirected graph from the given input
       
   761   /// stream. It gives back an UGraphReader object and this object
       
   762   /// can read more maps, labeled nodes, edges, undirected edges and
       
   763   /// attributes.
       
   764   ///
       
   765   /// \warning Do not forget to call the \c run() function.
       
   766   ///
       
   767   /// \param is The input stream.
       
   768   /// \param g The graph.
       
   769   template<typename Graph>
       
   770   UGraphReader<Graph> uGraphReader(std::istream& is, Graph &g) {
       
   771     return GraphReader<Graph>(is, g);
       
   772   }
       
   773 
       
   774   /// \brief Read an undirected graph from the input.
       
   775   ///
       
   776   /// It is a helper function to read an undirected graph from the given input
       
   777   /// file. It gives back an UGraphReader object and this object
       
   778   /// can read more maps, labeled nodes, edges, undirected edges and 
       
   779   /// attributes.
       
   780   ///
       
   781   /// \warning Do not forget to call the \c run() function.
       
   782   ///
       
   783   /// \param fn The input filename.
       
   784   /// \param g The graph.
       
   785   template<typename Graph>
       
   786   UGraphReader<Graph> uGraphReader(const std::string& fn, Graph &g) {
       
   787     return GraphReader<Graph>(fn, g);
       
   788   }
       
   789 
   728 
   790   /// @}
   729   /// @}
   791 }
   730 }
   792 
   731 
   793 #endif
   732 #endif