20 #ifndef PARTIALPOCENUMERATOR_H_
21 #define PARTIALPOCENUMERATOR_H_
23 #include "../graphs/AnonRule.h"
24 #include "TotalPOCEnumerator.h"
27 namespace rule_engine {
59 shared_ptr<vector<graphs::AnonRule_csp>> orRules);
95 shared_ptr<vector<graphs::AnonRule_csp>> orRules);
bool getNext()
Implements the core functionality of the increment operator in the following way: ...
Definition: PartialPOCEnumerator.cpp:415
graphs::Hypergraph_sp getGraph() const
Returns the last computed pushout complement.
Definition: PartialPOCEnumerator.cpp:470
graphs::Mapping_sp templateMapp
Will contain the mapping from the left side to the template graph.
Definition: PartialPOCEnumerator.h:229
basic_types::IDPartitionEnumerator * vertexMergings
Stores an IDPartitionEnumerator to enumerate all possible node mergings.
Definition: PartialPOCEnumerator.h:234
TotalPOCEnumerator * totalPOCs
Stores a TotalPOCEnumerator for computing pushout complement for the total part of the rule...
Definition: PartialPOCEnumerator.h:204
void computeCurrent()
Generates the current graph and mapping from the template graph and mapping.
Definition: PartialPOCEnumerator.cpp:205
vector< basic_types::IDPartitionEnumerator > * edgeMergings
Stores a sequence of IDPartitionEnumerators for enumerating all possible mergings of parallel edges...
Definition: PartialPOCEnumerator.h:245
This enumerator computes all pushout complements for all co-matches from a total (given) rule to a gi...
Definition: TotalPOCEnumerator.h:38
graphs::Hypergraph_sp templateGraph
Will contain the total poc with added nodes and edges.
Definition: PartialPOCEnumerator.h:224
This is the data structure representing a morphism mapping from a graph to another graph...
Definition: Mapping.h:36
bool ended() const
Returns true, if the enumerator has ended.
Definition: PartialPOCEnumerator.cpp:146
bool cfWrtOriginalRule() const
Checks whether there exists an original rule (from which the current rule was generated) such that th...
Definition: PartialPOCEnumerator.cpp:483
PartialPOCEnumerator & operator++()
Computes the next element in the enumeration.
Definition: PartialPOCEnumerator.cpp:397
void mergeNodes()
Sets the current graph and mapping to a copy of the template graph and mapping.
Definition: PartialPOCEnumerator.cpp:223
The PartialPOCEnumerator computes a subset of all pushout complement of a partial rule and a total ma...
Definition: PartialPOCEnumerator.h:40
Provides a possibility to enumerate all partitions on a given set of IDs.
Definition: IDPartitionEnumerator.h:66
graphs::Mapping_sp getMapping() const
Returns the last computed match from the left hand-side to the (last computed) pushout complement...
Definition: PartialPOCEnumerator.cpp:466
bool incEdgeMergings()
Increments the edgeMergings vector to return the next merging on parallel edges.
Definition: PartialPOCEnumerator.cpp:374
shared_ptr< const Hypergraph > Hypergraph_csp
Alias for a shared pointer to a constant Hypergraph.
Definition: Hypergraph.h:90
shared_ptr< Mapping > Mapping_sp
Alias for a shared pointer to a Mapping object.
Definition: Mapping.h:238
virtual ~PartialPOCEnumerator()
Destroys this PartialPOCEnumerator.
Definition: PartialPOCEnumerator.cpp:139
void mergeEdges()
Merges the edges of the current graph (adjusting also the mapping) according to the content of edgeMe...
Definition: PartialPOCEnumerator.cpp:297
void prepEdgeMergings()
Calls mergeNodes() to merge vertices and then initializes edgeMergings to enumerate all possible merg...
Definition: PartialPOCEnumerator.cpp:253
bool nodesAlreadyMerged
Stores whether the nodes need to be merged or not when computing the current graph.
Definition: PartialPOCEnumerator.h:250
shared_ptr< const AnonRule > AnonRule_csp
Alias for a shared pointer to a constant AnonRule.
Definition: AnonRule.h:229
graphs::Mapping const & getCurrentCoMatch() const
Returns the co-match currently used for the backwards application of the rule.
Definition: PartialPOCEnumerator.cpp:474
void reset(graphs::AnonRule_csp rule, graphs::Hypergraph_csp graph, bool inj, shared_ptr< vector< graphs::AnonRule_csp >> orRules)
Reinitializes the enumerator with the given rule and graph.
Definition: PartialPOCEnumerator.cpp:330
PartialPOCEnumerator(graphs::AnonRule_csp rule, graphs::Hypergraph_csp graph, bool inj, shared_ptr< vector< graphs::AnonRule_csp >> orRules)
Generates a new PartialPOCEnumerator with the given rule and graph.
Definition: PartialPOCEnumerator.cpp:92
graphs::Mapping_sp currentMapp
Stores the last computed mapping from the left hand-side to the (partial) pushout complement...
Definition: PartialPOCEnumerator.h:215
graphs::Hypergraph_sp currentGraph
Stores the last computed (partial) pushout complement.
Definition: PartialPOCEnumerator.h:209
shared_ptr< vector< graphs::AnonRule_csp > > originalRules
Stores the collection of original rules.
Definition: PartialPOCEnumerator.h:193
vector< IDType > * mergableEdges
Stores the subset of edges which can (potentially) be merged.
Definition: PartialPOCEnumerator.h:239
void genTemplates()
Uses the current graph and mapping returned by the TotalPOCEnumerator and initializes the template fi...
Definition: PartialPOCEnumerator.cpp:150
graphs::AnonRule_csp partialRule
Stores the partial part of the rule.
Definition: PartialPOCEnumerator.h:188
bool injective
Stores whether injective or conflict-free matches should be used.
Definition: PartialPOCEnumerator.h:198
shared_ptr< Hypergraph > Hypergraph_sp
Alias for a shared pointer to a Hypergraph.
Definition: Hypergraph.h:85