24 #include "AnonHypergraph.h"
166 virtual void fillSplitRule(pair<shared_ptr<AnonRule>, shared_ptr<AnonRule>>& rulePair)
const;
186 virtual void streamTo(std::ostream& ost)
const override;
shared_ptr< AnonHypergraph > AnonHypergraph_sp
Alias of a shared pointer to an AnonHypergraph.
Definition: AnonHypergraph.h:415
void adjustSplitRule(AnonRule &partial, AnonRule &total) const
Takes two rules and changes them to be the two split rules of this rule.
Definition: AnonRule.cpp:173
Streamable provides a streaming function which must be implemented by any deriving class...
Definition: Streamable.h:31
shared_ptr< AnonRule > AnonRule_sp
Alias for a shared pointer to an AnonRule.
Definition: AnonRule.h:224
shared_ptr< const AnonHypergraph > AnonHypergraph_csp
Alias of a shared pointer to a constant AnonHypergraph.
Definition: AnonHypergraph.h:420
bool isConflictFree(Mapping const &match) const
Check whether the given match is conflict-free wrt.
Definition: AnonRule.cpp:207
void setRight(AnonHypergraph_sp graph)
Sets the right graph of this rule to be the given graph.
Definition: AnonRule.cpp:90
virtual bool isBackApplicable(AnonHypergraph const &graph, Mapping const &match) const
Returns true, if this rule is backward applicable to the given graph, i.e.
Definition: AnonRule.cpp:103
This is the data structure representing a morphism mapping from a graph to another graph...
Definition: Mapping.h:36
AnonHypergraph_sp right
Stores a pointer to the right graph of this rule.
Definition: AnonRule.h:212
AnonRule serves as a data structure of a rule object.
Definition: AnonRule.h:39
AnonHypergraph_sp getLeft()
Returns a pointer to the left graph of this rule.
Definition: AnonRule.cpp:67
void setLeft(AnonHypergraph_sp graph)
Sets the left graph of this rule to be the given graph.
Definition: AnonRule.cpp:85
bool isInjective() const
Checks and returns true, iff the rule is injective.
Definition: AnonRule.cpp:203
AnonHypergraph_sp left
Stores a pointer to the left graph of this rule.
Definition: AnonRule.h:207
AnonRule(string name="", AnonHypergraph_sp left=make_shared< AnonHypergraph >(), AnonHypergraph_sp right=make_shared< AnonHypergraph >(), Mapping const &match=Mapping())
Generates a new rule with the given name, left graph, right graph and mapping.
Definition: AnonRule.cpp:30
Mapping interface
Stores the mapping from the left to the right graph of this rule.
Definition: AnonRule.h:217
virtual ~AnonRule()
Destroys this rule.
Definition: AnonRule.cpp:55
void setMapping(Mapping const &map)
Replaces the mapping of this rule by the given mapping.
Definition: AnonRule.cpp:162
string getName() const
Returns the name of this rule.
Definition: AnonRule.cpp:57
An AnonHypergraph is a data structure storing a hypergraph.
Definition: AnonHypergraph.h:43
string name
Stores the name of this rule.
Definition: AnonRule.h:202
shared_ptr< const AnonRule > AnonRule_csp
Alias for a shared pointer to a constant AnonRule.
Definition: AnonRule.h:229
virtual void fillSplitRule(pair< shared_ptr< AnonRule >, shared_ptr< AnonRule >> &rulePair) const
Splits this rule into a total and a partial part and stores both subrules in the given pair...
Definition: AnonRule.cpp:167
Mapping & getMapping()
Returns a reference to the mapping of this rule.
Definition: AnonRule.cpp:95
virtual void streamTo(std::ostream &ost) const override
Streams as string representation of this Streamable object to the given ostream.
Definition: AnonRule.cpp:229
AnonHypergraph_sp getRight()
Returns a pointer to the right graph of this rule.
Definition: AnonRule.cpp:72
void setName(string name)
Sets the name of this rule to the given string.
Definition: AnonRule.cpp:62