Skip to content

Commit

Permalink
increase accuracy, remove unnecessary checks
Browse files Browse the repository at this point in the history
  • Loading branch information
mateuszbaran committed Apr 28, 2023
1 parent 4144489 commit d6ebea0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 1 addition & 4 deletions src/groups/rotation_action.jl
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,7 @@ function inverse_apply_diff(A::RotationActionOnVector{N,F,LeftAction}, a, p, X)
end
inverse_apply_diff(A::RotationActionOnVector{N,F,RightAction}, a, p, X) where {N,F} = a * X

function optimal_alignment(A::RotationActionOnVector{N,T,LeftAction}, p, q) where {N,T}
is_point(A.manifold, p, true)
is_point(A.manifold, q, true)

function optimal_alignment(::RotationActionOnVector{N,T,LeftAction}, p, q) where {N,T}
Xmul = p * transpose(q)
F = svd(Xmul)
L = size(Xmul)[2]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ function exp!(
m = M.metric.M
Y = lyapc(p, m, -X) #lyap solves qpM + Mpq - X =0
q .= p .+ X .+ m * Y * p * Y * m
# symmetrizing for better accuracy
copyto!(q, (q .+ q') ./ 2)
return q
end

Expand Down

0 comments on commit d6ebea0

Please sign in to comment.