diff --git a/tutorials/implement-a-manifold.qmd b/tutorials/implement-a-manifold.qmd index c483b660..3436bdbc 100644 --- a/tutorials/implement-a-manifold.qmd +++ b/tutorials/implement-a-manifold.qmd @@ -92,7 +92,7 @@ M = ScaledSphere(2,1.5) While the interface provides a lot of possible functions to define for your manifold, you only need to define those that are necessary for your implementation. If you are using other packages depending on `ManifoldsBase.jl` you will often just get a “Method not defined” and sometimes an ambiguity error indicating that a function is missing that is required for a certain task. -We can first start with a technical function which internally ist often used. Any of our points or tangent vectors is represented as a $(d+1)$-dimensional vector. This is internally often used when allocating memory, see [`representation_size`](@ref). +We can first start with a technical function which internally is often used. Any of our points or tangent vectors are represented as a $(d+1)$-dimensional vector. This is internally often used when allocating memory, see [`representation_size`](@ref). It returns a tuple representing the size of arrays for valid points. We define @@ -132,7 +132,7 @@ T_p\mathbb S_r^d := ``` to verify either `p` or `X` one uses [`is_point`](@ref)`(M,p)` -and [`is_vector`](@ref)`(M, p, X)` respectively. Since both involve some automatic options and possibililities, for example whether to throw an error or just return false, both mention that the actual functions to implement are [`check_point`](@ref) and [`check_vector`](@ref), which both do not throw but _return_ an error if something is wrong. +and [`is_vector`](@ref)`(M, p, X)` respectively. Since both involve some automatic options and possibilities, for example whether to throw an error or just return false, both mention that the actual functions to implement are [`check_point`](@ref) and [`check_vector`](@ref), which both do not throw but _return_ an error if something is wrong. In principle we would have to check two properties, namely that the size of `p` is of correct size `M.dimension+1` and that its norm is `M.radius`. Luckily, by defining [`representation_size`](@ref) the first check is automatically done already – actually for both points and vectors. We define @@ -172,7 +172,7 @@ function check_vector(M::ScaledSphere, p, X; kwargs...) end ``` -and again, the high level interface can be used to display warning for vectors not fulfilling the criterion, but we can also +and again, the high level interface can be used to display warnings for vectors not fulfilling the criterion, but we can also activate a check for the point using the last positional argument ```{julia} @@ -188,7 +188,7 @@ is_vector(M, [1.5, 0.0, 0.0], [0.0, 1.0, 0.0], true; error=:warn) # returns true For the final group of functions, we want to implement the [`exp`](@ref)onential map and a [`retract`](@ref)ion. Both are ways to “move around” on the manifold, that is, given a point $p$ and a tangent vector indicating a “walking direction”, the two functions we define will return a new point $q$ on the manifold. -For functions that compute a new point or tangent vector, `ManifoldsBase.jl` always provides two varinats: One that allocates new memory and one, that allows to provide the memory, the result should be returned in – to spare memory allocations. +For functions that compute a new point or tangent vector, `ManifoldsBase.jl` always provides two variants: One that allocates new memory, and one that allows to provide the memory the result should be returned in to spare memory allocations. Let's first take a look at what the exponential map is defined like. We follow the shortest curves, that is great arcs, on the sphere. Formally we have @@ -198,9 +198,9 @@ Let's first take a look at what the exponential map is defined like. We follow t \sin\Bigl(\frac{1}{r}\lVert X \rVert\Bigr)\frac{X}{\lVert X \rVert}. ```` -In fact, from the two functions above, [`exp`](@ref)`(M, p, X)` and [`exp!`](@ref)`(M, q, p, X)`, that works in place of `q`, we only have to implement the second. -The first one, `exp` by default falls back to allocating memory and calling the secnod. Sp `exp` should only be defined, if there is a special reason for. -Furthermore, we usually do not verify/check inputs to spare time. If a user feels insecure, they could for example use the [`ValidationManifold`](@ref) wrapper which adds explicitly checks of inputs and outputs. +In fact, from the two functions above, [`exp`](@ref)`(M, p, X)`, and [`exp!`](@ref)`(M, q, p, X)` that works in place of `q`, we only have to implement the second. +The first one, `exp` by default falls back to allocating memory and calling the second. So `exp` should only be defined, if there is a special reason for. +Furthermore, we usually do not verify/check inputs to spare time. If a user feels insecure, they could for example use the [`ValidationManifold`](@ref) wrapper which adds explicit checks of inputs and outputs. We define @@ -218,7 +218,7 @@ function exp!(M::ScaledSphere, q, p, X) end ``` -and we can directly test our function starting in the north pole and “waling down” to the equator +and we can directly test our function starting in the north pole and “walking down” to the equator ```{julia} q = exp(M, [0.0, 0.0, 1.5], [0.75π, 0.0, 0.0]) @@ -292,4 +292,4 @@ This notebook was rendered with the following environment ```{julia} Pkg.status() -``` \ No newline at end of file +```