Skip to content

Commit

Permalink
support for meta priors
Browse files Browse the repository at this point in the history
  • Loading branch information
dehann committed Jan 2, 2023
1 parent 249e9dc commit f3f81e5
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/Interface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ function makeCoordsFromPoint( M::MB.AbstractManifold,
pt::P,
ϵ = identity_element(M, pt) ) where P
#

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

Expand Down Expand Up @@ -67,7 +66,6 @@ function _pointsToMatrixCoords(M::MB.AbstractManifold, pts::AbstractVector{P}) w
return mat
end


# asPartial=true indicates that src coords are smaller than dest coords, and false implying src has dummy values in placeholder dimensions
function setPointPartial!(Mdest::AbstractManifold,
dest,
Expand All @@ -76,23 +74,33 @@ function setPointPartial!(Mdest::AbstractManifold,
partial::AbstractVector{<:Integer},
asPartial::Bool=true )
#
# trivial case of empty factor
if length(partial) == 0
return dest
end

dest_ = AMP.makeCoordsFromPoint(Mdest,dest)
# e0 = identity_element(Mdest, dest)
# dest_ = vee(Mdest, e0, log(Mdest, e0, dest))

# Note on partial cases.
# Mdest is always full dimensional as the destination of some new values.
# Msrc is partial dimension manifold.
# src is assumed to be values which only represent the partial values

# FIXME, does this line need to cater for both partial and tangent or point cases?
src_ = AMP.makeCoordsFromPoint(Msrc,src)
# e0s = identity_element(Msrc, src)
# src_ = vee(Msrc, e0s, log(Msrc, e0s, src))

# do the copy in coords
dest_[partial] .= asPartial ? src_ : view(src_, partial)

# update points base in original
dest__ = makePointFromCoords(Mdest, dest_, dest)
# dest__ = exp(Mdest, e0, hat(Mdest, e0, dest_))
setPointsMani!(dest, dest__)

#
return dest
end
Expand Down

0 comments on commit f3f81e5

Please sign in to comment.