|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface GraphMatchingProcess
An implementation of this interface abstracts the matching process between a graph and a pattern (or two graph).
The graph and the pattern remain the same for the entire process. They are not expected to change over time, and if
they change, the process may need to be reinitialized by using clearData()
.
The interface offers methods to enable incremental matching, moving between matches of a specified k (number
of edges in the pattern missing from the matched part of the pattern). The k is specified by a call to
resetIterator(int)
and is 0 by default.
The implementation should act as an iterator, using getNextMatch()
to advance to the next match of k
equal to the threshold or lower.
The two additional methods that retrieve all matches reset the iterator as well.
It is recommended that implementations keep any information related to the matching process (such as intermediate
matches) that could help improve performance of future queries. Memory occupied by this information should be clear
if clearData()
is invoked.
Method Summary | |
---|---|
GraphMatchingProcess |
clearData()
Clears all data related to the matching process. |
java.util.List<Match> |
getAllCompleteMatches()
The method returns all complete matches. |
java.util.List<Match> |
getAllMatches(int k)
The method returns all matches with a k lower than or equal to the argument. |
java.util.List<Match> |
getBestMatches()
The method creates all matches and returns the set of matches with the best (lowest) k. |
Match |
getNextMatch()
Searches for the next match with a k lower than or equal to the current threshold. |
GraphMatchingProcess |
resetIterator()
Resets the iterator. |
GraphMatchingProcess |
resetIterator(int k)
Resets the iterator (see resetIterator() ) and specifies a new k threshold. |
Method Detail |
---|
GraphMatchingProcess resetIterator()
getNextMatch()
will return the first match conforming to the
current k threshold.
GraphMatchingProcess resetIterator(int k)
resetIterator()
) and specifies a new k threshold.
k
- - the new threshold.
GraphMatchingProcess clearData()
The call to this method results in freeing all memory occupied by information related to the matching process that was retained.
Match getNextMatch()
resetIterator()
.
Depending on implementation, if no initialization has been done prior to this call (after constructing the
instance or after a call to clearData()
), the first call to this method should also make all
initializations in the matching process.
If intermediate matches are kept during the matching process, and clearData()
was not invoked, this
method may return faster, if the desired match has already been generated partially or entirely.
As the matching process is a complex one, a call to this method is expected to be time consuming, depending on implementation and existing matching information.
resetIterator()
.java.util.List<Match> getAllMatches(int k)
Performance of a call will be influenced by existing matching information.
k
- - the threshold.
List
of matches complying with the threshold.java.util.List<Match> getAllCompleteMatches()
Performance of a call will be influenced by existing matching information.
List
of complete matches of the pattern in the graph.java.util.List<Match> getBestMatches()
List
with the matches of lowest k.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |