Ejemplo n.º 1
0
    def test_discrete_Frechet_concentric_circles(self, path_1, path_2):
        # test for the simple case of the discrete Frechet distance
        # between concentric circular paths, which for a sufficiently
        # high random discrete point density around each circle
        # should be the absolute difference between their respective
        # radii

        expected = 4.5
        actual = PSA.discrete_frechet(path_1, path_2)
        assert_almost_equal(actual, expected)
Ejemplo n.º 2
0
    def test_discrete_Frechet_concentric_circles(self):
        # test for the simple case of the discrete Frechet distance
        # between concentric circular paths, which for a sufficiently
        # high random discrete point density around each circle
        # should be the absolute difference between their respective
        # radii

        expected = 4.5
        actual = PSA.discrete_frechet(self.path_1,
                                      self.path_2)
        assert_almost_equal(actual, expected)
Ejemplo n.º 3
0
 def time_discrete_frechet(self, time_steps, n_atoms):
     """Benchmark for discrete_frechet() in psa module.
     """
     psa.discrete_frechet(P=self.P,
                          Q=self.Q)