lemon/nauty_reader.h
changeset 392 db3251947eba
parent 358 636fa2f39f10
child 440 88ed40ad0d4f
equal deleted inserted replaced
4:c327f3dcab21 5:f2f475f0f2b1
    46   /// For example, the number of all non-isomorphic planar graphs
    46   /// For example, the number of all non-isomorphic planar graphs
    47   /// can be computed with the following code.
    47   /// can be computed with the following code.
    48   ///\code
    48   ///\code
    49   /// int num = 0;
    49   /// int num = 0;
    50   /// SmartGraph graph;
    50   /// SmartGraph graph;
    51   /// while (readNauty(graph, std::cin)) {
    51   /// while (readNautyGraph(graph, std::cin)) {
    52   ///   PlanarityChecking<SmartGraph> pc(graph);
    52   ///   PlanarityChecking<SmartGraph> pc(graph);
    53   ///   if (pc.run()) ++num;
    53   ///   if (pc.run()) ++num;
    54   /// }
    54   /// }
    55   /// std::cout << "Number of planar graphs: " << num << std::endl;
    55   /// std::cout << "Number of planar graphs: " << num << std::endl;
    56   ///\endcode
    56   ///\endcode
    59   /// file generation pipelining is recommended. For example,
    59   /// file generation pipelining is recommended. For example,
    60   ///\code
    60   ///\code
    61   /// ./geng -c 10 | ./num_of_planar_graphs
    61   /// ./geng -c 10 | ./num_of_planar_graphs
    62   ///\endcode
    62   ///\endcode
    63   template <typename Graph>
    63   template <typename Graph>
    64   std::istream& readNauty(Graph& graph, std::istream& is = std::cin) {
    64   std::istream& readNautyGraph(Graph& graph, std::istream& is = std::cin) {
    65     graph.clear();
    65     graph.clear();
    66 
    66 
    67     std::string line;
    67     std::string line;
    68     if (getline(is, line)) {
    68     if (getline(is, line)) {
    69       int index = 0;
    69       int index = 0;