Exemple #1
0
 def test_plane_iso_false(self):
     self.G1.normalize()
     self.G3.normalize()
     self.assertFalse(isomorphic.check_plane_isomorphism(self.G3, self.G1))
Exemple #2
0
 def test_plane_iso_same(self):
     self.G1.normalize()
     self.assertTrue(isomorphic.check_plane_isomorphism(self.G1, self.G1))
Exemple #3
0
 def test_plane_iso_diff(self):
     self.G1.normalize()
     self.G2.normalize()
     self.assertTrue(isomorphic.check_plane_isomorphism(self.G2, self.G1))
Exemple #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))
Exemple #5
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))
Exemple #6
0
	def test_plane_iso_diff(self):
		self.G1.normalize()
		self.G2.normalize()
		self.assertTrue(
			isomorphic.check_plane_isomorphism(self.G2, self.G1))
Exemple #7
0
	def test_plane_iso_same(self):
		self.G1.normalize()
		self.assertTrue(
			isomorphic.check_plane_isomorphism(self.G1, self.G1))
Exemple #8
0
	def test_plane_iso_false(self):
		self.G1.normalize()
		self.G3.normalize()
		self.assertFalse(
			isomorphic.check_plane_isomorphism(self.G3, self.G1))