equal
deleted
inserted
replaced
53 /// For example, the number of all non-isomorphic connected graphs |
53 /// For example, the number of all non-isomorphic connected graphs |
54 /// can be computed with following code. |
54 /// can be computed with following code. |
55 ///\code |
55 ///\code |
56 /// int num = 0; |
56 /// int num = 0; |
57 /// SmartGraph graph; |
57 /// SmartGraph graph; |
58 /// while(readNauty(std::cin, graph)) { |
58 /// while (readNauty(graph, std::cin)) { |
59 /// PlanarityChecking<SmartUGraph> pc(graph); |
59 /// PlanarityChecking<SmartGraph> pc(graph); |
60 /// if (pc.run()) ++num; |
60 /// if (pc.run()) ++num; |
61 /// } |
61 /// } |
62 /// std::cout << "Number of planar graphs: " << num << std::endl; |
62 /// std::cout << "Number of planar graphs: " << num << std::endl; |
63 ///\endcode |
63 ///\endcode |
64 /// |
64 /// |
66 /// file generation the pipelining is recommended. |
66 /// file generation the pipelining is recommended. |
67 ///\code |
67 ///\code |
68 /// ./geng -c 10 | ./num_of_pg |
68 /// ./geng -c 10 | ./num_of_pg |
69 ///\endcode |
69 ///\endcode |
70 template <typename Graph> |
70 template <typename Graph> |
71 std::istream& readNauty(std::istream& is, Graph& graph) { |
71 std::istream& readNauty(Graph& graph, std::istream& is) { |
72 graph.clear(); |
72 graph.clear(); |
73 |
73 |
74 std::string line; |
74 std::string line; |
75 if (getline(is, line)) { |
75 if (getline(is, line)) { |
76 int index = 0; |
76 int index = 0; |