pattern matching: convert tabs to spaces
This commit is contained in:
parent
88172d64c5
commit
3ae35a87d0
5 changed files with 929 additions and 915 deletions
|
|
@ -33,6 +33,13 @@ class PatternMatching(object):
|
||||||
"""
|
"""
|
||||||
Try to find an occurrence of the pattern in the Graph naively.
|
Try to find an occurrence of the pattern in the Graph naively.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
print('matchNaive...')
|
||||||
|
print('pattern:', pattern)
|
||||||
|
print('vertices:', vertices)
|
||||||
|
print('edges:', edges)
|
||||||
|
print('pattern_vertices:', pattern_vertices)
|
||||||
|
|
||||||
# allow call with specific arguments
|
# allow call with specific arguments
|
||||||
if pattern_vertices == None:
|
if pattern_vertices == None:
|
||||||
pattern_vertices = pattern.vertices
|
pattern_vertices = pattern.vertices
|
||||||
|
|
@ -194,6 +201,10 @@ class PatternMatching(object):
|
||||||
"""
|
"""
|
||||||
Return adjacency matrix and the order of the vertices.
|
Return adjacency matrix and the order of the vertices.
|
||||||
"""
|
"""
|
||||||
|
print('createAdjacencyMatrixMap...')
|
||||||
|
print('graph:', graph)
|
||||||
|
print('pattern:', pattern)
|
||||||
|
|
||||||
matrix = collections.OrderedDict() # { vertex, (index, [has edge from index to pos?]) }
|
matrix = collections.OrderedDict() # { vertex, (index, [has edge from index to pos?]) }
|
||||||
|
|
||||||
# contains all vertices we'll use for the AdjacencyMatrix
|
# contains all vertices we'll use for the AdjacencyMatrix
|
||||||
|
|
@ -242,6 +253,9 @@ class PatternMatching(object):
|
||||||
return AM, vertices_order
|
return AM, vertices_order
|
||||||
|
|
||||||
def matchVF2(self, pattern, graph):
|
def matchVF2(self, pattern, graph):
|
||||||
|
print('matchVF2...')
|
||||||
|
print('pattern:', pattern)
|
||||||
|
print('graph:', graph)
|
||||||
|
|
||||||
class VF2_Obj(object):
|
class VF2_Obj(object):
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue