Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
5e2904d
lie_bracket and adjoint_action
mateuszbaran Jun 10, 2021
22d64b7
fixes
mateuszbaran Jun 11, 2021
7311871
more tests and some comments
mateuszbaran Jun 11, 2021
656cebe
test fixed
mateuszbaran Jun 11, 2021
4149cb3
Apply suggestions from code review
mateuszbaran Jun 11, 2021
d4b7c4a
Update src/groups/group.jl
mateuszbaran Jun 14, 2021
37d0553
modify the default adjoint_action definition, remove an untested meth…
mateuszbaran Jun 14, 2021
c959baf
Update src/groups/group.jl
mateuszbaran Jun 14, 2021
ab56bd9
[not tested] some work on SE(n)
mateuszbaran Jun 14, 2021
f5df573
some work on differential of right translation on semidirect product …
mateuszbaran Jun 18, 2021
ea87859
Apply suggestions from code review
mateuszbaran Jun 18, 2021
ec2f79e
introduction of connection manifolds
mateuszbaran Jun 21, 2021
a3686c9
move gaussian curvature to connection manifolds
mateuszbaran Jun 21, 2021
e610bac
right translate_diff on SE(n)
mateuszbaran Jun 21, 2021
82273a1
Update src/groups/special_euclidean.jl
mateuszbaran Jun 21, 2021
5338ecb
finally correct right translation on SE(n)
mateuszbaran Jun 22, 2021
b1bf4ed
Removed some experimantal code
mateuszbaran Jun 22, 2021
5ffc8e5
mostly more tests
mateuszbaran Jun 23, 2021
1850186
Update test/groups/special_euclidean.jl
mateuszbaran Jun 23, 2021
a3b811b
fixed adjoint action on SE(3)
mateuszbaran Jun 23, 2021
44c7ee5
mostly documentation
mateuszbaran Jun 23, 2021
e1dbba3
Update src/groups/special_euclidean.jl
mateuszbaran Jun 23, 2021
b6cda57
a few docs changes
mateuszbaran Jun 28, 2021
5a8d0b8
mostly docs
mateuszbaran Jun 29, 2021
93435c1
Merge branch 'master' into mbaran/lie-bracket
mateuszbaran Jun 30, 2021
623c84d
formatting
mateuszbaran Jun 30, 2021
d46ab3f
More work on Cartan-Schouten connections
mateuszbaran Jul 1, 2021
b4d00e5
more testing of vector transport on rotations; notation fixes; optimi…
mateuszbaran Jul 2, 2021
ce91fa8
docs, exports, small cleanup
mateuszbaran Jul 3, 2021
61f5b7c
fix test
mateuszbaran Jul 3, 2021
58d567d
one more test
mateuszbaran Jul 3, 2021
a83325e
Update docs/src/manifolds/connection.md
mateuszbaran Jul 6, 2021
c3b3257
Apply suggestions from code review
mateuszbaran Jul 6, 2021
8e8ba4c
documentation
mateuszbaran Jul 7, 2021
6061044
Merge branch 'mbaran/lie-bracket' of https://github.com/JuliaManifold…
mateuszbaran Jul 7, 2021
f3d7c43
new docs
mateuszbaran Jul 8, 2021
9e0090a
documentation fixes
mateuszbaran Jul 8, 2021
0b04c55
scalar Ricci curvature moved back to MetricManifold
mateuszbaran Jul 9, 2021
d0cffd9
documentation improvements
mateuszbaran Jul 9, 2021
744b4b3
SE_in_GL renaming
mateuszbaran Jul 9, 2021
ea2afef
Update src/groups/connections.jl
mateuszbaran Jul 9, 2021
9844441
docs fixes
mateuszbaran Jul 9, 2021
fa7b8a1
Merge branch 'master' into mbaran/lie-bracket
mateuszbaran Jul 9, 2021
b9776a0
bump version
mateuszbaran Jul 9, 2021
2c604ff
disable an ambiguity test bacause it takes way too long
mateuszbaran Jul 13, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/src/misc/notation.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Within the documented functions, the utf8 symbols are used whenever possible, as
| Symbol | Description | Also used | Comment |
|:--:|:--------------- |:--:|:-- |
| ``\tau_p`` | action map by group element ``p`` | ``\mathrm{L}_p``, ``\mathrm{R}_p`` | either left or right |
| ``\operatorname{Ad}_p(X)`` | adjoint action of element ``p`` of a Lie group on the element ``X`` of the corresponding Lie algebra | | |
| ``\times`` | Cartesian product of two manifolds | | see [`ProductManifold`](@ref) |
| ``^{\wedge}`` | (n-ary) Cartesian power of a manifold | | see [`PowerManifold`](@ref) |
| ``a`` | coordinates of a point in a chart | | see [`get_parameters`](@ref) |
Expand Down
6 changes: 5 additions & 1 deletion src/Manifolds.jl
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,9 @@ export AbstractGroupAction,
SpecialOrthogonal,
TranslationGroup,
TranslationAction
export affine_matrix,
export adjoint_action,
adjoint_action!,
affine_matrix,
apply,
apply!,
apply_diff,
Expand Down Expand Up @@ -557,6 +559,8 @@ export affine_matrix,
inverse_translate!,
inverse_translate_diff,
inverse_translate_diff!,
lie_bracket,
lie_bracket!,
make_identity,
optimal_alignment,
optimal_alignment!,
Expand Down
36 changes: 36 additions & 0 deletions src/groups/array_manifold.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,24 @@ array_point(p) = ValidationMPoint(p)
array_point(p::ValidationMPoint) = p
array_point(e::Identity) = Identity(e.group, array_point(e.p))

