Skip to content

Commit

Permalink
add two fallbacks to provide error messages when a retracion (or inve…
Browse files Browse the repository at this point in the history
…rse retraction) method is not implemented.
  • Loading branch information
kellertuer committed Apr 8, 2020
1 parent ee1354c commit 0f3c593
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/ManifoldsBase.jl
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,9 @@ end
function inverse_retract!(M::Manifold, X, p, q, method::LogarithmicInverseRetraction)
return log!(M, X, p, q)
end
function inverse_retract!(M::Manifold, X, p, q, method::AbstractRetractionMethod)
error(manifold_function_not_implemented_message(M, inverse_retract!,X,p,q,method))
end

"""
inverse_retract(M::Manifold, x, y)
Expand Down Expand Up @@ -714,7 +717,9 @@ retract!(M::Manifold, q, p, X, method::ExponentialRetraction) = exp!(M, q, p, X)
function retract!(M::Manifold, q, p, X, t::Real, method::AbstractRetractionMethod)
return retract!(M, q, p, t * X, method)
end

function retract!(M::Manifold, q, p, X, method::AbstractRetractionMethod)
error(manifold_function_not_implemented_message(M, retract!,q,p,method))
end
@doc doc"""
shortest_geodesic(M::Manifold, p, q) -> Function
Expand Down

0 comments on commit 0f3c593

Please sign in to comment.