Esempio n. 1
0
 def test_arf1_pile(self):
     arf1 = ARF(dim=2, domain=32, min_range_size=4)
     arf1.insert_one_point(Point([3, 5]))
     res = arf1.test_one_point(Point([3, 5]))
     self.assertEqual(res, True, "ARF test exact same value")
Esempio n. 2
0
 def test_arf_mrs_1(self):
     arf1 = ARF(dim=2, domain=32, min_range_size=1)
     arf1.insert_one_point(Point([3, 5]))
     res = arf1.test_one_point(Point([3, 5]))
     self.assertEqual(res, True, "Problem with ARF with min range size = 1")
Esempio n. 3
0
 def test_arf_collision(self):
     arf1 = ARF(dim=2, domain=32, min_range_size=4)
     arf1.insert_one_point(Point([3, 5]))
     arf1.insert_one_point(Point([3, 5]))
     res = arf1.test_one_point(Point([3, 5]))
     self.assertEqual(res, True, "Problem with ARF with collision inside inputs")
Esempio n. 4
0
 def test_arf1_almost(self):
     arf1 = ARF(dim=2, domain=32, min_range_size=4)
     arf1.insert_one_point(Point([3, 5]))
     res = arf1.test_one_point(Point([2, 6]))
     self.assertEqual(res, True, "ARF don't match on almost sames values")