Пример #1
0
 def test_sphere_iso_diff(self):
     self.G1.normalize()
     self.G2.normalize()
     self.assertTrue(isomorphic.check_sphere_isomorphism(self.G2, self.G1))
Пример #2
0
 def test_sphere_iso_false(self):
     self.G1.normalize()
     self.G3.normalize()
     self.assertFalse(isomorphic.check_sphere_isomorphism(self.G3, 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
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
	def test_sphere_iso_diff(self):
		self.G1.normalize()
		self.G2.normalize()
		self.assertTrue(
			isomorphic.check_sphere_isomorphism(self.G2, self.G1))
Пример #6
0
	def test_sphere_iso_false(self):
		self.G1.normalize()
		self.G3.normalize()
		self.assertFalse(
			isomorphic.check_sphere_isomorphism(self.G3, self.G1))