JuliaManifolds/LieGroups.jl

New linear representation type

Aperta

#6 aperta il 18 set 2024

 (12 commenti) (0 reazioni) (0 assegnatari)Julia (3 fork)github user discovery
help wanted

Metriche repository

Star
 (46 stelle)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

Many group actions are actually linear representations, which allows to define apply_diff automatically. I would suggest the following:

  1. Create a new abstract type AbstractLinearRepresentation:
abstract type AbstractLinearRepresentation{AD <: ActionDirection} <: AbstractGroupAction{AD} end
  1. Define apply_diff for this class of group actions:
Manifolds.apply_diff(A::AbstractLinearRepresentation, g, ::Any, X) = apply(A, g, X)
  1. Make the existing linear group actions derive from AbstractLinearRepresentation For instance:
struct TranslationAction{TAD<:ActionDirection,TM<:AbstractManifold,TRn<:TranslationGroup} <:
       AbstractLinearRepresentation{TAD}
    manifold::TM
    Rn::TRn
end
  1. Clean up existing code Most of the existing implementations of apply_diff follow this pattern (because they are linear representation), for instance:
  • apply_diff(::TranslationAction,...)
  • apply_diff(::RotationActionOnVector,...)
  • apply_diff(::RotationTranslationOnVector,...)`

Guida contributor