Skip to content

Commit

Permalink
small fixes and updates
Browse files Browse the repository at this point in the history
  • Loading branch information
dehann committed Oct 15, 2021
1 parent 11211f3 commit 6b25f75
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/Interface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,28 @@ Manifolds.identity_element(::Circle, val::AbstractVector{T}) where {T <: Real} =
Helper function to convert coordinates to a desired on-manifold point.
DevNotes
- FIXME need much better consolidation or even removal of this function entirely.
- This function makes too strong an assumption of groups
Notes
- `u0` is used to identify the data type for a point
- Pass in a different `exp` if needed.
"""
makePointFromCoords(M::MB.AbstractManifold,
makePointFromCoords(M::MB.AbstractManifold, # Manifolds.AbstractGroupManifold
coords::AbstractVector{<:Real},
u0=zeros(manifold_dimension(M)),
ϵ=identity_element(M,u0),
retraction_method::AbstractRetractionMethod=ExponentialRetraction() ) = retract(M, ϵ, hat(M, ϵ, coords), retraction_method)
#

# should perhaps just be dispatched for <:AbstractGroupManifold
# only works for AbstractGroupManifold (have an identity)
function makeCoordsFromPoint( M::MB.AbstractManifold,
pt::P ) where P
pt::P,
ϵ = identity_element(M, pt) ) where P
#
# only works for manifold which have an identity (eg groups)
ϵ = identity_element(M, pt)

vee(M, ϵ, log(M, ϵ, pt))
end

Expand Down
5 changes: 5 additions & 0 deletions src/KernelHilbertEmbeddings.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ Normal kernel used for Hilbert space embeddings.
"""
ker(M::MB.AbstractManifold, p, q, sigma::Real=0.001) = exp( -sigma*(distance(M, p, q)^2) )

# overwrite non-symmetric with alternate implementations
# ker(M::MB.AbstractManifold, p, q, sigma::Real=0.001) = exp( -sigma*(distance(M, p, q)^2) )



"""
$SIGNATURES
Expand Down

0 comments on commit 6b25f75

Please sign in to comment.