diff -r 3ca508482e4c -r e68f0ef37e77 lemon/vf2.h --- a/lemon/vf2.h Sat Oct 07 16:22:04 2017 +0200 +++ b/lemon/vf2.h Sat Oct 07 17:03:30 2017 +0200 @@ -24,7 +24,6 @@ #include #include -#include #include #include @@ -54,19 +53,6 @@ }; template - class DfsLeaveOrder : public DfsVisitor { - const G &_g; - std::vector &_order; - int i; - public: - DfsLeaveOrder(const G &g, std::vector &order) - : i(countNodes(g)), _g(g), _order(order) { } - void leave(const typename G::Node &node) { - _order[--i]=node; - } - }; - - template class BfsLeaveOrder : public BfsVisitor { int i; const G &_g; @@ -122,7 +108,7 @@ //if and only if the two nodes are equivalent NEQ _nEq; - //Current depth in the DFS tree. + //Current depth in the search tree int _depth; //The current mapping. _mapping[v1]=v2 iff v1 has been mapped to v2, @@ -233,15 +219,10 @@ } void initOrder() { - // we will find pairs for the nodes of g1 in this order - - // bits::vf2::DfsLeaveOrder v(_g1,_order); - // DfsVisit >dfs(_g1, v); - // dfs.run(); - - //it is more efficient in practice than DFS + //determine the order in which we will find pairs for the nodes of g1 + //BFS order is more efficient in practice than DFS bits::vf2::BfsLeaveOrder v(_g1,_order); - BfsVisit >bfs(_g1, v); + BfsVisit > bfs(_g1, v); bfs.run(); }