Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support for meta priors #226

Merged
merged 1 commit into from
Jan 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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