예제 #1
0
 def test_mapoverlay5(self):
     M1 = PlanarMap(Triangle(0, 0, 3, 1, 0, 2))
     M2 = PlanarMap(Rectangle(1, 0, 2, 2))
     M3 = M1.map_overlay(M2)
     self.assertEqual(M3.v(), 11)
     self.assertEqual(M3.e(), 15)
     self.assertEqual(M3.f(), 6)
예제 #2
0
 def test_mapoverlay2(self):
     M1 = PlanarMap(Rectangle(0, 0, 2, 2))
     M2 = PlanarMap(Rectangle(1, 1, 2, 3))
     M3 = M1.map_overlay(M2)
     self.assertEqual(M3.v(), 9)
     self.assertEqual(M3.e(), 11)
     self.assertEqual(M3.f(), 4)
예제 #3
0
 def test_mapoverlay3(self):
     M1 = PlanarMap(Rectangle(0, 1, 3, 2))
     M2 = PlanarMap(Rectangle(1, 0, 2, 3))
     M3 = M1.map_overlay(M2)
     self.assertEqual(M3.v(), 12)
     self.assertEqual(M3.e(), 16)
     self.assertEqual(M3.f(), 6)
예제 #4
0
 def test_mapoverlay1(self):
     M1 = PlanarMap(Segment(0, 1, 2, 1))
     M2 = PlanarMap(Segment(1, 0, 1, 2))
     M3 = M1.map_overlay(M2)
     self.assertEqual(M3.v(), 5)
     self.assertEqual(M3.e(), 4)
     self.assertEqual(M3.f(), 1)
예제 #5
0
 def test_mapoverlay4(self):
     M1 = PlanarMap(Triangle(3, 0, 6, 6, 0, 6))
     #M1 = PlanarMap(Triangle(3., 0., 6., 6., 0., 6.))
     M2 = PlanarMap(Triangle(3, 8, 0, 2, 6, 2))
     M3 = M1.map_overlay(M2)
     self.assertEqual(M3.v(), 12)
     self.assertEqual(M3.e(), 18)
     self.assertEqual(M3.f(), 8)