23 #include "UQRuleInstance.h"
150 vector<unsigned int>
const& quantities,
151 vector<unordered_set<IDType>>* genLeft =
nullptr,
152 vector<unordered_set<IDType>>* genRight =
nullptr)
const;
173 vector<unordered_set<IDType>>* genLeft =
nullptr,
174 vector<unordered_set<IDType>>* genRight =
nullptr)
const;
192 vector<unordered_set<IDType>>* genLeft =
nullptr,
193 vector<unordered_set<IDType>>* genRight =
nullptr)
const;
195 virtual void streamTo(std::ostream& ost)
const override;
213 vector<unordered_set<IDType>>* genLeft,
214 vector<unordered_set<IDType>>* genRight)
const;
230 vector<IDType>& vertices)
const;
Rule mainRule
Stores the main rule of this UQRule.
Definition: UQRule.h:235
shared_ptr< AnonHypergraph > AnonHypergraph_sp
Alias of a shared pointer to an AnonHypergraph.
Definition: AnonHypergraph.h:415
Streamable provides a streaming function which must be implemented by any deriving class...
Definition: Streamable.h:31
UQRuleInstance_sp extendInstance(UQRuleInstance_csp rule, size_t quantID, vector< unordered_set< IDType >> *genLeft=nullptr, vector< unordered_set< IDType >> *genRight=nullptr) const
Generates and returns a new instantiation of this UQRule by copying the given instance and adding the...
Definition: UQRule.cpp:154
UQRule(Rule const &mainRule)
Generates a UQRule without any Quantifications using the given rule as the main rule.
Definition: UQRule.cpp:31
unordered_set< IDType > leftUQVertices
Every universally quantified vertex in the main rules left-hand side is stored in this set...
Definition: UQRule.h:248
UQRuleInstance_sp createZeroInstance() const
Generates and returns the instantiation of this UQRule where no Quantification is added...
Definition: UQRule.cpp:137
shared_ptr< const AnonHypergraph > AnonHypergraph_csp
Alias of a shared pointer to a constant AnonHypergraph.
Definition: AnonHypergraph.h:420
shared_ptr< UQRule const > UQRule_csp
Alias for a shared pointer to a constant UQRule.
Definition: UQRule.h:266
UQRuleInstance_sp createInstance(vector< unsigned int > const &quantities, vector< unordered_set< IDType >> *genLeft=nullptr, vector< unordered_set< IDType >> *genRight=nullptr) const
Generates and returns the instantiation of this UQRule where each Quantification is added as often sp...
Definition: UQRule.cpp:100
bool checkVertices(AnonHypergraph_csp graph, IDType const &edgeID, Mapping const &vmap, vector< IDType > &vertices) const
Checks if all vertices incident to the given edge (given as edge ID) of the given graph have an image...
Definition: UQRule.cpp:287
Represents the data structure for a rule including a unique identifier.
Definition: Rule.h:38
This is the data structure representing a morphism mapping from a graph to another graph...
Definition: Mapping.h:36
vector< Quantification > quantifications
Stores the Quantifications of this UQRule, which will later be indexed by their position in this vect...
Definition: UQRule.h:241
shared_ptr< UQRuleInstance > UQRuleInstance_sp
Alias of a shared pointer to a UQRuleIstance.
Definition: UQRuleInstance.h:139
size_t getQuantCount() const
Returns the number of Quantifications of this UQRule.
Definition: UQRule.cpp:88
AnonRule serves as a data structure of a rule object.
Definition: AnonRule.h:39
pair< AnonRule, Mapping > Quantification
A Quantification consists of a rule and a Mapping from the main rules left-hand side to the Quantific...
Definition: UQRule.h:46
UQRuleInstance_sp createOneInstance(vector< unordered_set< IDType >> *genLeft=nullptr, vector< unordered_set< IDType >> *genRight=nullptr) const
Generates and returns the instantiation of this UQRule where each Quantification is added exactly onc...
Definition: UQRule.cpp:141
string getName() const
Returns the name of this UQRule.
Definition: UQRule.cpp:52
virtual void streamTo(std::ostream &ost) const override
Streams as string representation of this Streamable object to the given ostream.
Definition: UQRule.cpp:305
IDType getID() const
Returns the ID of this UQRule.
Definition: UQRule.cpp:48
shared_ptr< UQRule > UQRule_sp
Alias for a shared pointer to a UQRule.
Definition: UQRule.h:261
vector< Quantification > & getQuantifications()
Returns a reference to the vector storing the Quantifications of this UQRule.
Definition: UQRule.cpp:92
void extendRuleByUQ(UQRuleInstance &rule, size_t quantID, vector< unordered_set< IDType >> *genLeft, vector< unordered_set< IDType >> *genRight) const
Generates a new instantiation of this UQRule by adding the Quantification with the given index to the...
Definition: UQRule.cpp:186
Rule & getMainRule()
Returns a reference to the main rule encapsulated by this UQRule.
Definition: UQRule.cpp:56
unordered_set< IDType > rightUQVertices
For all universally quantified vertices this set stores their image in the main rules right-hand side...
Definition: UQRule.h:254
virtual ~UQRule()
Destroys this UQRule.
Definition: UQRule.cpp:46
void addQuantification(AnonRule const &rule, Mapping const &match)
Adds a Quantification to this UQRule consisting of the given AnonRule and Mapping.
Definition: UQRule.cpp:64
This class serves as data structure of a universally quantified rule.
Definition: UQRule.h:38
The UQRuleInstance is a rule which is generated when UQRules are instantiated.
Definition: UQRuleInstance.h:35
unsigned int IDType
IDType is an (unsigned) integer specifically used as an Identifier of graphs, elements of graphs or a...
Definition: globals.h:53
shared_ptr< UQRuleInstance const > UQRuleInstance_csp
Alias of a shared pointer to a constant UQRuleInstance.
Definition: UQRuleInstance.h:144