JuliaGeometry / Rotations.jl

Julia implementations for different rotation parameterizations
https://juliageometry.github.io/Rotations.jl
MIT License
180 stars 44 forks source link

Add support for higher dimensional rotation #219

Closed hyrodium closed 2 years ago

hyrodium commented 2 years ago

This PR fixes #215.

hyrodium commented 2 years ago

The CI log says:

Testing isrotation: Error During Test at /home/runner/work/Rotations.jl/Rotations.jl/test/rotation_tests.jl:439
  Test threw exception
  Expression: isrotation(I(1))
  MethodError: objects of type UniformScaling{Bool} are not callable
  Stacktrace:
   [1] macro expansion at /home/runner/work/Rotations.jl/Rotations.jl/test/rotation_tests.jl:439 [inlined]
   [2] macro expansion at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Test/src/Test.jl:1083 [inlined]
   [3] macro expansion at /home/runner/work/Rotations.jl/Rotations.jl/test/rotation_tests.jl:407 [inlined]
   [4] macro expansion at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Test/src/Test.jl:1083 [inlined]
   [5] top-level scope at /home/runner/work/Rotations.jl/Rotations.jl/test/rotation_tests.jl:89

Like https://github.com/JuliaArrays/StaticArrays.jl/pull/985, we can drop support under Julia v1.6.

codecov[bot] commented 2 years ago

Codecov Report

Merging #219 (9294916) into master (4f76c5a) will increase coverage by 0.41%. The diff coverage is 98.82%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #219      +/-   ##
==========================================
+ Coverage   88.14%   88.56%   +0.41%     
==========================================
  Files          15       16       +1     
  Lines        1603     1626      +23     
==========================================
+ Hits         1413     1440      +27     
+ Misses        190      186       -4     
Impacted Files Coverage Δ
src/euler_types.jl 92.25% <ø> (-0.18%) :arrow_down:
src/mrps.jl 34.93% <ø> (-0.88%) :arrow_down:
src/rodrigues_params.jl 98.64% <ø> (-0.04%) :arrow_down:
src/unitquaternion.jl 96.36% <ø> (-0.04%) :arrow_down:
src/logexp.jl 93.33% <93.33%> (+11.51%) :arrow_up:
src/core_types.jl 94.81% <100.00%> (+0.65%) :arrow_up:
src/rand.jl 100.00% <100.00%> (ø)
src/rotation_generator.jl 96.35% <100.00%> (+0.44%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 4f76c5a...9294916. Read the comment docs.

hyrodium commented 2 years ago

Thanks for the review! I have added a TODO list in the description.

hyrodium commented 2 years ago

I was misunderstanding the rotation angle of highter dimensional rotation, and I have reverted the rotation_angle for highter dimensional rotation. I thought a rotation have one rotation angle, but that was incorrect; in general, a n-dimensional rotation has n÷2 rotation angles. See https://cs.brynmawr.edu/~dxu/206-2550-2.pdf for more information.

hyrodium commented 2 years ago

I have added documentation, and I think this is ready to merge.