Skip to content

Commit

Permalink
Fix a small typo in symplectic stiefel and update project.toml and news.
Browse files Browse the repository at this point in the history
  • Loading branch information
kellertuer committed Dec 14, 2023
1 parent d9d83cf commit b397d2a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
7 changes: 7 additions & 0 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.9] – 2023-12-14

### Fixed

* introduced a nonzero `atol` for all point and vector checks that compre to zero.
This makes those checks a bit more relaxed by default and resolves [#630](https://github.com/JuliaManifolds/Manifolds.jl/issues/630).

## [0.9.8] - 2023-11-17

### Fixed
Expand Down
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.8"
version = "0.9.9"

[deps]
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
Expand Down
6 changes: 3 additions & 3 deletions src/manifolds/SymplecticStiefel.jl
Original file line number Diff line number Diff line change
Expand Up @@ -148,16 +148,16 @@ The tolerance can be set with `kwargs...` (e.g. `atol = 1.0e-14`).
check_vector(::SymplecticStiefel, ::Any...)

function check_vector(
M::SymplecticStiefel,
M::SymplecticStiefel{S,𝔽},
p,
X::T;
atol=sqrt(prod(representation_size(M))) * eps(real(float(number_eltype(T)))),
kwargs...,
) where {T}
) where {S,T,𝔽}
n, k = get_parameter(M.size)
# From Bendokat-Zimmermann: T_pSpSt(2n, 2k) = \{p*H | H^{+} = -H \}
H = inv(M, p) * X # ∈ ℝ^{2k × 2k}, should be Hamiltonian.
H_star = inv(Symplectic(2k, field), H)
H_star = inv(Symplectic(2k, 𝔽), H)
hamiltonian_identity_norm = norm(H + H_star)

if !isapprox(hamiltonian_identity_norm, 0; atol=atol, kwargs...)
Expand Down

0 comments on commit b397d2a

Please sign in to comment.