Skip to content

Commit

Permalink
Merge pull request #31 from JuliaManifolds/mbaran/docfix-ref
Browse files Browse the repository at this point in the history
Docstring for CachedBasis and minor documentation fixes
  • Loading branch information
mateuszbaran authored Mar 28, 2020
2 parents 41929a0 + f752806 commit 2428b5c
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 6 deletions.
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.7.2"
version = "0.7.3"

[deps]
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Expand Down
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,20 @@ Basic interface for manifolds in Julia.
The project [`Manifolds.jl`](https://github.com/JuliaManifolds/Manifolds.jl)
is based on this interface and provides a variety of manifolds.

## Number system

A number system represents the field a manifold is based upon.
Most prominently, these are real-valued (``) and complex valued (``) fields that
parametrize certain manifolds.
A further type to represent the field of quaternions (``) can also be used.

## Bases

Several different types of bases for a tangent space at `p` on a [`Manifold`](@ref) are provided.
Methods are provided to obtain such a basis, to represent a tangent vector in a basis and to reconstruct a tangent vector from coefficients with respect to a basis.
The last two can be performed without computing the complete basis.
Further a basis can be cached and hence be reused, see [`CachedBasis`](https://juliamanifolds.github.io/Manifolds.jl/latest/interface.html#ManifoldsBase.CachedBasis).

## `DecoratorManifold`

The decorator manifold enhances a manifold by certain, in most cases implicitly
Expand All @@ -23,7 +37,7 @@ of the [`Euclidean`](https://github.com/JuliaManifolds/Manifolds.jl/blob/master/
manifold from [`Manifolds.jl`](https://github.com/JuliaManifolds/Manifolds.jl),
such that the interface functions can be tested.

## Embedded Manifold
## `EmbeddedManifold`

The embedded manifold models the embedding of a manifold into another manifold.
This way a manifold can benefit from existing implementations.
Expand Down
5 changes: 3 additions & 2 deletions src/EmbeddedManifold.jl
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@ Specify that an embedding is the default isometric embedding. This even inherits
logarithmic and exponential map as well as retraction and inverse retractions from the
embedding.
For an example, see [`SymmetricMatrices`](@ref) which are isometrically embedded in
the Euclidean space of matrices but also inherit exponential and logarithmic maps.
For an example, see [`SymmetricMatrices`](@ref Main.Manifolds.SymmetricMatrices) which are
isometrically embedded in the Euclidean space of matrices but also inherit exponential
and logarithmic maps.
"""
struct TransparentIsometricEmbedding <: AbstractIsometricEmbeddingType end

Expand Down
4 changes: 2 additions & 2 deletions src/ManifoldsBase.jl
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ injectivity_radius(M::Manifold, ::ExponentialRetraction) = injectivity_radius(M)
Compute the inner product of tangent vectors `X` and `Y` at point `p` from the
[`Manifold`](@ref) `M`.
See also: [`MetricManifold`](@ref)
See also: [`MetricManifold`](@ref Main.Manifolds.MetricManifold)
"""
function inner(M::Manifold, p, X, Y)
error(manifold_function_not_implemented_message(M, inner, p, X, Y))
Expand Down Expand Up @@ -530,7 +530,7 @@ end
log!(M::Manifold, X, p, q)
Compute the logarithmic map of point `q` at base point `p` on the [`Manifold`](@ref) `M`.
THe result is saved to `X`.
The result is saved to `X`.
"""
function log!(M::Manifold, X, p, q)
error(manifold_function_not_implemented_message(M, log!, X, p, q))
Expand Down
6 changes: 6 additions & 0 deletions src/bases.jl
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,13 @@ end
const DefaultOrDiagonalizingBasis =
Union{DefaultOrthonormalBasis,DiagonalizingOrthonormalBasis}

"""
CachedBasis(basis::AbstractBasis, data)
A cached version of the given `basis` with precomputed basis vectors. The basis vectors
are stored in `data`, either explicitly (like in cached variants of
[`ProjectedOrthonormalBasis`](@ref)) or implicitly.
"""
struct CachedBasis{B,V,𝔽} <: AbstractBasis{𝔽} where {BT<:AbstractBasis,V}
data::V
end
Expand Down

2 comments on commit 2428b5c

@kellertuer
Copy link
Member

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

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.7.3 -m "<description of version>" 2428b5caca30eea9855c3d550b47fea5af80b602
git push origin v0.7.3

Please sign in to comment.