Skip to content

Commit

Permalink
Pointless norm on vector fibers (#209)
Browse files Browse the repository at this point in the history
* Pointless norm on vector fibers

* Remove the variant with `p`

* improve NEWS

* Update NEWS.md

Co-authored-by: Ronny Bergmann <[email protected]>

---------

Co-authored-by: Ronny Bergmann <[email protected]>
  • Loading branch information
mateuszbaran and kellertuer authored Oct 24, 2024
1 parent 5972cde commit 6094c5e
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 3 deletions.
6 changes: 6 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ 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.15.20] 24/10/2024

### Changed

* `norm` function on `VectorSpaceFiber` (such as `TangentSpace`) now needs to be called without the point. The passed point was already ignored before.

## [0.15.19] 20/10/2024

### Changed
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 = "ManifoldsBase"
uuid = "3362f125-f0bb-47a3-aa74-596ffd7ef2fb"
authors = ["Seth Axen <[email protected]>", "Mateusz Baran <[email protected]>", "Ronny Bergmann <[email protected]>", "Antoine Levitt <[email protected]>"]
version = "0.15.19"
version = "0.15.20"

[deps]
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Expand Down
4 changes: 3 additions & 1 deletion src/VectorFiber.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ Alias for a [`Fiber`](@ref) when the fiber is a vector space.
const VectorSpaceFiber{𝔽,M,TSpaceType} =
Fiber{𝔽,TSpaceType,M} where {𝔽,M<:AbstractManifold{𝔽},TSpaceType<:VectorSpaceType}

LinearAlgebra.norm(M::VectorSpaceFiber, p, X) = norm(M.manifold, M.point, X)
LinearAlgebra.norm(M::VectorSpaceFiber, X) = norm(M.manifold, M.point, X)
# disambiguation
LinearAlgebra.norm(M::VectorSpaceFiber, X::Real) = norm(M.manifold, M.point, X)
10 changes: 9 additions & 1 deletion test/fibers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ using ManifoldsBaseTestUtils
@test isapprox(t_p, log(t_p, X, Y), [0.0, 2.0, -2.0])
@test isapprox(t_p, X, log(t_p, X, Y), [0.0, 2.0, -2.0])
@test inner(t_p, X, X, X) 1.0
@test norm(t_p, X, X) 1.0
@test norm(t_p, X) 1.0
@test norm(t_p, X) 1.0
@test parallel_transport_to(t_p, X, Y, X) Y
@test vector_transport_to(t_p, X, Y, X) Y
@test vector_transport_to(t_p, X, Y, X, ProjectionTransport()) Y
Expand Down Expand Up @@ -78,6 +79,13 @@ using ManifoldsBaseTestUtils
get_vector!(t_p, Z1, p, X1c, basis)
@test isapprox(Z1, X)
end

@testset "scalar fiber" begin
Ms = DefaultManifold()
p = 1.0
t_p = TangentSpace(Ms, p)
@test norm(t_p, 2.0) == 2.0
end
end

@testset "Weingarten Map" begin
Expand Down

2 comments on commit 6094c5e

@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 register

Release notes:

Changed

  • norm function on VectorSpaceFiber (such as TangentSpace) now needs to be called without the point. The passed point was already ignored before.

@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 created: JuliaRegistries/General/117982

Tagging

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.15.20 -m "<description of version>" 6094c5ee3b4cd81ab373ea36c32b6d48fbaf1609
git push origin v0.15.20

Please sign in to comment.