Esempio n. 1
0
 def test_complete_linkage_individual(self):
     points = np.array([[1.0, 5.0], [3.0, 5.0], [5.0, 5.0], [7.0, 0.0], [9.0, 0.0]])
     result = complete_linkage(points, 0.2)
     desired = np.array([0,1,2,3,4])
     np.testing.assert_array_equal(result, desired)
Esempio n. 2
0
 def test_complete_linkage_three(self):
     points = np.array([[1.0, 5.0], [2.0, 5.0], [5.0, 5.0], [8.0, 0.0], [9.0, 0.0]])
     result = complete_linkage(points, 0.2)
     desired = np.array([0,0,1,2,2])
     np.testing.assert_array_equal(result, desired)