def checkit(self, p, q, rng): # noqa: F811 # p, q =4,0 N = p + q # eps(1e-4) layout, blades = Cl(p, q) # create frame A = layout.randomV(n=N, rng=rng) # create Rotor R = 5. * layout.randomRotor(rng=rng) # create rotated frame B = [R * a * ~R for a in A] # find versor from both frames R_found, rs = of2v(A, B) # Rotor is determiend correctly, within a sign self.assertTrue(R == R_found or R == -R_found) # Determined Versor implements desired transformation self.assertTrue([R_found * a * ~R_found for a in A] == B)
def checkit(self, p, q): # p, q =4,0 N = p + q # eps(1e-4) layout, blades = Cl(p, q) # create frame A = layout.randomV(n=N) # create Rotor R = 5.*layout.randomRotor() # create rotated frame B = [R*a*~R for a in A] # find verser from both frames R_found, rs = of2v(A, B) # Rotor is determiend correctly, within a sign self.assertTrue(R == R_found or R == -R_found) # Determined Verser implements desired transformation self.assertTrue([R_found*a*~R_found for a in A] == B)