コード例 #1
0
 def test_check_pattern_diff(self):
     self.G4.normalize()
     self.assertTrue(isomorphic.check_pattern(self.G4, self.G1))
コード例 #2
0
 def test_check_pattern_same(self):
     self.G1.normalize()
     self.assertTrue(isomorphic.check_pattern(self.G1, self.G1))
コード例 #3
0
G1.print_info(verbose=True)
G2.print_info(verbose=True)
G3.print_info(verbose=True)

print('---------- Normalizing -------------')
G1.normalize()
G1.print_info(verbose=True)

G2.normalize()
G2.print_info(verbose=True)

G3.normalize()
G3.print_info(verbose=True)

print('------ Checking isomorphism  -----')
print('For self:')
print('- Plane Isomorphic: ', isomorphic.check_plane_isomorphism(G1, G1))
print('- Sphere Isomoprhic:', isomorphic.check_sphere_isomorphism(G2, G2))
print('For others:')
print('- Plane Isomorphic: ', isomorphic.check_plane_isomorphism(G1, G2))
print('- Sphere Isomorphic:', isomorphic.check_sphere_isomorphism(G2, G1))

print('------ Checking for pattern matching -----')
print('For self:')
print('- pattern: ', isomorphic.check_pattern(G1, G1))
print('For others')
G4 = examples.example_graph4()
G4.normalize()
print('- pattern: ', isomorphic.check_pattern(G4, G1))
コード例 #4
0
ファイル: example.py プロジェクト: clemej/libopenpg
G1.print_info(verbose=True)
G2.print_info(verbose=True)
G3.print_info(verbose=True)

print('---------- Normalizing -------------')
G1.normalize()
G1.print_info(verbose=True)

G2.normalize()
G2.print_info(verbose=True)

G3.normalize()
G3.print_info(verbose=True)

print('------ Checking isomorphism  -----')
print('For self:')
print('- Plane Isomorphic: ', isomorphic.check_plane_isomorphism(G1, G1))
print('- Sphere Isomoprhic:', isomorphic.check_sphere_isomorphism(G2, G2))
print('For others:')
print('- Plane Isomorphic: ', isomorphic.check_plane_isomorphism(G1, G2))
print('- Sphere Isomorphic:', isomorphic.check_sphere_isomorphism(G2, G1))

print('------ Checking for pattern matching -----')
print('For self:')
print('- pattern: ', isomorphic.check_pattern(G1, G1))
print('For others')
G4 = examples.example_graph4()
G4.normalize()
print('- pattern: ', isomorphic.check_pattern(G4,G1))
コード例 #5
0
ファイル: test_openpg.py プロジェクト: clemej/libopenpg
	def test_check_pattern_diff(self):
		self.G4.normalize()
		self.assertTrue(isomorphic.check_pattern(self.G4, self.G1))
コード例 #6
0
ファイル: test_openpg.py プロジェクト: clemej/libopenpg
	def test_check_pattern_same(self):
		self.G1.normalize()
		self.assertTrue(isomorphic.check_pattern(self.G1,self.G1))