-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update docstrings, format code, and a few additions (#16)
* Standardize/fix docstrings * Use variable name method * Rename variable to y * Make local injectivity radius fall back to global * Fix docstrings * Run JuliaFormatter * Replace broadcast with explicit copy * Add AbstractEstimationMethod * Fix variable name * Remove space * Increment version number * Rewrap docstrings * Avoid hanging equals * Simplify check with equiv logic * Change variable name * Rephrase * Use active language and wrap * Add/remove whitespace * Rephrase * Remove unused variable names * Remove whitespace * Standardize error messages * Make injectivity_radius error by default * Increment version number * Add more decorator manifold tests * Add global testset * Rewrap at length 92 per BlueStyle * Ommit space between long and short form functions * Merge docstrings for similar signatures
- Loading branch information
Showing
9 changed files
with
519 additions
and
412 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.2.0" | ||
authors = ["Seth Axen <[email protected]>", "Mateusz Baran <[email protected]>", "Ronny Bergmann <[email protected]>", "Antoine Levitt <[email protected]>"] | ||
version = "0.3.0" | ||
|
||
[deps] | ||
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,28 @@ | ||
""" | ||
DefaultManifold <: Manifold | ||
This default manifold illustrates the main features of the interface and provides | ||
a good starting point for an own manifold. It is a simplified/shortened variant | ||
of `Euclidean` from `Manifolds.jl`. | ||
This default manifold illustrates the main features of the interface and provides a skeleton | ||
to build one's own manifold. It is a simplified/shortened variant of `Euclidean` from | ||
`Manifolds.jl`. | ||
this manifold further illustrates, how to type your manifold points | ||
and tangent vectors. Note that the interface does not require this, but it | ||
might be handy in debugging and educative situations to verify correctness of | ||
involved variabes. | ||
This manifold further illustrates how to type your manifold points and tangent vectors. Note | ||
that the interface does not require this, but it might be handy in debugging and educative | ||
situations to verify correctness of involved variabes. | ||
""" | ||
struct DefaultManifold{T<:Tuple} <: Manifold where {T} end | ||
DefaultManifold(n::Vararg{Int,N}) where N = DefaultManifold{Tuple{n...}}() | ||
DefaultManifold(n::Vararg{Int,N}) where {N} = DefaultManifold{Tuple{n...}}() | ||
|
||
@generated representation_size(::DefaultManifold{T}) where {T} = Tuple(T.parameters...) | ||
@generated manifold_dimension(::DefaultManifold{T}) where {T} = *(T.parameters...) | ||
@inline inner(::DefaultManifold, x, v, w) = dot(v, w) | ||
distance(::DefaultManifold, x, y) = norm(x-y) | ||
distance(::DefaultManifold, x, y) = norm(x - y) | ||
norm(::DefaultManifold, x, v) = norm(v) | ||
exp!(M::DefaultManifold, y, x, v) = (y .= x .+ v) | ||
log!(M::DefaultManifold, v, x, y) = (v .= y .- x) | ||
zero_tangent_vector!(M::DefaultManifold, v, x) = fill!(v, 0) | ||
project_point!(M::DefaultManifold, y, x) = (y .= x) | ||
project_tangent!(M::DefaultManifold, w, x, v) = (w .= v) | ||
vector_transport_to!(M::DefaultManifold, vto, x, v, y, ::ParallelTransport) = (vto .= v) | ||
exp!(::DefaultManifold, y, x, v) = (y .= x .+ v) | ||
log!(::DefaultManifold, v, x, y) = (v .= y .- x) | ||
zero_tangent_vector!(::DefaultManifold, v, x) = fill!(v, 0) | ||
project_point!(::DefaultManifold, y, x) = copyto!(y, x) | ||
project_tangent!(::DefaultManifold, w, x, v) = copyto!(w, v) | ||
function vector_transport_to!(::DefaultManifold, vto, x, v, y, ::ParallelTransport) | ||
return copyto!(vto, v) | ||
end | ||
injectivity_radius(::DefaultManifold) = Inf |
Oops, something went wrong.
8d9e3d1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JuliaRegistrator register
8d9e3d1
There was a problem hiding this comment.
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/7005
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 Julia TagBot is installed, or can be done manually through the github interface, or via: