-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inconsistency in invariant metrics #471
Labels
Comments
Related: bases for invariant metrics: for (invtrait, invdir) in
[(HasLeftInvariantMetric, LeftAction), (HasRightInvariantMetric, RightAction)],
basis_type in [DefaultOrthonormalBasis, DefaultOrthogonalBasis]
eval(
quote
function get_coordinates(
::TraitList{$invtrait},
M::AbstractDecoratorManifold,
p,
X,
B::$basis_type,
)
Xₑ = inverse_translate_diff(M, p, p, X, $invdir())
return get_coordinates(M.manifold, p, Xₑ, B)
end
function get_coordinates!(
::TraitList{$invtrait},
M::AbstractDecoratorManifold,
c,
p,
X,
B::$basis_type,
)
Xₑ = inverse_translate_diff(M, p, p, X, $invdir())
return get_coordinates!(M.manifold, c, p, Xₑ, B)
end
function get_vector(
::TraitList{$invtrait},
M::AbstractDecoratorManifold,
p,
c,
B::$basis_type,
)
Xₑ = get_vector(M.manifold, p, c, B)
return translate_diff(M, p, p, Xₑ, $invdir())
end
function get_vector!(
::TraitList{$invtrait},
M::AbstractDecoratorManifold,
X,
p,
c,
B::$basis_type,
)
Xₑ = get_vector(M.manifold, p, c, B)
return translate_diff!(M, X, p, p, Xₑ, $invdir())
end
end,
)
end |
4 tasks
I think in general we just shouldn't dispatch on specific traits, and just use them for forwarding of specific functions. This part works reasonably well. Dispatching on traits allows for some nice fallback definitions but it is just too convoluted. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently invariant metrics on groups are somewhat inconsistent:
inner
continues dispatch with traits without unwrapping the manifold whileexp
andlog
unwrap and run trait dispatch from scratch. This should be consistent.The text was updated successfully, but these errors were encountered: