public class NacRule extends Rule
Constructor and Description |
---|
NacRule(Morphism corr)
Creates a new NacRule.
|
NacRule(Morphism corr,
TransformationParams params)
Creates a new NacRule with a reference to an existing parameter set.
|
Modifier and Type | Method and Description |
---|---|
void |
addNac(Morphism nac)
Adds a negative application condition to this rule.
|
protected boolean |
checkMatch(Morphism match)
Determines if a given match satisfies additional application conditions
for this rule.
|
NacRule |
clone() |
int |
countUniqueEdges()
Counts the number of unique edges in this rule.
|
int |
countUniqueNodes()
Counts the number of unique nodes in this rule.
|
java.util.List<Morphism> |
getNacs()
Returns the list of negative application conditions for this rule.
|
boolean |
isIsomorphic(Rule other)
Checks whether this NacRule is isomorphic to another Rule.
|
void |
removeNac(Morphism nac)
Removes a negative application condition from this rule.
|
java.lang.String |
toString(java.lang.String indent)
Returns a string representation of this Rule with a user-defined
indentation string.
|
applyToMatch, getCorrespondence, getLeft, getMatches, getRight, getRuleIsomorphism, getSignature, getTransformationParams, isConflictFree, satisfiesDanglingEdgeCondition, setTransformationParams, toString, toString
getName, hasName, setName
getAttribute, setAttribute
public NacRule(Morphism corr, TransformationParams params)
corr
- correspondence morphism of the new ruleparams
- parameter set of the new rulepublic NacRule(Morphism corr)
corr
- correspondence morphism of the new rulepublic void addNac(Morphism nac)
nac
- the negative application condition which is to be added to this
NacRulejava.lang.IllegalArgumentException
- if the domain of nac
is different than this rule's
left-hand sidepublic void removeNac(Morphism nac)
public java.util.List<Morphism> getNacs()
protected boolean checkMatch(Morphism match)
The default implementation always returns true
. Subclasses may
override this method if not every match from the left hand side into
the source graph should result in a rewriting step because additional
(negative) application conditions need to be satisfied.
checkMatch
in class Rule
match
- the match to checktrue
if m
satisfies all application conditions for
this rulepublic boolean isIsomorphic(Rule other)
isIsomorphic
in class Rule
other
- the rule to check isomorphism oftrue
if this NacRule is isomorphic to
other
, false
otherwiseBaseRule#getRuleIsomorphism(BaseRule)
public int countUniqueNodes()
countUniqueNodes
in class Rule
public int countUniqueEdges()
countUniqueEdges
in class Rule
public java.lang.String toString(java.lang.String indent)