Generated on Wed Apr 29 2015 11:51:40 for GGL-4.1.2 by doxygen 1.8.3.1
SubGraphMatching.hh
Go to the documentation of this file.
1 #ifndef SGM_SUBGRAPHMATCHING_HH_
2 #define SGM_SUBGRAPHMATCHING_HH_
3 
4 #include "sgm/Graph_Interface.hh"
5 #include "sgm/Pattern.hh"
6 #include "sgm/Match_Reporter.hh"
7 
8 namespace sgm {
9 
10 
11  /*! @brief Interface for subgraph monomorphism
12  *
13  * This class defines the interface of sub-graph matching algorithms of
14  * the sgm library, i.e. algorithms solving the subgraph-monomorphism
15  * problem.
16  *
17  * @author Martin Mann (c) 2008 http://www.bioinf.uni-freiburg.de/~mmann/
18  */
20 
21  public:
22 
23 
24  virtual
26  {}
27 
28 
29  //! Performs exact sub graph matching to find maxHits occurrences of
30  //! the pattern graph within the target graph. Each hit is reported to
31  //! the Match_Reporter object.
32  //! @param pattern the pattern graph to search for
33  //! @param target the graph to search the pattern within
34  //! @param reporter all hits are reported to that object
35  //! @param maxHits the maximal number of hits to find
36  //! @return the number of exact matches found
37  virtual
38  size_t
39  findMatches ( const Pattern_Interface & pattern,
40  const Graph_Interface & target,
41  Match_Reporter & reporter,
42  const size_t maxHits ) = 0;
43 
44  //! Performs exact sub graph matching to find maxHits occurrences of
45  //! the pattern graphs within the target graph. Each hit is reported
46  //! to the Match_Reporter object.
47  //! NOTE, the first maxHits matches of the pattern graphs according
48  //! to their order in the patterns container are reported, i.e. first
49  //! all occurrences of the first pattern are identified. If this does
50  //! not exceed the maxHits limit, the next pattern is matched and so
51  //! on until either no pattern is left or the maxHits limit is
52  //! exceeded.
53  //! @param patterns the container of the pattern graphs to search for
54  //! @param target the graph to search the pattern within
55  //! @param reporter all hits are reported to that object
56  //! @param maxHits the maximal number of hits to find
57  //! @return the number of exact matches found
58  virtual
59  size_t
60  findMatches ( const std::vector< const Pattern_Interface*> & patterns,
61  const Graph_Interface & target,
62  Match_Reporter & reporter,
63  const size_t maxHits ) = 0;
64 
65  //! Performs exact sub graph matching to find maxHits occurrences of
66  //! the pattern graphs within the target graph. Each hit is reported
67  //! to the Match_Reporter object.
68  //! NOTE, the first maxHits matches of the pattern graphs according
69  //! to their order in the patterns container are reported, i.e. first
70  //! all occurrences of the first pattern are identified. If this does
71  //! not exceed the maxHits limit, the next pattern is matched and so
72  //! on until either no pattern is left or the maxHits limit is
73  //! exceeded.
74  //! @param patterns the container of the pattern graphs to search for
75  //! @param target the graph to search the pattern within
76  //! @param reporters each hit is reported to the corresponding object,
77  //! the container has to have the same length as patterns
78  //! @param maxHits the maximal number of hits to find
79  //! @return the number of exact matches found
80  virtual
81  size_t
82  findMatches ( const std::vector< const Pattern_Interface*> & patterns,
83  const Graph_Interface & target,
84  std::vector<Match_Reporter*> & reporters,
85  const size_t maxHits ) = 0;
86 
87  };
88 
89 } // namespace sgm
90 
91 #endif /*SUBGRAPHMATCHING_HH_*/