Skip to content

Commit

Permalink
Work on the documentation and add also 0.14.12 to News (mea culpa).
Browse files Browse the repository at this point in the history
  • Loading branch information
kellertuer committed Oct 10, 2023
1 parent 0899b38 commit 183f1dd
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 34 deletions.
6 changes: 6 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Julia 1.0 is no longer supported. From now on, the earliest supported Julia version is 1.6.

## [0.14.12] 23/09/2023

### Changed

- Introduce a thorough way to allocate tangent vectors for `rand`

## [0.14.11] 25/08/2023

### Added
Expand Down
25 changes: 4 additions & 21 deletions docs/src/metamanifolds.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,35 +20,18 @@ Pages = ["src/ProductManifold.jl"]
Order = [:macro, :type, :function]
```


## VectorBundle and Vector Fibre

```@autodocs
Modules = [ManifoldsBase]
Pages = ["VectorBundle.jl"]
Order = [:macro, :type, :function]
Public=true
Private=false
```

```@autodocs
Modules = [ManifoldsBase]
Pages = ["VectorFiber.jl"]
Order = [:macro, :type, :function]
Public=true
Private=false
```

## Fiber and FiberBundle
## Fiber

```@autodocs
Modules = [ManifoldsBase]
Pages = ["Fiber.jl"]
Order = [:macro, :type, :function]
```

## Tangent Space

```@autodocs
Modules = [ManifoldsBase]
Pages = ["FiberBundle.jl"]
Pages = ["TangentSpace.jl"]
Order = [:macro, :type, :function]
```
16 changes: 10 additions & 6 deletions src/Fiber.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"""
abstract type FiberType end
An abstract type for fiber types.
An abstract type for fiber types that can be used within [`Fiber`](@ref).
"""
abstract type FiberType end

Expand All @@ -13,23 +13,27 @@ abstract type FiberType end
TX,
} <: AbstractManifold{𝔽}
A fiber of a [`FiberBundle`](@ref) at a point `p` on the manifold.
This is modelled using [`BundleFibers`](@ref) with only a fiber part
and fixing the point-like part to be just `p`.
A fiber of a fiber bundle at a point `p` on the manifold.
This fiber itself is also a `manifold`. For vector fibers it's by default flat and hence
isometric to the [`Euclidean`](https://juliamanifolds.github.io/Manifolds.jl/latest/manifolds/euclidean.html) manifold.
# Fields
* `manifold` –
* `point`
# Constructor
Fiber(fiber_type::FiberType, manifold::AbstractManifold, p)
Fiber(M::AbstractManifold, p, fiber_type::FiberType)
A fiber of type `fiber_type` at point `p` from the manifold `manifold`.
"""
struct Fiber{𝔽,TFiber<:FiberType,TM<:AbstractManifold{𝔽},TX} <: AbstractManifold{𝔽}
manifold::TM
fiber_type::TFiber
point::TX
fiber_type::TFiber
end

base_manifold(B::Fiber) = B.manifold
Expand Down
4 changes: 2 additions & 2 deletions src/TangentSpace.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ This is modelled as an alias for [`VectorSpaceFiber`](@ref) corresponding to
TangentSpace(M::AbstractManifold, p)
Return the manifold (vector space) representing the tangent space ``T_p\mathcal M``
Return the manifold (vector space) representing the tangent space ``T_p\mathcal M``
at point `p`, ``p\in\mathcal M``.
"""
const TangentSpace{𝔽,M} = Fiber{𝔽,TangentSpaceType,M} where {𝔽,M<:AbstractManifold{𝔽}}

TangentSpace(M::AbstractManifold, p) = Fiber(M, TangentSpaceType(), p)
TangentSpace(M::AbstractManifold, p) = Fiber(M, p, TangentSpaceType())

function allocate_result(M::TangentSpace, ::typeof(rand))
return zero_vector(M.manifold, M.point)
Expand Down
5 changes: 3 additions & 2 deletions src/VectorFiber.jl
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@

"""
VectorSpaceFiber{𝔽,M,TFiber}
VectorSpaceFiber{𝔽,M,TSpaceType} = Fiber{𝔽,TSpaceType,M}
where {𝔽,M<:AbstractManifold{𝔽},TSpaceType<:VectorSpaceType}
Alias for [`Fiber`](@ref) when the fiber is a vector space.
Alias for a [`Fiber`](@ref) when the fiber is a vector space.
"""
const VectorSpaceFiber{𝔽,M,TSpaceType} =
Fiber{𝔽,TSpaceType,M} where {𝔽,M<:AbstractManifold{𝔽},TSpaceType<:VectorSpaceType}
Expand Down
4 changes: 2 additions & 2 deletions src/bases.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ abstract type VectorSpaceType <: FiberType end
"""
struct TangentSpaceType <: VectorSpaceType end
A type that indicates that a [`VectorBundle`](@ref) is a [`TangentBundle`](@ref).
A type that indicates that a [`Fiber`](@ref) is a [`TangentSpace`](@ref).
"""
struct TangentSpaceType <: VectorSpaceType end

"""
struct CotangentSpaceType <: VectorSpaceType end
A type that indicates that a [`VectorBundle`](@ref) is a [`CotangentBundle`](@ref).
A type that indicates that a [`Fiber`](@ref) is a [`CotangentSpace`](@ref).
"""
struct CotangentSpaceType <: VectorSpaceType end

Expand Down
2 changes: 1 addition & 1 deletion test/fibers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ include("test_sphere.jl")
@test rand(Random.default_rng(), t_p) isa Vector{Float64}
@test rand(Random.default_rng(), t_p; vector_at = X) isa Vector{Float64}
# generic vector space at
X_p = Fiber(M, TestVectorSpaceType(), p)
X_p = Fiber(M, p, TestVectorSpaceType())
X_ps = sprint(show, "text/plain", X_p)
X_ps_test = "VectorSpaceFiber{ℝ, DefaultManifold{ℝ, Tuple{Int64}}, TestVectorSpaceType, Vector{Float64}}\nFiber:\n TestVectorSpaceType()DefaultManifold(3; field = ℝ)\nBase point:\n $(sp)"
@test X_ps == X_ps_test
Expand Down

0 comments on commit 183f1dd

Please sign in to comment.