Skip to content
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

Fix an edge case of PT on Circle #695

Merged
merged 1 commit into from
Dec 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
131 changes: 69 additions & 62 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +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.10] – 2023-12-27

### Fixed

* Fixed mixed array index number in-place `parallel_transport_to!` on real `Circle`, on Julia 1.6.
* Violations of MD004 lint rule in this file.

## [0.9.9] – 2023-12-25

### Fixed
Expand All @@ -18,115 +25,115 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- Improved distribution of random vector generation for rotation matrices and complex circle.
* Improved distribution of random vector generation for rotation matrices and complex circle.

## [0.9.7] - 2023-11-14

### Fixed

- Fixed `is_flat` for `CholeskySpace` and `SymmetricPositiveDefinite` with `LogCholeskyMetric` [https://github.com/JuliaManifolds/Manifolds.jl/issues/684](https://github.com/JuliaManifolds/Manifolds.jl/issues/684).
* Fixed `is_flat` for `CholeskySpace` and `SymmetricPositiveDefinite` with `LogCholeskyMetric` [https://github.com/JuliaManifolds/Manifolds.jl/issues/684](https://github.com/JuliaManifolds/Manifolds.jl/issues/684).

## [0.9.6] - 2023-11-09

### Fixed

- Fixed real coefficient basis for complex circle (an issue exposed by [https://github.com/JuliaManifolds/ManifoldsBase.jl/pull/173](https://github.com/JuliaManifolds/ManifoldsBase.jl/pull/173)).
- Fixed `VeeOrthogonalBasis` test for non-real manifolds.
* Fixed real coefficient basis for complex circle (an issue exposed by [https://github.com/JuliaManifolds/ManifoldsBase.jl/pull/173](https://github.com/JuliaManifolds/ManifoldsBase.jl/pull/173)).
* Fixed `VeeOrthogonalBasis` test for non-real manifolds.

## [0.9.5] - 2023-11-08

### Changed

- `identity_element` now returns a complex matrix for unitary group.
- `number_of_coordinates` is now exported.
* `identity_element` now returns a complex matrix for unitary group.
* `number_of_coordinates` is now exported.

## [0.9.4] - 2023-11-06

### Added

- Functions `inv_diff`, `inv_diff!`, `adjoint_inv_diff` and `adjoint_inv_diff!` that correspond to differentials and pullbacks of group inversion.
- Julia 1.10-rc CI workflow.
* Functions `inv_diff`, `inv_diff!`, `adjoint_inv_diff` and `adjoint_inv_diff!` that correspond to differentials and pullbacks of group inversion.
* Julia 1.10-rc CI workflow.

### Changed

- Documentation project files are marked as compatible with `BoundaryValueDiffEq` v5.
* Documentation project files are marked as compatible with `BoundaryValueDiffEq` v5.

### Fixed

- Fixed issue with incorrect implementation of `apply_diff_group` in `GroupOperationAction` with left backward and right forward action [#669](https://github.com/JuliaManifolds/Manifolds.jl/issues/669).
* Fixed issue with incorrect implementation of `apply_diff_group` in `GroupOperationAction` with left backward and right forward action [#669](https://github.com/JuliaManifolds/Manifolds.jl/issues/669).

## [0.9.3] - 2023-10-28

### Added

- Support for `BoundaryValueDiffEq` v5.
* Support for `BoundaryValueDiffEq` v5.

## [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.
* `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

### Added

- a new retraction and its inverse for the fixed Rank Manifolds, the orthographic retraction.
* a new retraction and its inverse for the fixed Rank Manifolds, the orthographic retraction.

## [0.9.0] - 2023-10-24

### Added

- Vector bundles are generalized to fiber bundles. Old `BundleFibers` functionality was reworked to better match mathematical abstractions. Fiber bundle functionality is experimental and minor changes may happen without a breaking release, with the exception of `TangentBundle` which is considered to be stable.
- `RotationTranslationAction` is introduced.
* Vector bundles are generalized to fiber bundles. Old `BundleFibers` functionality was reworked to better match mathematical abstractions. Fiber bundle functionality is experimental and minor changes may happen without a breaking release, with the exception of `TangentBundle` which is considered to be stable.
* `RotationTranslationAction` is introduced.

### Changed

- Sizes of all manifolds can now be either encoded in type or stored in a field to avoid over-specialization.
* Sizes of all manifolds can now be either encoded in type or stored in a field to avoid over-specialization.
The default is set to store the size in type parameter (except for `PowerManifold` and its variants), replicating the previous behavior.
For field storage, pass the `parameter=:field` keyword argument to manifold constructor.
For example statically sized `CenteredMatrices{m,n}` is now `CenteredMatrices{TypeParameter{Tuple{m,n}}}`, whereas the type of special Euclidean group with field-stored size is `CenteredMatrices{Tuple{Int,Int}}`. Similar change applies to:
- `CenteredMatrices{m,n}`,
- `CholeskySpace{N}`,
- `Elliptope{N,K}`,
- `Euclidean`,
- `FixedRankMatrices{m,n,k}`,
- `KendallsPreShapeSpace{n,k}`,
- `KendallsShapeSpace{n,k}`,
- `GeneralLinear{n}`,
- `GeneralUnitaryMultiplicationGroup{n}`,
- `GeneralizedGrassmann{n,k}`,
- `GeneralizedStiefel{n,k}`,
- `Grassmann{n,k}`,
- `Heisenberg{n}`,
- `Hyperbolic{n}`,
- `MultinomialMatrices{N,M}`,
- `MultinomialDoublyStochastic{n}`,
- `MultinomialSymmetric{n}`,
- `Orthogonal{n}`,
- `PowerManifold`,
- `PositiveArrays`,
- `PositiveMatrices`,
- `PositiveNumbers`,
- `ProbabilitySimplex{n}`,
- `SPDFixedDeterminant{n}`,
- `SpecialLinear{n}`,
- `SpecialOrthogonal{n}`,
- `SpecialUnitary{n}`,
- `SpecialEuclidean{n}`,
- `SpecialEuclideanManifold{n}`,
- `Spectrahedron{n,k}`,
- `SphereSymmetricMatrices{N}`,
- `Stiefel{n,k}`,
- `SymmetricMatrices{N}`,
- `SymmetricPositiveDefinite{n}`,
- `SymmetricPositiveSemidefiniteFixedRank{n,k}`,
- `Symplectic{n}`,
- `SymplecticStiefel{n,k}`,
- `TranslationGroup`,
- `Tucker`.
* `CenteredMatrices{m,n}`,
* `CholeskySpace{N}`,
* `Elliptope{N,K}`,
* `Euclidean`,
* `FixedRankMatrices{m,n,k}`,
* `KendallsPreShapeSpace{n,k}`,
* `KendallsShapeSpace{n,k}`,
* `GeneralLinear{n}`,
* `GeneralUnitaryMultiplicationGroup{n}`,
* `GeneralizedGrassmann{n,k}`,
* `GeneralizedStiefel{n,k}`,
* `Grassmann{n,k}`,
* `Heisenberg{n}`,
* `Hyperbolic{n}`,
* `MultinomialMatrices{N,M}`,
* `MultinomialDoublyStochastic{n}`,
* `MultinomialSymmetric{n}`,
* `Orthogonal{n}`,
* `PowerManifold`,
* `PositiveArrays`,
* `PositiveMatrices`,
* `PositiveNumbers`,
* `ProbabilitySimplex{n}`,
* `SPDFixedDeterminant{n}`,
* `SpecialLinear{n}`,
* `SpecialOrthogonal{n}`,
* `SpecialUnitary{n}`,
* `SpecialEuclidean{n}`,
* `SpecialEuclideanManifold{n}`,
* `Spectrahedron{n,k}`,
* `SphereSymmetricMatrices{N}`,
* `Stiefel{n,k}`,
* `SymmetricMatrices{N}`,
* `SymmetricPositiveDefinite{n}`,
* `SymmetricPositiveSemidefiniteFixedRank{n,k}`,
* `Symplectic{n}`,
* `SymplecticStiefel{n,k}`,
* `TranslationGroup`,
* `Tucker`.

For example

Expand Down Expand Up @@ -166,12 +173,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
end
```

- Argument order for type aliases `RotationActionOnVector` and `RotationTranslationActionOnVector`: most often dispatched on argument is now first.
- A more consistent handling of action direction was introduced. 4-valued `ActionDirection` was split into 2-valued `ActionDirection` (either left or right action) and `GroupActionSide` (action acting from the left or right side). See [https://github.com/JuliaManifolds/Manifolds.jl/issues/637](https://github.com/JuliaManifolds/Manifolds.jl/issues/637) for a design discussion.
* Argument order for type aliases `RotationActionOnVector` and `RotationTranslationActionOnVector`: most often dispatched on argument is now first.
* A more consistent handling of action direction was introduced. 4-valued `ActionDirection` was split into 2-valued `ActionDirection` (either left or right action) and `GroupActionSide` (action acting from the left or right side). See [https://github.com/JuliaManifolds/Manifolds.jl/issues/637](https://github.com/JuliaManifolds/Manifolds.jl/issues/637) for a design discussion.

### Removed

- `ProductRepr` is removed; please use `ArrayPartition` instead.
- Default methods throwing "not implemented" `ErrorException` for some group-related operations. Standard `MethodError` is now thrown instead.
- `LinearAffineMetric` was deprecated in a previous release and the symbol is now removed.
* `ProductRepr` is removed; please use `ArrayPartition` instead.
* Default methods throwing "not implemented" `ErrorException` for some group-related operations. Standard `MethodError` is now thrown instead.
* `LinearAffineMetric` was deprecated in a previous release and the symbol is now removed.
Please use `AffineInvariantMetric` instead.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Manifolds"
uuid = "1cead3c2-87b3-11e9-0ccd-23c62b72b94e"
authors = ["Seth Axen <[email protected]>", "Mateusz Baran <[email protected]>", "Ronny Bergmann <[email protected]>", "Antoine Levitt <[email protected]>"]
version = "0.9.9"
version = "0.9.10"

[deps]
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
Expand Down
2 changes: 1 addition & 1 deletion src/manifolds/Circle.jl
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@
return Y
end

parallel_transport_to!(::Circle{ℝ}, Y, p, X, q) = (Y .= X)
parallel_transport_to!(::Circle{ℝ}, Y, p, X, q) = (Y .= X[])

Check warning on line 535 in src/manifolds/Circle.jl

View check run for this annotation

Codecov / codecov/patch

src/manifolds/Circle.jl#L535

Added line #L535 was not covered by tests
function parallel_transport_to!(M::Circle{ℂ}, Y, p, X, q)
X_pq = log(M, p, q)
Xnorm = norm(M, p, X_pq)
Expand Down
5 changes: 4 additions & 1 deletion test/manifolds/circle.jl
Original file line number Diff line number Diff line change
Expand Up @@ -288,10 +288,13 @@ using Manifolds: TFVector, CoTFVector
)
end
end
@testset "Mixed array dimensions for exp" begin
@testset "Mixed array dimensions for exp and PT" begin
# this is an issue on Julia 1.6 but not later releases
M = Circle()
p = fill(0.0)
exp!(M, p, p, [1.0], 2.0)
@test p ≈ fill(2.0)
parallel_transport_to!(M, p, p, [4.0], p)
@test p ≈ fill(4.0)
end
end
Loading