function adjoint_action(M::ValidationManifold, p, X; kwargs...)
is_point(M, p, true; kwargs...)
eM = make_identity(M.manifold, array_value(p))
is_vector(M, eM, X, true; kwargs...)
Y = ValidationTVector(adjoint_action(M.manifold, array_value(p), array_value(X)))
is_vector(M, eM, Y, true; kwargs...)
return Y
end

function adjoint_action!(M::ValidationManifold, Y, p, X; kwargs...)
is_point(M, p, true; kwargs...)
eM = make_identity(M.manifold, array_value(p))
is_vector(M, eM, X, true; kwargs...)
adjoint_action!(M.manifold, array_value(Y), array_value(p), array_value(X))
is_vector(M, eM, Y, true; kwargs...)
return Y
end

function Base.inv(M::ValidationManifold, p; kwargs...)
is_point(M, p, true; kwargs...)
q = array_point(inv(M.manifold, array_value(p)))
Expand Down Expand Up @@ -32,6 +50,24 @@ function identity!(M::ValidationManifold, q, p; kwargs...)
return q
end

function lie_bracket(M::ValidationManifold, X, Y)
eM = make_identity(M.manifold, array_value(X))
is_vector(M, eM, X, true)
is_vector(M, eM, Y, true)
Z = ValidationTVector(lie_bracket(M.manifold, array_value(X), array_value(Y)))
is_vector(M, eM, Z, true)
return Z
end

function lie_bracket!(M::ValidationManifold, Z, X, Y)
eM = make_identity(M.manifold, array_value(X))
is_vector(M, eM, X, true)
is_vector(M, eM, Y, true)
lie_bracket!(M.manifold, array_value(Z), array_value(X), array_value(Y))
is_vector(M, eM, Z, true)
return Z
end

function compose(M::ValidationManifold, p, q; kwargs...)
is_point(M, p, true; kwargs...)
is_point(M, q, true; kwargs...)
Expand Down
14 changes: 14 additions & 0 deletions src/groups/circle_group.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ invariant_metric_dispatch(::CircleGroup, ::ActionDirection) = Val(true)

default_metric_dispatch(::MetricManifold{ℂ,CircleGroup,EuclideanMetric}) = Val(true)

adjoint_action(::CircleGroup, p, X) = X
Comment thread
kellertuer marked this conversation as resolved.

function adjoint_action!(::CircleGroup, Y, p, X)
copyto!(Y, X)
return Y
end
Comment thread
mateuszbaran marked this conversation as resolved.
Outdated

