23 #include "../graphs/Hypergraph.h"
24 #include "../graphs/Mapping.h"
25 #include "../basic_types/Order.h"
26 #include "../basic_types/IDPartitionEnumerator.h"
75 unordered_set<IDType>
const& preservedEdges,
100 map<
string, vector<IDType>>
const& edgeMapS,
101 map<
string, vector<IDType>>
const& edgeMapB,
102 vector<pair<
string,vector<size_t>>>
const& edgesToEdges,
104 unordered_set<IDType>& preservedEdges)
const;
111 void reset(vector<size_t>& vec,
size_t numCount)
const;
121 bool inc(vector<pair<
string,vector<size_t>>>& vec, map<
string, vector<IDType>>& posTargets)
const;
131 bool inc(vector<size_t>& vec,
size_t tarCount)
const;
142 bool inc(vector<basic_types::IDPartitionEnumerator>& enums,
size_t pos)
const;
151 size_t findFirst(vector<size_t>
const& vec,
size_t tofind)
const;
size_t findFirst(vector< size_t > const &vec, size_t tofind) const
Finds the occurrence of toFinde with the least index in the vector.
Definition: MinorOrder.cpp:357
bool enoughIsolated(basic_types::IDPartition const &part, graphs::Mapping const &mapp, int num) const
Checks if the given partition has enough subpartitions to be mapped to isolated nodes.
Definition: MinorOrder.cpp:161
This is the data structure representing a morphism mapping from a graph to another graph...
Definition: Mapping.h:36
bool isIncludedIn(basic_types::IDPartition const &part, graphs::Mapping::Inversion const &mapp) const
Checks if the given partition is included in the inverse Mapping.
Definition: MinorOrder.cpp:193
bool isFiner(basic_types::IDPartition const &part, graphs::Mapping const &mapp) const
Checks if the given partition is finer that the partition induced by the Mapping. ...
Definition: MinorOrder.cpp:366
This class implements the Hypergraph Minor Ordering, as described in "Applying the Graph Minor Theore...
Definition: MinorOrder.h:36
bool generateMapp(graphs::Hypergraph const &graphS, graphs::Hypergraph const &graphB, map< string, vector< IDType >> const &edgeMapS, map< string, vector< IDType >> const &edgeMapB, vector< pair< string, vector< size_t >>> const &edgesToEdges, graphs::Mapping &nodeMap, unordered_set< IDType > &preservedEdges) const
Given a mapping of edges of graphS to edges of graphB, this method generates a Mapping of node IDs of...
Definition: MinorOrder.cpp:226
A Hypergraph represents a graph with a unique identifier.
Definition: Hypergraph.h:35
unordered_map< IDType, unordered_set< IDType > > Inversion
Alias for an inverse Mapping, mapping IDs to collections of IDs.
Definition: Mapping.h:55
virtual bool isLessOrEq(graphs::Hypergraph const &smaller, graphs::Hypergraph const &bigger) const override
Checks whether the first given graph is a minor of the second.
Definition: MinorOrder.cpp:33
MinorOrder()
Creates a new MinorOrder object.
Definition: MinorOrder.cpp:29
void reset(vector< size_t > &vec, size_t numCount) const
Clears the given vector and fills it with the numbers from 0 to numCount-1.
Definition: MinorOrder.cpp:266
This class presents a generic ordering relation on Hypergraphs.
Definition: Order.h:32
unordered_set< SubIDPartition > IDPartition
An IDPartition is a set of sets of IDs (which is effectively a set of equivalence classes)...
Definition: IDPartition.h:37
virtual ~MinorOrder()
Destroys the current MinorOrder object.
Definition: MinorOrder.cpp:31
bool inc(vector< pair< string, vector< size_t >>> &vec, map< string, vector< IDType >> &posTargets) const
Increments the given vector such that it represents the next possible mapping of edges of the smaller...
Definition: MinorOrder.cpp:292
bool checkContractions(graphs::Hypergraph const &graphB, graphs::Mapping const &nodeMap, graphs::Mapping::Inversion const &invNodeMap, unordered_set< IDType > const &preservedEdges, int isoNodes) const
Checks if edges of the given graph can be contracted to obtain a smaller graph.
Definition: MinorOrder.cpp:107