lemon/nauty_reader.h
changeset 350 c6c6e1d863c4
parent 348 96f7cc46c91c
child 351 91e68d590e61
equal deleted inserted replaced
0:0a5a74059ab0 1:cb4b13df2fa1
    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;