function compose(G::CircleGroup, p::AbstractVector, q::AbstractVector)
return map(compose, repeated(G), p, q)
end
Expand Down Expand Up @@ -46,6 +53,13 @@ function inverse_translate(
return map(/, q, p)
end

lie_bracket(::CircleGroup, X, Y) = zero(X)

function lie_bracket!(::CircleGroup, Z, X, Y)
fill(Z, 0)
return Z
end
Comment thread
mateuszbaran marked this conversation as resolved.
Outdated

translate_diff(::GT, p, q, X, ::ActionDirection) where {GT<:CircleGroup} = map(*, p, X)
function translate_diff(
::GT,
Expand Down
65 changes: 65 additions & 0 deletions src/groups/group.jl
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,31 @@ end
# Group-specific functions
##########################

@doc raw"""
adjoint_action(G::AbstractGroupManifold, p, X)

Adjoint action of the element `p` of the Lie group `G` on the element `X`
of the corresponding Lie algebra.

It is defined as the differential of the group authomorphism $Ψ_p(q) = pqp⁻¹$ at
Comment thread
mateuszbaran marked this conversation as resolved.
Outdated
the identity of `G`.

The formula reads
````math
\operatorname{Ad}_p(X) = dΨ_p(e)[X]
````
where $e$ is the identity element of `G`.
"""
adjoint_action(G::AbstractGroupManifold, p, X)
@decorator_transparent_function :intransparent function adjoint_action(
G::AbstractGroupManifold,
p,
X,
)
Y = allocate_result(G, adjoint_action, p)
return adjoint_action!(G, Y, p, X)
end

@doc raw"""
inv(G::AbstractGroupManifold, p)

Expand Down Expand Up @@ -484,6 +509,18 @@ function decorator_transparent_dispatch(
return Val(:intransparent)
end

"""
lie_bracket(G::AbstractGroupManifold, X, Y)

Lie bracket between elements `X`, `Y` of the Lie algebra corresponding to the Lie group `G`.
Comment thread
mateuszbaran marked this conversation as resolved.
Outdated
"""
lie_bracket(G::AbstractGroupManifold, X, Y)
@decorator_transparent_signature lie_bracket(M::AbstractDecoratorManifold, X, Y)
function lie_bracket(G::AbstractGroupManifold, X, Y)
Z = allocate(G, lie_bracket, X, Y)
return lie_bracket!(G, Z, X, Y)
end

_action_order(p, q, conv::LeftAction) = (p, q)
_action_order(p, q, conv::RightAction) = (q, p)

Expand Down Expand Up @@ -951,6 +988,13 @@ Base.:*(e::Identity{G}, p) where {G<:AdditionGroup} = e
Base.:*(p, e::Identity{G}) where {G<:AdditionGroup} = e
Base.:*(e::E, ::E) where {G<:AdditionGroup,E<:Identity{G}} = e

adjoint_action(::AdditionGroup, p, X) = X

function adjoint_action!(::AdditionGroup, Y, p, X)
copyto!(Y, X)
return Y
end
Comment thread
mateuszbaran marked this conversation as resolved.
Outdated

Base.zero(e::Identity{G}) where {G<:AdditionGroup} = e

Base.identity(::AdditionGroup, p) = zero(p)
Expand Down Expand Up @@ -988,6 +1032,13 @@ group_log(::AdditionGroup, q) = q

group_log!(::AdditionGroup, X, q) = copyto!(X, q)

lie_bracket(::AdditionGroup, X, Y) = zero(X)

function lie_bracket!(::AdditionGroup, Z, X, Y)
fill(Z, 0)
return Z
end
Comment thread
mateuszbaran marked this conversation as resolved.
Outdated

#######################################
# Overloads for MultiplicationOperation
#######################################
Expand Down Expand Up @@ -1015,6 +1066,13 @@ Base.:\(p, ::Identity{G}) where {G<:MultiplicationGroup} = inv(p)
Base.:\(::Identity{G}, p) where {G<:MultiplicationGroup} = p
Base.:\(e::E, ::E) where {G<:MultiplicationGroup,E<:Identity{G}} = e

adjoint_action(G::MultiplicationGroup, p, X) = p * X / p
Comment thread
mateuszbaran marked this conversation as resolved.
Outdated

function adjoint_action!(::MultiplicationGroup, Y, p, X)
copyto!(Y, p * X / p)
return Y
end

Base.inv(e::Identity{G}) where {G<:MultiplicationGroup} = e

Base.one(e::Identity{G}) where {G<:MultiplicationGroup} = e
Expand Down Expand Up @@ -1062,3 +1120,10 @@ function group_exp!(G::MultiplicationGroup, q, X)
end

group_log!(::MultiplicationGroup, X::AbstractMatrix, q::AbstractMatrix) = log_safe!(X, q)

lie_bracket(::MultiplicationGroup, X, Y) = X * Y - Y * X
Comment thread
mateuszbaran marked this conversation as resolved.
Outdated

function lie_bracket!(::MultiplicationGroup, Z, X, Y)
copyto!(Z, X * Y - Y * X)
Comment thread
mateuszbaran marked this conversation as resolved.
Outdated
return Z
end
9 changes: 9 additions & 0 deletions src/groups/special_euclidean.jl
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,14 @@ R & t \\
\end{pmatrix}.
````

This function embeds $\mathrm{SE}(n)$ in the general linear group $\mathrm{GL}(n+1)$.
It is an isometric embedding and group homomorphism [^RicoMatrinex1988].
Comment thread
mateuszbaran marked this conversation as resolved.
Outdated

See also [`screw_matrix`](@ref) for matrix representations of the Lie algebra.

[^RicoMatrinex1988]:
Comment thread
mateuszbaran marked this conversation as resolved.
Outdated
> Rico Martinez, J. M., “Representations of the Euclidean group and its applications
> to the kinematics of spatial chains,” PhD Thesis, University of Florida, 1988.
"""
function affine_matrix(G::SpecialEuclidean{n}, p) where {n}
pis = submanifold_components(G, p)
Expand Down Expand Up @@ -128,6 +135,8 @@ the $n + 1 × n + 1$ matrix
\end{pmatrix}.
````

This function embeds $𝔰𝔢(n)$ in the general linear Lie algebra $𝔤𝔩(n+1)$.

See also [`affine_matrix`](@ref) for matrix representations of the Lie group.
"""
function screw_matrix(G::SpecialEuclidean{n}, X) where {n}
Expand Down
Loading