Skip to content

Commit

Permalink
Add get_embedding for GeneralUnitaryMultiplicationGroup (#670)
Browse files Browse the repository at this point in the history
* Add `get_embedding` for `GeneralUnitaryMultiplicationGroup`

* add changelog action
  • Loading branch information
mateuszbaran authored Oct 27, 2023
1 parent 4fce452 commit cdf3f6c
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 3 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Check Changelog
on:
pull_request:

jobs:
Check-Changelog:
name: Check Changelog Action
runs-on: ubuntu-latest
steps:
- uses: tarides/changelog-check-action@v2
with:
changelog: NEWS.md
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ docs/Manifest.toml
docs/build
docs/src/generated
docs/src/misc/contributing.md
docs/src/misc/CONTRIBUTING.md
docs/src/misc/NEWS.md
benchmark/tune.json
benchmark/results*
docs/src/tutorials/*.md
Expand Down
4 changes: 3 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.9.2] - 2023-10-26
## [0.9.2] - 2023-10-27

### Added

- `rand(G; vector_at=Identity(G))` now works for translation, special orthogonal and special Euclidean groups `G` (issue [#665](https://github.com/JuliaManifolds/Manifolds.jl/issues/665)).
- `get_embedding` now works for `GeneralUnitaryMultiplicationGroup`.
- Github action that checks for NEWS.md changes.

## [0.9.1] - 2023-10-25

Expand Down
4 changes: 4 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,22 @@ Einsum = "0.4"
Graphs = "1.4"
HybridArrays = "0.4"
Kronecker = "0.4, 0.5"
LinearAlgebra = "1.6"
ManifoldDiff = "0.3.7"
ManifoldsBase = "0.15.0"
Markdown = "1.6"
MatrixEquations = "2.2"
OrdinaryDiffEq = "6.31"
Plots = "1"
Quaternions = "0.5, 0.6, 0.7"
Random = "1.6"
RecipesBase = "1.1"
RecursiveArrayTools = "2"
Requires = "0.5, 1"
SimpleWeightedGraphs = "1.2"
SpecialFunctions = "0.8, 0.9, 0.10, 1.0, 2"
StaticArrays = "1.4.3"
Statistics = "1.6"
StatsBase = "0.32, 0.33, 0.34"
julia = "1.6"

Expand Down
6 changes: 5 additions & 1 deletion src/groups/general_unitary_groups.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@doc raw"""
GeneralUnitaryMultiplicationGroup{T,𝔽,M} = GroupManifold{𝔽,M,MultiplicationOperation}
GeneralUnitaryMultiplicationGroup{T,𝔽,S} <: AbstractDecoratorManifold{𝔽}
A generic type for Lie groups based on a unitary property and matrix multiplcation,
see e.g. [`Orthogonal`](@ref), [`SpecialOrthogonal`](@ref), [`Unitary`](@ref), and [`SpecialUnitary`](@ref)
Expand Down Expand Up @@ -136,6 +136,10 @@ function exp_lie!(::GeneralUnitaryMultiplicationGroup{TypeParameter{Tuple{4}},
return q
end

function get_embedding(G::GeneralUnitaryMultiplicationGroup)
return get_embedding(G.manifold)
end

function inverse_translate(G::GeneralUnitaryMultiplicationGroup, p, q, ::LeftForwardAction)
return inv(G, p) * q
end
Expand Down
2 changes: 1 addition & 1 deletion src/groups/special_orthogonal.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@doc raw"""
SpecialOrthogonal{n} <: GroupManifold{ℝ,Rotations{n},MultiplicationOperation}
SpecialOrthogonal{n} = GeneralUnitaryMultiplicationGroup{n,ℝ,DeterminantOneMatrices}
Special orthogonal group ``\mathrm{SO}(n)`` represented by rotation matrices, see [`Rotations`](@ref).
Expand Down
2 changes: 2 additions & 0 deletions test/groups/special_orthogonal.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ using Manifolds: LeftForwardAction, RightBackwardAction
@test is_default_metric(MetricManifold(G, EuclideanMetric()))
@test is_flat(G) == (n == 2)

@test get_embedding(G) == Euclidean(n, n)

types = [Matrix{Float64}]

if n == 2
Expand Down

2 comments on commit cdf3f6c

@mateuszbaran
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request updated: JuliaRegistries/General/94151

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.9.2 -m "<description of version>" cdf3f6c1898b0d298c79131192930e5928ec50c4
git push origin v0.9.2

Please sign in to comment.