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