UnCoVer (Using Coverability for Verification)
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | List of all members
IsomorphismChecker Class Reference

Checks whether two given Hypergraphs are isomorphic or not. More...

#include <IsomorphismChecker.h>

Public Member Functions

virtual ~IsomorphismChecker ()
 Destroys this IsomorphismChecker. More...
 

Static Public Member Functions

static bool areIsomorphic (Hypergraph const &hg1, Hypergraph const &hg2)
 Returns true if the two given graphs are isomorphic. More...
 

Private Member Functions

 IsomorphismChecker ()
 This constructor cannot/should not be called.
 

Static Private Member Functions

static bool insertIfValid (map< IDType, IDType > &forw, map< IDType, IDType > &backw, IDType id0, IDType id1)
 Inserts a pair of the given IDs to the given forward and backward maps if the resulting Mapping is still bijective. More...
 
static bool mapping (Hypergraph const &h0, HGSignature &sigs0, Hypergraph const &h1, HGSignature &sigs1, map< PartSig, std::list< IDType > > &sigs1rev, map< IDType, IDType > &mappingsFor, map< IDType, IDType > &mappingsBack, Hypergraph::EMap::const_iterator it, Hypergraph::EMap::const_iterator end)
 Checks all possible mappings for the given parameter and returns true, if one is an isomorphism. More...
 

Detailed Description

Checks whether two given Hypergraphs are isomorphic or not.

The check is performed by the algorithm described by Arend Rensink in "Isomorphism Checking in GROOVE" using signatures and certificates as heuristics.

Author
Jan Stückrath
Marvon Heumüller

Constructor & Destructor Documentation

~IsomorphismChecker ( )
virtual

Destroys this IsomorphismChecker.

Note that this class should not be instantiated.

Member Function Documentation

bool areIsomorphic ( Hypergraph const &  hg1,
Hypergraph const &  hg2 
)
static

Returns true if the two given graphs are isomorphic.

Parameters
hg1the first graph to check
hg2the second graph to check
Returns
true if the two given graphs are isomorphic
bool insertIfValid ( map< IDType, IDType > &  forw,
map< IDType, IDType > &  backw,
IDType  id0,
IDType  id1 
)
staticprivate

Inserts a pair of the given IDs to the given forward and backward maps if the resulting Mapping is still bijective.

Parameters
forwthe forward map to which (id0,id1) will be added
backwthe backward map to which (id1,id0) will be added
id0the first ID
id1the second ID
Returns
true if the pairs where successfully added to the given maps
bool mapping ( Hypergraph const &  h0,
HGSignature sigs0,
Hypergraph const &  h1,
HGSignature sigs1,
map< PartSig, std::list< IDType > > &  sigs1rev,
map< IDType, IDType > &  mappingsFor,
map< IDType, IDType > &  mappingsBack,
Hypergraph::EMap::const_iterator  it,
Hypergraph::EMap::const_iterator  end 
)
staticprivate

Checks all possible mappings for the given parameter and returns true, if one is an isomorphism.

Parameters
h0the first graph
sigs0the signature computed for the first graph
h1the second graph
sigs1the signature comupted for the second graph
sigs1revthe inverse of the second graphs signature
mappingForthe forward mapping; must be empty initially
mappingBakthe backward mapping; must be empty initially
itmust be an iterator to the first element of the edge map of the first graph
endmust be an iterator beyond the last element of the edge map of the first graph

The documentation for this class was generated from the following files: