COIN-OR::LEMON - Graph Library

Ticket #597: 597-8-e68f0ef37e77-unused-class.patch

File 597-8-e68f0ef37e77-unused-class.patch, 2.2 KB (added by Peter Kovacs, 23 months ago)
  • lemon/vf2.h

    # HG changeset patch
    # User Peter Kovacs <kpeter@inf.elte.hu>
    # Date 1507388610 -7200
    # Node ID e68f0ef37e77b716871c4f7917d8879a3fe45846
    # Parent  3ca508482e4c47ce402773e7bb3cf3ab9c62e983
    Remove unused auxiliary class in Vf2 (#597)
    
    diff --git a/lemon/vf2.h b/lemon/vf2.h
    a b  
    2424
    2525#include <lemon/core.h>
    2626#include <lemon/concepts/graph.h>
    27 #include <lemon/dfs.h>
    2827#include <lemon/bfs.h>
    2928#include <lemon/bits/vf2_internals.h>
    3029
     
    5453      };
    5554
    5655      template <class G>
    57       class DfsLeaveOrder : public DfsVisitor<G> {
    58         const G &_g;
    59         std::vector<typename G::Node> &_order;
    60         int i;
    61       public:
    62         DfsLeaveOrder(const G &g, std::vector<typename G::Node> &order)
    63           : i(countNodes(g)), _g(g), _order(order) { }
    64         void leave(const typename G::Node &node) {
    65           _order[--i]=node;
    66         }
    67       };
    68 
    69       template <class G>
    7056      class BfsLeaveOrder : public BfsVisitor<G> {
    7157        int i;
    7258        const G &_g;
     
    122108    //if and only if the two nodes are equivalent
    123109    NEQ _nEq;
    124110
    125     //Current depth in the DFS tree.
     111    //Current depth in the search tree
    126112    int _depth;
    127113
    128114    //The current mapping. _mapping[v1]=v2 iff v1 has been mapped to v2,
     
    233219    }
    234220
    235221    void initOrder() {
    236       // we will find pairs for the nodes of g1 in this order
    237 
    238       // bits::vf2::DfsLeaveOrder<G1> v(_g1,_order);
    239       //   DfsVisit<G1,bits::vf2::DfsLeaveOrder<G1> >dfs(_g1, v);
    240       //   dfs.run();
    241 
    242       //it is more efficient in practice than DFS
     222      //determine the order in which we will find pairs for the nodes of g1
     223      //BFS order is more efficient in practice than DFS
    243224      bits::vf2::BfsLeaveOrder<G1> v(_g1,_order);
    244       BfsVisit<G1,bits::vf2::BfsLeaveOrder<G1> >bfs(_g1, v);
     225      BfsVisit<G1,bits::vf2::BfsLeaveOrder<G1> > bfs(_g1, v);
    245226      bfs.run();
    246227    }
    247228
  • lemon/vf2pp.h

    diff --git a/lemon/vf2pp.h b/lemon/vf2pp.h
    a b  
    7272    //The graph into which g1 is to be embedded
    7373    const G2 &_g2;
    7474
    75     //Current depth in the search tree.
     75    //Current depth in the search tree
    7676    int _depth;
    7777
    7878    //The current mapping. _mapping[v1]=v2 iff v1 has been mapped to v2,