Differentiation backends
ManifoldDiff.set_default_differential_backend!
— Functionset_default_differential_backend!(backend::AbstractDiffBackend)
Set current backend for differentiation to backend
.
ManifoldDiff.default_differential_backend
— Functiondefault_differential_backend() -> AbstractDiffBackend
Get the default differentiation backend.
EmbeddedDiff
ManifoldDiff.ExplicitEmbeddedBackend
— TypeExplicitEmbeddedBackend{TF<:NamedTuple} <: AbstractDiffBackend
A backend to use with the RiemannianProjectionBackend
or the TangentDiffBackend
, when you have explicit formulae for the gradient in the embedding available.
Constructor
ExplicitEmbeddedBackend(M::AbstractManifold; kwargs)
Construct an ExplicitEmbeddedBackend
in the embedding M
, where currently the following keywords may be used
gradient
for a(n allocating) gradient functiongradient(M, p)
defined in the embeddinggradient!
for a mutating gradient functiongradient!(M, X, p)
.
Note that the gradient functions are defined on the embedding manifold M
passed to the Backend as well
ForwardDiff.jl
ManifoldDiff.ForwardDiffBackend
— TypeForwardDiffBackend <: AbstractDiffBackend
Differentiation backend based on the ForwardDiff.jl package.
FiniteDiff.jl
ManifoldDiff.FiniteDiffBackend
— TypeFiniteDiffBackend <: AbstractDiffBackend
A type to specify / use differentiation backend based on FiniteDiff.jl package.
Constructor
FiniteDiffBackend(method::Val{Symbol} = Val{:central})
FiniteDifferenes.jl
ManifoldDiff.FiniteDifferencesBackend
— TypeFiniteDifferencesBackend(method::FiniteDifferenceMethod = central_fdm(5, 1))
Differentiation backend based on the FiniteDifferences.jl package.