Skip to content

Commit

Permalink
Add a proper working default.
Browse files Browse the repository at this point in the history
  • Loading branch information
kellertuer committed Sep 22, 2021
1 parent 1462018 commit aca6d5c
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/differentiation/riemannian_diff.jl
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ In the tangent space itself, this backend then employs an (Euclidean)
# Constructor
TangentDiffBackend()
TangentDiffBackend(diff_backend)
where `diff_backend` is an [`AbstractDiffBackend`](@ref) to be used on the tangent space.
With the keyword arguments
* `diff_backend` an [`AbstractDiffBackend`](@ref) to be used on the tangent space
(by defaut [`FiniteDiffBackend`](@ref) is used)
* `retraction` an [`AbstractRetractionMethod`](@ref) ([`ExponentialRetraction`]('ref) by default)
* `inverse_retraction` an [`AbstractInverseRetractionMethod`](@ref) ([`LogarithmicInverseRetraction`]('ref) by default)
* `basis` an [`AbstractBasis`](@ref) ([`DefaultOrthogonalBasis`]('ref) by default)
Expand All @@ -88,8 +88,7 @@ struct TangentDiffBackend{
inverse_retraction::TIR
basis::TB
end
function TangentDiffBackend(;
diff_backend::TAD=FiniteDiffBackend(),
function TangentDiffBackend(diff_backend::TAD;
retraction::TR = ExponentialRetraction(),
inverse_retraction::TIR = LogarithmicInverseRetraction(),
basis::TB = DefaultOrthonormalBasis()
Expand Down Expand Up @@ -198,7 +197,7 @@ globally default differentiation backend for calculating gradients.
[`Manifolds.gradient(::AbstractManifold, ::Any, ::Any, ::AbstractRiemannianDiffBackend)`](@ref)
"""
const _current_rgradient_backend = CurrentRiemannianDiffBackend(TangentDiffBackend())
const _current_rgradient_backend = CurrentRiemannianDiffBackend(TangentDiffBackend(FiniteDifferencesBackend()))

"""
_current_rdifferential_backend
Expand All @@ -210,7 +209,7 @@ globally default differentiation backend for calculating differentials.
[`Manifolds.differential`](@ref)
"""
const _current_rdifferential_backend = CurrentRiemannianDiffBackend(TangentDiffBackend())
const _current_rdifferential_backend = CurrentRiemannianDiffBackend(TangentDiffBackend(FiniteDifferencesBackend()))

"""
rgradient_backend() -> AbstractRiemannianDiffBackend
Expand Down Expand Up @@ -246,7 +245,7 @@ function rdifferential_backend!(backend::AbstractRiemannianDiffBackend)
return backend
end

"""
@doc raw"""
RiemannianProjectionBackend <: AbstractRiemannianDiffBackend
This backend computes the differentiation in the embedding, which is currently limited
Expand Down

0 comments on commit aca6d5c

Please sign in to comment.