Exemplo n.º 1
0
    def test_right_jacobians_or_boxminusr(self):
        for i in range(100):
            R1 = SO2.random()
            R2 = SO2.random()

            theta, Jr1 = R1.boxminusr(R2, Jr1=1)
            _, Jr2 = R1.boxminusr(R2, Jr2=1)
            dR = R2.inv() * R1
            _, Jr1_true = SO2.Log(dR, Jr=1)
            _, Jr2_true = SO2.Log(dR, Jl=1)

            np.testing.assert_allclose(Jr1_true, Jr1)
            np.testing.assert_allclose(Jr2_true, Jr2)
Exemplo n.º 2
0
    def test_left_jacobian_of_logarithm(self):
        R = SO2.random()
        logR, Jl_inv = SO2.Log(R, Jl=True)
        _, Jl = SO2.Exp(logR, Jl=True)

        self.assertEqual(1/Jl, Jl_inv)
Exemplo n.º 3
0
    def test_right_jacobian_of_logarithm(self):
        R = SO2.random()
        logR, Jr_inv = SO2.Log(R, Jr=True)
        _, Jr = SO2.Exp(logR, Jr=True)

        self.assertEqual(1/Jr, Jr_inv)