Constrains edge labels within a match. More...
#include <MC_Edge.hh>
Public Types | |
enum | CompareType { ALLOWED, FORBIDDEN } |
typedef std::set< std::string > | LabelSet |
the type that defines a set of labels More... | |
Public Member Functions | |
virtual MC_EdgeLabel * | clone (void) const |
virtual bool | isConstrainedLabel (const std::string &label) const |
virtual bool | isConstraining (const size_t nodeID) const |
virtual bool | isValidMatch (const Pattern_Interface &pattern, const Graph_Interface &target, const Match &match) const |
MC_EdgeLabel () | |
MC_EdgeLabel (const size_t constrainedFromID, const size_t constrainedToID) | |
MC_EdgeLabel (const size_t constrainedFromID, const size_t constrainedToID, const LabelSet &edgeLabels) | |
MC_EdgeLabel (const size_t constrainedFromID, const size_t constrainedToID, const LabelSet &edgeLabels, const CompareType &compareType) | |
MC_EdgeLabel (const MC_EdgeLabel &toCopy) | |
virtual bool | operator== (const Match_Constraint &toCompare) const =0 |
virtual bool | operator== (const Match_Constraint &toCompare) const |
virtual MC_EdgeLabel * | remap (const Match &old2newIndexMapping, const size_t unmatchedIndex=UINT_MAX) |
virtual | ~MC_EdgeLabel () |
destruction More... | |
Data Fields | |
CompareType | compareType |
size_t | constrainedFromID |
the source ID of the edge to be constrained More... | |
size_t | constrainedToID |
the target ID of the edge to be constrained More... | |
LabelSet | edgeLabels |
A match constraint that restricts the allowed matched labels for a given matched edge to a set of maintained labels. Via the operator it is defined whether the given set of edge labels is the allowed (op =) or forbidden (op !) set of labels for the edge. It defaults to allowed (op =). NOTE: This constraint is only useful if the according pattern edge shows a wildcard label such that it can be matched on any target edge. NOTE: if there is NO EDGE between the nodes, the constraint fails! Current idea of GML encoding:
***************************************************** constrainEdge [ source ::= INTEGER target ::= INTEGER op ::= OPERATOR { = | ! } edgeLabels [ label ::= STRING ] ] *****************************************************
Definition at line 330 of file MC_Edge.hh.
typedef std::set< std::string > sgm::MC_EdgeLabel::LabelSet |
Definition at line 335 of file MC_Edge.hh.
Enumerator | |
---|---|
ALLOWED | |
FORBIDDEN |
Definition at line 337 of file MC_Edge.hh.
|
inline |
Default construction of the match constraint : undefined values are initialized with INT_MAX or empty sets
Definition at line 361 of file MC_Edge.hh.
|
inline |
construction where the allowed node labels are empty
constrainedFromID | the source node ID to be constrained |
constrainedToID | the target node ID to be constrained |
Definition at line 370 of file MC_Edge.hh.
|
inline |
construction where the allowed node labels are empty
constrainedFromID | the source node ID to be constrained |
constrainedToID | the target node ID to be constrained |
edgeLabels | the allowed node labels to be matched on |
Definition at line 381 of file MC_Edge.hh.
|
inline |
construction where the allowed node labels are empty
constrainedFromID | the source node ID to be constrained |
constrainedToID | the target node ID to be constrained |
edgeLabels | the allowed node labels to be matched on |
compareType | the type of comparison to be applied |
Definition at line 394 of file MC_Edge.hh.
|
inline |
copy construction
toCopy | the MC_EdgeLabel object to copy |
Definition at line 405 of file MC_Edge.hh.
|
inlinevirtual |
Definition at line 413 of file MC_Edge.hh.
|
inlinevirtual |
Creates a new MC_EdgeLabel heap object that equals the current object. NOTE: YOU have to delete it later on! There is no garbage collection!
Implements sgm::MC_Edge.
Definition at line 520 of file MC_Edge.hh.
|
inlinevirtual |
Checks whether or not a given label is part of the constraint information. This check is needed by some parsers to verify the wildcard definition.
label | the label of interest |
Implements sgm::Pattern_Interface::Match_Constraint.
Definition at line 501 of file MC_Edge.hh.
|
inlinevirtualinherited |
Checks whether or not this constraint covers the node with the given ID.
nodeID | the ID of the node of interest |
Implements sgm::Pattern_Interface::Match_Constraint.
Definition at line 69 of file MC_Edge.hh.
|
inlinevirtual |
Checks whether or not the matched edges between two nodes show one of the allowed labels or are not showing any of the forbidden labels.
NOTE: if there is NO EDGE between the node, the constraint fails!
pattern | the pattern graph that was matched |
target | the target graph the pattern was matched on |
match | the match information for the left side pattern of the pattern on the target graph |
Implements sgm::Pattern_Interface::Match_Constraint.
Definition at line 432 of file MC_Edge.hh.
|
pure virtualinherited |
Equality comparison to another match constraint.
toCompare | the constraint to compare to |
Implemented in sgm::MC_Node.
|
inlinevirtual |
Equality comparison to another match constraint.
toCompare | the constraint to compare to |
Reimplemented from sgm::MC_Edge.
Definition at line 570 of file MC_Edge.hh.
|
inlinevirtual |
Creates a new MC_EdgeLabel heap object that equals the current object but uses the new indices given by old2newIndexMapping. NOTE: YOU have to delete it later on! There is no garbage collection!
old2newIndexMapping | the index mapping to be used for the remapping |
unmatchedIndex | an optional specific index that marks unmatched nodes within old2newIndexMapping. if this constrains one of these nodes, no remapping is done and NULL is returned |
Implements sgm::MC_Edge.
Definition at line 541 of file MC_Edge.hh.
CompareType sgm::MC_EdgeLabel::compareType |
the type of comparison to be applied, i.e. if to ensure that the edge label is among the edgeLabels (ALLOWED) or that it is not present (FORBIDDEN)
Definition at line 355 of file MC_Edge.hh.
|
inherited |
Definition at line 33 of file MC_Edge.hh.
|
inherited |
Definition at line 36 of file MC_Edge.hh.
LabelSet sgm::MC_EdgeLabel::edgeLabels |
the set of labels this node can be mapped on NOTE: if empty, no matching will be allowed !!!
Definition at line 350 of file MC_Edge.hh.