Skip to content

Commit

Permalink
Merge branch 'master' into kellertuer/Euclidean-r-norms
Browse files Browse the repository at this point in the history
# Conflicts:
#	NEWS.md
  • Loading branch information
kellertuer committed Oct 20, 2024
2 parents 50b62b1 + 5d28783 commit 69d1704
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 9 deletions.
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* `uniform_distribution` now has an error hint explaining what has to be done to make it work.
* `Euclidean` now follows the new `has_components` function from `ManifoldsBase.jl` (0.15.18)
and can handle also the `r`-norms now.
- Union type `MatrixGroup`
- Columnwise group action with arbitrary matrix groups
- `uniform_distribution` now has an error hint explaining what has to be done to make it work.

## [0.10.3] - 2024-10-04

Expand Down
1 change: 1 addition & 0 deletions src/groups/general_linear.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

@doc raw"""
GeneralLinear{T,𝔽} <: AbstractDecoratorManifold{𝔽}
Expand Down
30 changes: 21 additions & 9 deletions src/groups/rotation_action.jl
Original file line number Diff line number Diff line change
Expand Up @@ -205,45 +205,50 @@ end

###

const MatrixGroup{T,𝔽} = Union{
GeneralUnitaryMultiplicationGroup{T,𝔽},
GeneralLinear{T,𝔽},
SpecialLinear{T,𝔽},
} where {T,𝔽}

@doc raw"""
ColumnwiseMultiplicationAction{
TAD<:ActionDirection,
TM<:AbstractManifold,
TO<:GeneralUnitaryMultiplicationGroup,
TO<:MatrixGroup,
} <: AbstractGroupAction{TAD}
Action of the (special) unitary or orthogonal group [`GeneralUnitaryMultiplicationGroup`](@ref)
or [`GeneralLinear`](@ref) group
of type `On` columns of points on a matrix manifold `M`.
# Constructor
ColumnwiseMultiplicationAction(
M::AbstractManifold,
On::GeneralUnitaryMultiplicationGroup,
On::MatrixGroup,
AD::ActionDirection = LeftAction(),
)
"""
struct ColumnwiseMultiplicationAction{
TAD<:ActionDirection,
TM<:AbstractManifold,
TO<:GeneralUnitaryMultiplicationGroup,
TO<:MatrixGroup,
} <: AbstractGroupAction{TAD}
manifold::TM
On::TO
end

function ColumnwiseMultiplicationAction(
M::AbstractManifold,
On::GeneralUnitaryMultiplicationGroup,
On::MatrixGroup,
::TAD=LeftAction(),
) where {TAD<:ActionDirection}
return ColumnwiseMultiplicationAction{TAD,typeof(M),typeof(On)}(M, On)
end

const LeftColumnwiseMultiplicationAction{
TM<:AbstractManifold,
TO<:GeneralUnitaryMultiplicationGroup,
} = ColumnwiseMultiplicationAction{LeftAction,TM,TO}
const LeftColumnwiseMultiplicationAction{TM<:AbstractManifold,TO<:MatrixGroup} =
ColumnwiseMultiplicationAction{LeftAction,TM,TO}

function apply(::LeftColumnwiseMultiplicationAction, a, p)
return a * p
Expand Down Expand Up @@ -281,7 +286,14 @@ U K V^{\mathrm{T}} & \text{otherwise}
where ``U \Sigma V^{\mathrm{T}}`` is the SVD decomposition of ``p q^{\mathrm{T}}`` and ``K``
is the unit diagonal matrix with the last element on the diagonal replaced with -1.
"""
function optimal_alignment(A::LeftColumnwiseMultiplicationAction, p, q)
function optimal_alignment(
A::LeftColumnwiseMultiplicationAction{
<:AbstractManifold,
<:GeneralUnitaryMultiplicationGroup,
},
p,
q,
)
is_point(A.manifold, p; error=:error)
is_point(A.manifold, q; error=:error)

Expand Down

0 comments on commit 69d1704

Please sign in to comment.